Define a class Clothing in C++ …

CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Define a class Clothing in C++ with the following descriptions:
Private Members:
Code. Of type string
Type. Of type string
Size. Of type integer
Material. Of type string
Price. Of type float
A function Calc_Price() which calculates and assigns the value of GPrice as follows:
For the value of Material as"COTTON":
Type. Price (Rs)
TROUSER. 1500
SHIRT. 1200
For Material other than "COTTON" the above mentioned price gets reduced by 25%.
Public Members :
A constructor to assign initial values of code, Type and Material with the word "NOT AS-SIGNED" and Size and price with 0.
A function Enter() to input the values of the data members Code, Type ,Size and Material and invoke the Calc_Price() function.
A function Show() which displays the content of all the data members for a Clotting.
Posted by Anjila Grover 5 years, 8 months ago
- 0 answers
ANSWER
Related Questions
Posted by Prawar Narang 1 year, 7 months ago
- 1 answers
Posted by Hanni Pham 1 year, 5 months ago
- 1 answers
Posted by Syedali Fathima 1 year, 6 months ago
- 1 answers
Posted by Hanni Pham 1 year, 5 months ago
- 0 answers
Posted by Priya Shukla 1 year, 6 months ago
- 1 answers
Posted by Kandeepan Jothivel 1 year, 7 months ago
- 2 answers

myCBSEguide
Trusted by 1 Crore+ Students

Test Generator
Create papers online. It's FREE.

CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
myCBSEguide