Question
C++ thanks Create two files, shape.hpp and shape.cpp, define a Shape class. Heres the start should use class Shape { private: std::string name; std::string color;
C++ thanks
Create two files, shape.hpp and shape.cpp, define a Shape class. Heres the start should use
class Shape {
private:
std::string name;
std::string color;
public:};
class should also have constructors, accessors, and mutators, as appropriate. In addition, your class should have an area() method for computing the shapes area. For this generic Shape class, the area() method can simply return 0, since we arent actually defining the shape itself. Create a new file application.cpp. In this file, write a simple main()function that instantiates some Shape objects and prints out their information.
Step 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