subject

Your objective for this project is to implement an abstract parent Shape class and its polymorphic children Circle, Rectangle, and Triangle. Shape is a 2D character array which requires the use of dynamic memory allocation, and its children are their eponymous shapes held character-by-character within that 2D array. Additionally, each shape is represented by its perimeter populated by ASCII characters within the range [48, 126] in order, and character choice from this range wraps around back to 48 when 127 is reached. In order to successfully complete this project, you must understand the prerequisite material from the previous projects, and you must understand the concepts of 2D arrays, abstract classes, polymorphism, and basic shape manipulations. Task 1
Define and implement the abstract class Shape, which contains the following methods:
// Parameterized Constructor; there is no default constructor
Shape(const int &width, const int &height);
// Getters
int getEdges();
int getWidth();
int getHeight();
char **getDisplayChars();
// Setters
void setEdges(const int& edges);
void setWidth(const int& new_width);
void setHeight(const int &new_height);
void setDisplayChars(char **display);
// Mutators
void rotateRight(); //rotate by 90 degrees
void rotateLeft(); //rotate by 90 degrees
void reflect(char axis); //reflect over x or y axis
// Pure Virtual Methods (no implementation)
virtual double getSurfaceArea() = 0;
virtual double get3DVolume(const double& depth) = 0;
// Display - //iterate through 2D array and print chars
void display();

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
question
Computers and Technology, 24.06.2019 06:00
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
In three to five sentences, describe how you can organize written information logically and sequentially
Answers: 1
question
Computers and Technology, 25.06.2019 08:20
The internet backbone is a foundation network linked with
Answers: 1
You know the right answer?
Your objective for this project is to implement an abstract parent Shape class and its polymorphic c...
Questions
question
Mathematics, 02.12.2020 07:50
question
Mathematics, 02.12.2020 07:50
question
Mathematics, 02.12.2020 07:50
question
Mathematics, 02.12.2020 07:50
question
English, 02.12.2020 07:50
question
Biology, 02.12.2020 07:50
question
Mathematics, 02.12.2020 07:50
Questions on the website: 13722359