Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

image text in transcribed

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.

image text in transcribed

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

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions