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 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Afashion designer wants to increase awareness about her brand. which network can she use and why she can use the blank to blank her products online. answers for the first blank: internet, extranet, or intranet answers for the second blank: market, design, and export
Answers: 1
question
Computers and Technology, 24.06.2019 03:30
Which explains extrinsic motivation? a)motivation in which there is a reward b)motivation that is personally satisfying c)motivation that is personally meaningful d)motivation in which the subject is interesting
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
Questions on the website: 13722359