I have a class project i am working on that is aimed at creating an airport weighing system. The program inputs the weight of the passenger and the weight of the luggage to be transported and computes the total to find whether a passenger is eligible to travel or not. if the total is greater than the set maximum limit, the passenger is denied access but if its below, the passenger is granted a go ahead
The Project design requires one to (show the classes in UML [Unified Modeling Language] notations) clearly showing the classes, properties of the classes, the methods in the different classes and their visibility. however below is what i have tried to do
import java.util.*;
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int day, month, year;
int minute, hour;
GregorianCalendar date = new GregorianCalendar();
day = date.get(Calendar.DAY_OF_MONTH);
month = date.get(Calendar.MONTH);
year = date.get(Calendar.YEAR);
minute = date.get(Calendar.MINUTE);
hour = date.get(Calendar.HOUR);
int passengerWeight;
int luggageWeight;
int totalWeight;
System.out.println("WELCOME TO EMMANUEL AIRLINE");
System.out.println("------------------------------------------------");
System.out.println("please submit in for weighing");
System.out.println("Pease Enter passenger weight(kgs): ");
passengerWeight = input.nextInt();
System.out.println("Pease Enter luggage weight (kgs): ");
luggageWeight = input.nextInt();
totalWeight = (passengerWeight+luggageWeight);
System.out.println("***********************************************************");
System.out.println("EMMANUEL AIRLINE");
System.out.println("Date:" + day + "/" + (month+1) + "/" + year);
System.out.println("Time:" + hour + ":" + minute);
System.out.println("-----------------------------------------------------------");
if(totalWeight > 120)
{System.out.println("warning, weight overload");}
else
{System.out.println("please proceed to the reception");}
System.out.println("***********************************************************");
System.out.println("-------------------------THANK YOU-------------------------");
System.out.println("***********************************************************");
}
}