Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I really need help with this gui for the automobile program for project 2.. Finally, the Program Core contains the main method. It should generate

I really need help with this gui for the automobile program for project 2.. Finally, the Program Core contains the main method. It should generate the GUI shown below: After entering the information about the Make and Model, its sales price, and selecting the type of the automobile, clicking the Compute Sales Tax button displays the sales tax in the TextField to its right. The default Automobile Type is Other so that radio button in the radio group should be selected. When Other Type is selected the Labels and TextFields for Hybrid and Electric are hidden. [Hints: [Component].setVisible(false).];[Component].setEditable(false)] When Hybrid Type is selected the Miles per Gallon Label and the its TextField display but are hidden if not selected. When Electric Type is selected the Weight in Pounds Label and its TextField display but are hidden if not selected. If non-integer values are entered in any of the fields that require integers, an error message should be displayed in a JOptionPane window and after clicking OK the cursor returns to the same TextField. In addition, the object should be stored in an array of type Automobile. That array should contain at least five automobiles entries/records/rows. Clicking the Clear Fields button should clear all TextFields and hide the Labels and TextField for the Hybrid and Electric Types. Clicking the Display Report button should produce in the output window the information about all the automobiles stored in the array during the processing of the program. An example of the report that should be displayed is shown below:

Make and Model: Toyota Prius Sales

Price: 30000.00

Sales Tax: 1390.00 Vehicle

Type: Hybrid

Vehicle Unique (MPG): 45

Total Cost: 31390.00

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions