Question: Write a C++ program that writes a command parser that provides a textual input interface to your program. It should create, delete, modify or display

Write a C++ program that writes a command parser that provides a textual input interface to your program. It should create, delete, modify or display shapes to be drawn. Create a database of objects to store the shapes using classes. Also create and maintain dynamically allocated arrays of points to shape objects to keep track of the objects created and deleted. You do not have to draw the shape, just process the command and maintain the database of the shape.

The input and outputs must be only done using C++ streams cin and cout. The input operator and associated functions such as fail() and eof() should be used for all outputs. You cannot use any C-library conversions such as atoi, strtol etc.

Below are the arguments that should be created and what error message should be displayed if incorrectWrite a C++ program that writes a command parser that provides atextual input interface to your program. It should create, delete, modify ordisplay shapes to be drawn. Create a database of objects to storethe shapes using classes. Also create and maintain dynamically allocated arrays of

Command Arguments maxShapes value create move rotate draw draw delete delete Output if Command is Valid New database: max shapes is value Created name: type loc loc size size Moved name to loc loc Rotated name by angle degrees Drew name: type loc loc size size Drew ll shapes Deleted name Deleted all shapes name type loc loc size size name loc loc name angle all name all Command Arguments maxShapes value create move rotate draw draw delete delete Output if Command is Valid New database: max shapes is value Created name: type loc loc size size Moved name to loc loc Rotated name by angle degrees Drew name: type loc loc size size Drew ll shapes Deleted name Deleted all shapes name type loc loc size size name loc loc name angle all name all

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!