Question
In this program assignment, you are requested to implement following shapes using structures and classes: Shape type Attributes Methods Relationship comments Point Integer type: x-coordinate,
In this program assignment, you are requested to implement following shapes using structures and classes:
Shape type | Attributes | Methods | Relationship | comments |
Point | Integer type: x-coordinate, y-coordinate | None | Both (x, y) coordinate attributes are publicly accessible | |
Shape | Point: reference point Double: area, circumference Char: line type (*, _, +, =, ...) |
| Base class | Abstract class |
Rectangle | Integers: width, height char: lineType |
| Inherits from Shape | |
Square | None |
| Inherits from Rectangle | |
Triangle | Integers: base, height |
| Inherits from Shape | The shape of the triangle will be determined by the sizes of base and height |
Circle | Integer: radius |
| Inherits from Shape |
|
In your test driver program, the following should be demonstrated:
- Draw similar to the following shapes of your own sizes.
O * * * * * * * ********* ********* * * * * * * * * * * * * * * * * * * ********* (.........)(.........) ********************************** * * * * * * **********************************
- Display the area and circumference of each shape of the picture above
- Total area and circumference of all shapes in the picture
Deliverable:
- A separate .h and .cpp files for each shape class (total 13 files, 6 .h + 6.cpp + main driver) in a zip file and plain old text file format
- A makefile
- Output in a text file format (no .jpg picture will be accepted)
Extra Credit Points (5 - 10 points) : [TBA]
PLEASE ANSWER THIS IN C++!!! PLEASE TAKE YOUR TIME WITH THIS, NO NEED TO RUSH THIS!!! PLEASE READ THE DIRECTIONS CAREFULLY!! WHOEVER ANSWERS THIS THANK YOU SOOO MUCH!!!
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