Menu

[solved]-Hello Need Help C Homework Using Visual Studios Completed Parts 1 4 Stuck 5 10 Tried Coupl Q39001736

Hello! I need help with my C++ homework. I am using VisualStudios.

I have completed parts 1-4 but I am stuck on 5-10. I have trieda couple different methods and haven’t quite gotten it to workright.

Any help is appreciated! Thank You!

1.Create an Empty C++ project.

2. Add a new file to the Project called – main.cpp.

3. Add a class geometric_object (geometric_object.h / .cpp) -This is an abstract class which defines pure virtual methods: a.double get_perimeter() b. double get_area()

4. Add three sub-classes of geometric_object (square, triangle,circle) with appropriate methods and attributes.

5. Dynamically allocate an array of type geometric_objectpointers of the size determined by the user.

6. Iterate up to the number of shapes required and ask the userwhich shape they wish to create (square, triangle, or circle).

7. Based on the user’s choice, instantiate the correct objectwith random values as required and store the object in thearray.

8. Once the array is full, iterate over the array and displaythe perimeter and area for each object.

9. The sub-classes need to override the methods fromgeometric_object.

10. When you are finished, make sure you clean up your allocatedmemory.

Expert Answer


Answer to Hello! I need help with my C++ homework. I am using Visual Studios. I have completed parts 1-4 but I am stuck on 5-10. I… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *