Question: Using C++ 29. Write a class declaration named Square with a private member variable named side. 10 points i) Write set and get functions to
29. Write a class declaration named Square with a private member variable named side. 10 points i) Write set and get functions to access the side variable i) and a pubilie member finction named getArea that returns the area of square. Area of square is calculated as: side*side. ii) Define a default constructor that initialize the side member to 0. iv) Define an overloaded constructor that accept an argument and assigr its value to the side member variable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
