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.
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.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 2PE
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.
- 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.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT