Question: Create a C++ project that allows the end user to create objects of different shapes (Line, Square, triangle, rectangle and circle) of varying sizes, on

Create a C++ project that allows the end user to create objects of different shapes (Line, Square, triangle, rectangle and circle) of varying sizes, on screen.

You will create an abstract class Shape to declare a set of generalized attributes and behaviors that apply to all derived classes

Define the relationship among classes by employing Inheritance and Composition wherever applicable. Please make sure that the data is declared as private and handled through getter and setter methods.

Create a class Canvas such that all shapes are drawn on an object of type Canvas.

The driver code will store each object in an array of type Shape. Every time a shape is added to the Canvas or removed from the Canvas, youll update the array.

The user will select an option from the menu:

Display Canvas Data

Add a Shape to Canvas

Delete a Shape from Canvas

Delete All

The option Display Canvas Data prints information of all shapes on the Canvas.

Note: You do not need to draw shapes on Screen.

(USE SEPERATING INTERFACE FROM IMPLEMENTATION TECHNIQUE)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!