Question
Joes Automotive Joes Automotive performs the routine maintenance services. Joe also performs other nonroutine services and charges for parts and for labor ($20 per hour).
Joes Automotive Joes Automotive performs the routine maintenance services. Joe also performs other nonroutine services and charges for parts and for labor ($20 per hour). For some loyal customers, Joe can choose to give a 10% off or 20% off discount to the total. Create a GUI application that displays the total for a customers visit to Joes.
Create a GUI in java as the following screenshot. This JFrame should incorporate three JPanel objects, each of them representing the routine services, nonroutine services, and the discount setting.
Please develop the JPanel for nonroutine services. Set the border with a proper title. Set the default text of the two text fields to 0.
In the the JPanel for nonroutine services, represent the price for labor per hour ($20) as named constants. The JPanel should also provide a method that calculates the total cost for nonroutine service. For example, when user enters 3 hours of labor and 50 for parts, the method should return 110.
Implement the Action Listener of the button on the JFrame. When the button is pressed, calculate the total, based on the service selected, the labor hour entered, the charge for parts entered, and the discount option selected.
Please use the following
JFrame, JPanel, JLabel, JTextField and JButton are used, and named properly. Default values are
set.
The method for getting total of nonrountine service is implemented in the JPanel.
The ActionListener is implemented to handle the event of the button.
RoutineServicePanel and DiscountPanel (provided) are properly incorporated in the JFrame; their
methods are used.
Joe's Automotive Routine Services Nonroutine Services Discount Change Labor: Regularprice Lube Job Radiator Flush Transn ssion Flush hours Inspection 10% or Parts: 11020% or The total is: $130.5 Tire Rotation OK CalculateStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started