The main objective of this assignment is to give you practice in creating and manipulating linked
lists in C++. In the process, the assignment re-enforces earlier concepts of writing classes with
constructors and the destructor. It also serves as an exercise on dynamic allocation and de-allocation
of data without memory leaks. This is done by writing a program (called \the program” hereafter)
extending your previous lab assignment to represent the Shapes database as a set of linked lists,
but with a simplified set of commands in which there are (mostly) no errors in input.
2 Problem Statement
The assignment consists of two parts. In the first part, you will write a command parser similar
to that of the previous lab. The parser provides a textual input interface to your program. In
contrast to the previous lab, you need not check for errors in the input (with some exceptions).
These commands create shapes, create groups of shapes, move shapes across groups and delete
Each command consists of an operation keyword followed by arguments. The command and
the arguments are separated by one or more spaces. Thus, the code you will write for this part
of the assignment should take input from the standard input, parse it, and print responses. The
command parser loops, processing input as long as input is available.
In the second part of the assignment, you will implement a linked list based data structure to
serve as a simple \database” of objects that store the created shapes. To do so, you will implement
several classes: Shape, ShapeNode, ShapeList, GroupNode and GroupList.
Similar to the previous lab, it is important that you follow the specifications below carefully. Where
the specification says shall or must (or their negatives), following the instruction is required to
receive credit for the assignment. If instead it says may or can, these are optional suggestions.
The use of should indicates a recommendation; compliance is not specifically required. However,
some of the recommendations may hint at a known-good way to do something or pertain to good
Example input and output for the program are provided in Section 4 for your convenience.
They do not cover all parts of the specification. You are responsible for making sure your program
meets the specification by reading and applying the description below.
3.1 Coding Requirements
1. The code you will write shall be contained in only the source files named Parser.cpp,
Shape.cpp, ShapeNode.cpp, ShapeList.cpp, GroupNode.cpp and GroupList.cpp. Skele