9 Lab (OOP)
9 Lab (OOP)
EXERCISE 1:
Create a GUI based application system that calculates the newton’s second law of motion i.e., F=ma
where,
F=Force in Newton
m= mass in grams
use proper alignment and design suitable to the application being created.
SOURCE CODE:
CALCULATE FORCE:
private void CALCULATEActionPerformed(java.awt.event.ActionEvent evt) {
Integer f;
f= mass * accel;
else
f = 0;
}
OUTPUT:
EXERCISE 2:
Create a login system interface based on your own choice of environment for example, cafeteria, cyber
security site or etc. Make sure you have your own unique scenario and apply proper designing chose
appropriate color palette and images. System must have proper labels, text boxes, buttons, and other
necessary controls.
SOURCE CODE:
ADMISSION FORM:
private void saveActionPerformed(java.awt.event.ActionEvent evt) {
jtextarea1.append("SEMESTER: "+semester1.getSelectedItem().toString());
if (M.isSelected())
else if (FM.isSelected())
{
if(DD.isSelected())
if(DM.isSelected())
if(OOP.isSelected())
OUTPUT: