Anyone up for this?
1. Create a Class called SQAURE. Class will have 2 data members: int length;int width;
2. The SQUARE class will have two member functions. One function will be a Constructor. The other function will have the identifier - Area. And will be used to calculate the area of a square using the formula: AREA = length X width.
3. Create a Dervised Class called BOX. The BOX class will contain a data member; int height;
4. The BOX class will have two member functions. One function will be a Constructor. The other function will have the identifier - Area. And will be used the calculate the Volume of a box using the formula: VOLUME = length X width X height.
5. Write a C++ program that will create two SQUARE objets and two BOX objects. The first of each object will be created using the Constructor functions to value their data members. The second of the SQAURE AND BOX objects will have their data values initalized by teh programmer at the time of their creation.
6. The C++ program will dispaly the Area of each SQAURE object and the Volume of each BOX object.
Post source in reply if you are.