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, 22.06.2019 05:00
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
question
Computers and Technology, 23.06.2019 19:50
Which feature is selected to practice and save the timing of a presentation
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
Answers: 1
question
Computers and Technology, 24.06.2019 13:50
What does code do? a creates a text box that says "solid black" b creates a black border of any width c creates a black border 1 pixel wide
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, 11.05.2021 20:40
question
Mathematics, 11.05.2021 20:40
question
Spanish, 11.05.2021 20:40
question
Mathematics, 11.05.2021 20:40
Questions on the website: 13722363