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, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 12:40
Curriculum exam to process a resident's payment, you must click on onesite payments home page. from the a. reports b. my settings o c.transactions o d. rent tab
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