Question: create a Java CLI application that enables a store owner to enter sales information in order to produce a detailed invoice. The store owner will

create a Java CLI application that enables a store owner to enter sales information in order to produce a detailed invoice.

The store owner will enter the invoice number, name of the item, and amount of sale. In turn, the application will create the invoice number, check the item name, calculate sales tax and output the invoice with all pertinent information to include the final bill.

Lab Parameters

  • Create a class named "Purchase" (The Purchase.java file used to create the objects). Each Purchaseobject contains following:
    • The name of the item (private attribute)
    • An invoice number (private attribute)
    • An amount of sale (private attribute)
    • An amount of sales tax (private attribute)
    • A getter/setter method for the invoice number (public method)
    • A getter/setter method for sale amount (public method)
    • A getter/setter method for the item name (public method)
    • Within the setter of sale amount, calculate the sales tax as 6% of the sale amount.
    • A display method that outputs purchase's details.
    • Note: Use of constructor(s) is optional.
  • Create an application class CreatePurchase.java that instantiates the Purchase object and prompts the users for purchase details. Notice some requirements:
    • DO NOT let the user proceed until a number between 1000 and 8000 has been entered.
    • DO NOT let the user proceed until a non-negative value is entered for the sale amount.
    • Include a means to limit item names to at least five different specific item names

create a Java CLI application that enables a store owner to enter

sales information in order to produce a detailed invoice. The store owner

4. 8-Track Player 5. Record Player 1ten Selection: Please enter the invoice number >> Please enter the total sales amount >> I NVOICE The Audio Warehouse 4432 Anplifier Lane Grand Rapids, HI 49508 616-800-1010 Iten Nane Invoice Number 3456 Sales Anount Sales Tax Grand Total: VHS Player 557.00 52.85 $59.85 Generate another invoice? (Y/N) > Please choose an iten: 1. CD Player 2. Cassette Player 3. VHS Player 4. 8-Track Player 5. Record Player Iten Selection Please select an item 1-5 Iten 5election: Please enter the invoice number >> Enter an invoice number between 1000 and 8000> Please enter the tota sales amount $ INVOICE The Audio Warehouse 4432 Anplifier Lane Grand Rapids, MI 4950 616-800-1010 Cassette Player Iten Nane Invoice Number: 4444 Sales Amount Sales Tax Grand Total: 50.00 $0.00 $0.00 Generate another invoice? (Y/N) >> Item Selection Please enter the invoice number >3 Please enter the total sales anount INVOICE The 4432 Amplifier Lane Grand Rapids, HI 49508 616-800-1010 Audio Warehouse Item Name Invoice Number: Sales Amount: Sales Tax Grand Total: VHS Player 3456 $57.00 $59.85 Generate another invoice? (Y/N) Please choose an item: 1. CD Player 2. Cassette Player 3. VHS Player 4. 8-Track Player 5. Record Player Item Selection Please select an item 1 5 Item Selection Please enter the invoice number >> Enter an invoice number between 1000 and 8000 Please enter the total sales anount

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!