Question: Please do the following enhancements. Enhance the program by displaying a menu that asks the user how they want to sort the services menu. 1)

 Please do the following enhancements. Enhance the program by displaying a

Please do the following enhancements.

Enhance the program by displaying a menu that asks the user how they want to sort the services menu. 1) Sort by Invoice, 2) Sort by Amount of Sale, 3) Sort by Sales Tax, or 0) to Exit. Add a do...while() loop that keeps prompting the user for the next preferred sort order until the user finally chooses 0 to exit.

Do not do the problem below, for reference only.

menu that asks the user how they want to sort the services

In the exercises in Chapter 6, you created a class named Purchase. Each Purchase contains an invoice number, amount of sale, amount of sales tax, and several methods. Add get methods for the invoice number and sale amount fields so their values can be used in comparisons. Next write a program that declares an array of five Purchase objects and prompt a user for their values. Then, in a loop that continues until a user inputs a sentinel value, ask the user whether the Purchase objects should be sorted and displayed in invoice number order or sale amount order. Save the file as SortPurchasesArray.java

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!