Answered step by step
Verified Expert Solution
Question
1 Approved Answer
it should be implemented using C++ programing language Create a class to describe a bottle. - material : {glass, plastic, aluminum} - capacity, double (in
it should be implemented using C++ programing language
Create a class to describe a bottle. - material : {"glass", "plastic", "aluminum"} - capacity, double (in ml) : [from 250 to 20010 in multiples of 80) - contents, double {O to capacity} Constructor, get and set (with validation) Overload: - stream insertion (list); - Stream extraction (in 1); - operator+= and operator-= (on content up/down by argument); checking resulting content, don't do anything if invalid - operator++; post and pre (on content up by 80); checking resulting content, don't do anything if invalid - operator-, post and pre (on content down by 80); checking resulting content, don't do anything if invalid Driver: - 1 full 330ml coke can; - 1 half-empty, 1050ml wine bottle, - 1 empty, 20010 plastic water bottle - 2 default and use stream extraction to read values in - Put everything in an array and then output all of them (using a for loop) - Use another for loop and Use both operator++ in cout calls (cout > object--, cout > object--, coutStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started