Question: Create a class named Purchase that contains Fields for an invoice number, sales amount, sales tax amount and the number of items. Choose an appropriate

Create a class named Purchase that contains Fields for an invoice number, sales amount, sales tax amount and the number of items. Choose an appropriate data type for each of the fields. A default constructor. A parameterized constructor that accept invoice number, sales amount and number of items. Required properties. A ToString() method to display information. A method CalculateSalesTax() to calculate sales tax amount as 5% of the sales amount. A method CalculateShippingCharges() to calculate shipping charges based on the number of items purchased. Use the following information to determine the shipping charges: Fewer than 3 items ------------ $3.50 3 to 6 items --------------------- $5.00 7 to 10 items -------------------- $7.00 More than 10 items ------------ $10.00

Create another class named PurchaseApp. This class allows the user to input data including invoice number, sales amount and number of items purchased. Note: Sales tax amount will be calculated using CalculateSalesTax() method. When you prompt for an invoice number, do not let the user proceed until a valid invoice number between 1000 and 9000 has been entered. CSIS-1175-002 (Midterm) 2 | P a g e When you prompt for a sale amount, do not let the user proceed until the user has entered a nonnegative value. Create at least two objects of the Purchase class. Display invoice number, sales amount, sales tax rate, sales tax amount, shipping charges and total amount for each of the objects as shown in the sample output. Note: Dont forget to add comments. More methods can also be created in PurchaseApp class if needed.

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!