Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class named Purchase. Each Purchase contains an invoice number, amount of sale, and amount of sale tax. Include set methods for invoice number

image text in transcribed

Create a class named Purchase. Each Purchase contains an invoice number, amount of sale, and amount of sale tax. Include set methods for invoice number and sale amount Within set() method for the sale amount, calculate the sale tax as 7% of the sale amount. Also include a display method that displays a purchase details, Save as Purchase.java. Create an application that declares a Purchase object and prompts the user for a purchase details When you prompt for an invoice number, do not let the user proceed until a number between a number between 1000 and 8,000 has been entered. When you prompt for a sale amount, do not proceed until the user has entered a non-negative value. After a valid Purchase object has been created, display the object's invoice number, sale amount and sales tax Save as CreatePurchase.java. In the java files. add the comments to code blocks and statements explaining their scope and functionality in CreatePurchase.java - add the proper header for this application Submit one Word document with the screenshots of the test runs and your explanation and comments on your solution. Zip the doc file and two java files in the same zip archive and submit it as your deliverable

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

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

4. Identify the challenges facing todays organizations

Answered: 1 week ago