Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java jGrasp Note: I don't think it's actually a scanner a program that keeps track of sales and returns are recorded. Sale, transactions in

In java jGrasp
Note: I don't think it's actually a scanner image text in transcribed
a program that keeps track of sales and returns are recorded. Sale, transactions in a large department store. Both inheritance Return are used in the program, related in the following Transaction The Transaction class is defined below publie elaas Transact tion private string myDeacription: private int e myrt Public static final double Tax RA -0.07 //constructor pubiie Transactions (string deacription, int numrtens. double itencea t) my Description deacription public string getDescription return myneseriptioni lie int geeNumIeeman CJ return Nun Items a publie double getrtemoost return myitemoos e getTotal public double cost myNumrtemB double tax cost TAX RATE return cost tax (a) Write the code for the sale class. Each sale includes v. A description of the item being sold. The number of the items being sold The cost of this item Whether the sale is cash or credit, stored as a boolean variable A 10 percent discount for cash with 10 percent stored as a final variable When a new sale is created, it must be assigned an item description, the number being sold, the cost of this item, and whether the sale is cash or credit. Operations on a sale include the following: Retrieve the description of the item being sold. Scanner Retrieve the quantity of the item being sold. Retrieve the cost of the item being sold. Retrieve whether the sale is cash or credit. Calculate the total for the sale. In calculating this total, a 10% discount for paying cash should be applied to the cost before the tax is calculated

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

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions