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.
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.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 19RQ
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 4 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
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,