In this exercise, you complete a program that uses the Square class shown in Figure 15-6 in

Question:

In this exercise, you complete a program that uses the Square class shown in Figure 15-6 in the chapter. Follow the instructions for starting C++ and viewing the Introductory13.cpp file, which is contained in either the Cpp8\Chap15\Introductory13 Project folder or the Cpp8\Chap15 folder. (Depending on your C++ development tool, you may need to open this exercise’s project/solution file first.) Enter the Square class definition from Figure 15-6 in the Introductory13 Square.h file. Next, complete the Introductory13.cpp file by entering the appropriate instructions. Use the comments as a guide. Test the program appropriately. 


1 //Square.h 2 //Created/revised by  on  3 4 //declaration section 5 class Square 6 { 7 public: Square(); void setSide (double); double getSide(); double calcArea(); 8 10 11 12 private: double side; 14 }; 13 15 16 //implementation section 17 Square::Square() 18 { 19 side - 0.0; 20

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: