Question: Write a program that starts off with an empty Data object. Then your program should start reading in uppercase characters. Each character will correspond to

Write a program that starts off with an empty Data object. Then your program should start reading in uppercase characters. Each character will correspond to a command and some commands will have arguments while others will not. If a command has an argument, it will follow the character on the same line, separated by a space. The commands are as follows:

A r - add a circle of radius r to the Data object

R i - remove the object at index i from the Data object

S - sort the Data object

P - print the Data object

D - destroy the Data object

Q - terminate program

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!