Given UML of class Storeltem name: String price: double code: string - codeNb: int + Storeltem(name: String, price: double, category: String) + getName (): String + getPrice(): double + getCode(): String + setPrice(price : double) + setName(name: String) + calculateSellPrice(quantity: int): double + tostring(): String e class Storeltem with allthe data feld as men hutes pa oute cod reaton ofe eo among all da an Teach sto e1000 and value store item, this code is the mo on of the category of the iteman cuueND attribute. CAGORY san hold onl or CA Wouser, or "Shoe". Default value epresented by category.codeNb on. a t the clas i code and name. methoos O lmplement co GIcuratese - - antity sold as a parameter, or an tem then returns the price antGlying the proper discount. Cop O talcued according to the for ce (quantity price) cc g to the category or aen Discoups determin Forcate hirt", dicc S% rouser", discount is 13% Shoe % ON ONI isCount is 0% wwotTeturns full information about an item Sample r g method. Adidas Shoes, Code: Shoe.1209 Price per item: $115.0 2|Page es): Write a driver class to test the Storeltem class as follows: 3Create a Storeltem object item by reading the name, price and category for the code of tem from the user. s) Print the description of an item. 8) Read from the user the quantity needed to buy the item, then display the sell price accordingly. 1. 2. 3.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question
Given UML of class Se
Storeltem
name: String
price: double
-code: string
- codeNb: int
+ Storeltem(name: String, price: double, category: String)
+ getName (): String
+ getPrice(): double
+ getCode(): String
+ setPrice(price : double)
+ setName(name: String)
+ calculateSellPrice(quantity: int): double
+ toString(): String
e the data Belde
dass Storeltem with all
sas
ment
Dute cod
eo among all class incanco Ge
1000 and value
creat
teach sto
store item, this code is the
mb on of the category of the item and
CAGORYan hold op
CuueNb attribute.
ouser, or "Shoe". Default value
Tor CA
epresented by category.codeNb
on.
at the cla
ase cIor.
OCTOr.
i code
lmplement
c
e and name.
antity sold as a parameter,
or an Rem then returns the price ait lying the proper discount.
calcuatesem
Co
talcued according to the fo
ce (quantity price)
c g to the category or ae
hirt", dise
Discoups determin
For cat
Touser", discount is 13%
Shoea
discount is 0%
Teturns full information about an item
O NIONI
Sample
Or tegE method.
Adidas Shoes, Code: Shoe.1209
Price per item: $115.0
2|Page
esl: Write a driver class to test the Storeltem class as follows:
1.
3) Create a Storeltem object item by reading the name, price and category for the code of
tem from the user.
2.
s) Print the description of an item.
3.
) Read from the user the quantity needed to buy the item, then display the sell price
accordingly.
Transcribed Image Text:Given UML of class Se Storeltem name: String price: double -code: string - codeNb: int + Storeltem(name: String, price: double, category: String) + getName (): String + getPrice(): double + getCode(): String + setPrice(price : double) + setName(name: String) + calculateSellPrice(quantity: int): double + toString(): String e the data Belde dass Storeltem with all sas ment Dute cod eo among all class incanco Ge 1000 and value creat teach sto store item, this code is the mb on of the category of the item and CAGORYan hold op CuueNb attribute. ouser, or "Shoe". Default value Tor CA epresented by category.codeNb on. at the cla ase cIor. OCTOr. i code lmplement c e and name. antity sold as a parameter, or an Rem then returns the price ait lying the proper discount. calcuatesem Co talcued according to the fo ce (quantity price) c g to the category or ae hirt", dise Discoups determin For cat Touser", discount is 13% Shoea discount is 0% Teturns full information about an item O NIONI Sample Or tegE method. Adidas Shoes, Code: Shoe.1209 Price per item: $115.0 2|Page esl: Write a driver class to test the Storeltem class as follows: 1. 3) Create a Storeltem object item by reading the name, price and category for the code of tem from the user. 2. s) Print the description of an item. 3. ) Read from the user the quantity needed to buy the item, then display the sell price accordingly.
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Unreferenced Objects
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,