Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Following definitions are given, #include #include struct dins {float wid, len, hei; }; class cube { private: float w,l, h; protected: dims getdim ()

image text in transcribedimage text in transcribedC++

Following definitions are given, #include #include struct dins {float wid, len, hei; }; class cube { private: float w,l, h; protected: dims getdim () {dims d; d.wid=w; d.len=l; d.hei=h; return(d); } public: cube (float lg=5, float hg=5, float wd=5){ w=wd;l=lg; h=hg; } void setdim (float lg, float hg, float wd) {l=lg;h=hg; w=wd; } float getvol () {return(1*h*w); } CUBOID height- width length Write an inherited class with name 'cubeplus' using given "cube" class as base class with following conditions, (i) It will be possible to send parameters for initializing length, height and width of cube while defining an object using inherited class. Briefly, it must be possible to send parameters to constructor. (ii) Define a member functions with name 'getmisu. This functions will just return surface area of a side having the minimum surface. (iii) Define another member function with name 'volval which returns the volume of the cube.. (iv) Override a unary --- operator (for both prefix and postfix). This operator will decrease height widht and length of rectangle by half

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

=+j Describe an effective crisis management program.

Answered: 1 week ago