Note: You must use the JOptionPane class for input/output. Additionally, if you use System.exit as shown in the textbook, it may only be used as the absolute last line in the program. You may not use System.exit, or any variant that exits the program in the middle of the program. The program should be designed to only exit once the algorithm has finished.

Scenario:

 

XYZ auto dealership is asking you to write a program that will keep track of their vehicle information and calculate the sales discount on vehicles. There are a maximum of 50 vehicles. For each vehicle the program should prompt the user for the make, model, body style, year of the manufacture and price of the vehicle. Vehicle’s body style needs to be one of the following: {Small, Medium, Full size, Luxury}. The sales discount for a vehicle should be computed based on the it’s body style and the year of manufacture as given in the table below. No discount is given if the vehicle is older than 2010.

 

Year of Manufacture Body Style
Small Medium Full Size Luxury
2015 6.2% 6.5% 10% 7.2%
2014 2.7% 4.5% 5% 6%
2013 8.4% 3.9% 4.5% 5%
2012 4.6% 2.9% 3.3% 4.5%
2011 8.2% 2.5% 3% 3.5%
2010 8% 2.0% 2.5% 5%

 

You need to create a modular solution that will repeatedly prompt the user for all the vehicles information until the user is finished. You must store the table in your program using a multi-dimensional Array. Then, calculate the discount amount and discounted sales price for the vehicles by retrieving information from the array. Your program must allow the user to search vehicles by make and year of manufactures. For example, if you search by make and user input is “Toyota”, then the program will show you all the Toyota vehicles with their models, year of manufactures, discounts and sales price.

 

At the end, the program should generate a well-formatted report containing all the vehicles details including the discounted price. The report should also include total vehicles and total discount amount over all the vehicles.

 

Hints:

 

  • There are a number of validations that must occur. Think about what type of validation might be appropriate and make sure these are all handled. Don’t forget about what you learned about data validation. When invalid data is entered, the user must be provided with an error message and then re-prompted for the data.

 

 

Other Requirements:

  • Your solution must be designed as a modular programming other than a mainline, with each module performing only one task. The mainline should contain only a very minimal amount of logic, calling modules instead.
  • Your solution must demonstrate the concept of multi-dimensional arrays.
  • Your solution must not import any Java library other than JOptionPane, including java.util.Arrays

Programming Assignment 9: Solution Design

 

  • Create a defining diagram that shows the input, processing, and output
  • Create a solution algorithm using pseudocode
  • Show testing using the desk checking table method, to include test data, expected results, and a desk checking table. Make sure your desk checking considers multiple cases including both valid and invalid test data to prove your algorithm will work in all cases

 

Upload a Word document containing only items above to Blackboard.

 

Grading Criteria
Requirement Points
Defining Diagram with input, processing, and output 40
Efficient Solution Algorithm 40
Thorough Desk Checking Table including test data, and expected results 20

 

 

 

Programming Assignment 10: Solution Implementation

 

Write a well-documented, efficient Java program that implements the algorithm you identified. Include appropriate documentation as identified in the documentation expectations document.

 

Note: You must use the JOptionPane class for input/output. Additionally, if you use System.exit as shown in the textbook, it may only be used as the absolute last line in the program. You may not use System.exit, or any variant that exits the program in the middle of the program. The program should be designed to only exit once the algorithm has finished.

 

Upload the .java file of the final program to Blackboard. Be careful that you do not submit a .class file instead of a .java file.

Your program must successfully compile using jGrasp. Partial credit is available. Any final program that does not compile, for any reason, will receive an automatic zero. Other IDEs often place in additional code that you are unaware of, doing too much of the work for you. You are strongly discouraged from using IDEs other than jGrasp.

 

Grading Criteria
Requirement Points
Implementation of Java Program, using efficient practices where appropriate, such as the use

of constants, good variable names, no redundant code, etc.

70
Appropriate objective-style documentation 10
Appropriate intermediate comments 20

 

 

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!