An online retailer sells six  products whose prices are as follows: key description price 1 Hat 9.99 2 Coat 69.99 3     Jacket 49.99 4 Ball 2.92 5 Club 21.97 6 Marker .99 Your task will be to generate a sales receipt for the item sold which will include  the item key, item description, item price,  quantity ordered and the item extended price.   Part One: Write well-formed SalesItem class.  Instance variables Key: String Description: String Price: double Quantity: integer   Constructors Default data will be all zeros except product which will be null Full arguments Get and Set methods ToString The SalesItem class must be defined in its own file.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question

An online retailer sells six  products whose prices are as follows:

key

description

price

1

Hat

9.99

2

Coat

69.99

3

    Jacket

49.99

4

Ball

2.92

5

Club

21.97

6

Marker

.99


Your task will be to generate a sales receipt for the item sold which will include  the item key, item description, item price,  quantity ordered and the item extended price.

 

Part One: Write well-formed SalesItem class. 

  1. Instance variables
    1. Key: String
    2. Description: String
    3. Price: double
    4. Quantity: integer  
  2. Constructors
    1. Default data will be all zeros except product which will be null
    2. Full arguments
  3. Get and Set methods
  4. ToString
  5. The SalesItem class must be defined in its own file.

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
void method
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,