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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started