1. You must create a class named Bus.
2. You should also create a main class named Main.
3. In the Bus class, there should be member variables named:
-(integers) = length, capacity, speed
-(double) = fuel_capacity, fuel_burn_rate;
-(String) = name, color;
4. Create a constructor in the Bus class containing the parameters:
-name
-length
-capacity
-color
-speed
-fuel_capacity
-fuel_burn_rate
5.Create the following methods in the Bus class:
-*Must be a return method.
-*Must have a variable named result.
-*Must compute the estimated travel hour/s of a bus using the member variables fuel
-*Must compute the gas used within the given hour/s using the member variables
Comments
Leave a comment