Question: This is a C++ assignment, please provide text of code, as well as a screenshot of code output. Thank you! This program will be as

This is a C++ assignment, please provide text of code, as well as a screenshot of code output. Thank you!

This is a C++ assignment, please provide text of code, as well

This program will be as simple as I can make it since you'll have entire classes devoted to it in University. 1. Make Square and Circle classes. 2. Make a base class for both called Shape 3. Two methods:SetSize and GetArea 4. (Size of an edge for square and the radius for circle) 5. Put those two methods where you think they should go. Avoid duplication and make sure Shape is polymorphic To test these classes, do the following 1. Make a vector of Shape pointers 2. (If you haven't ever seen vectors, it's "std::vector shapes; ") 3. Dynamically create some circles and squares and put them in the vector 4. (That's the push_back command.) 5. Loop through vector calling GetArea on each Shape 6. (The actual size of anything doesn't matter. Don't waste your time making a menu and using input though.) 7. Make sure you have no memory leaks Program 2: Polymorphism Criteria Ratings Pts Classes made 2 pts Full Marks O pts No Marks 2 pts Pure virtual Shape 1 pts Full Marks O pts No Marks 1 pts No duplication 3 pts Full Marks O pts No Marks 3 pts Used Vector correctly O pts 2 pts Full Marks No Marks 2 pts GetArca works on a vector of bascclass pointers 3 pts Full Marks O pts No Marks 3 pts

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Ill write a C program that fulfills the requirements The program will define a base class Shape and ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!