Question: The third programming project involves writing a program that produces a road trip cost estimator with a GUI interface. The required GUI is shown below:
The third programming project involves writing a program that produces a road trip cost
estimator with a GUI interface. The required GUI is shown below:
The text fields above the Calculate button are the input fields and the one below is the output
field. The output field should not be editable. Three of the input fields have combo boxes to their
right, which allow the data to be input as described below:
The distance can be entered in either miles or kilometers
The gasoline cost can be input in either dollars per gallon or dollars per liter
The gas mileage can be input as either miles per gallon or kilometers per liter
The necessary calculations are as follows;
gasoline cost gasoline cost
total trip cost gasoline cost hotel cost food cost number days attractions
Your program should consist of two classes. The first class Project should define the GUI
illustrated above. The second class TripCost should be an immutable class that has at a
minimum a constructor that creates a trip cost object and a method that computes and returns the
total trip cost.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
