Question
After entering the information about the make and model, its sales price and the type of the automobile, clicking the Compute Sales Tax button should
After entering the information about the make and model, its sales price and the type of the automobile, clicking the Compute Sales Tax button should display the sales tax in the text field to its right. In addition, the object should be stored in an array of type Automobile. That array should allow space for up to the last five automobiles entered. If non integer values are entering in any of the fields that require integers, an error message should be displayed in a JOptionPane window. Clicking the Clear Fields button should clear all text fields. Clicking the Display Report button should produce a report on the console that includes the information about all the automobiles currently stored in the array. An example of the report that should be displayed is shown below: Make and Model: Toyota Prius Sales Price: 30000 Sales Tax: 1390.00 Hybrid Vehicle MPG: 45 Make and Model: Ford Fusion Sales Price: 21000 Sales Tax: 1050.00 Be sure to follow good programming style, which means making all instance variables private, naming all constants and avoiding the duplication of code. Furthermore you must select enough different kinds of automobiles to completely test the program.
After entering the information about the make and model, its sales price and the type of the automobile, clicking the Compute Sales Tax button should display the sales tax in the text field to its right. In addition, the object should be stored in an array of type Automobile. That array should allow space for up to the last five automobiles entered.
Step 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