1. Define a class Figure and use inheritance to defi ne the classes Triangle, Square, Circle, and Rectangle. Provide a container class Frame to contain any number of fi gures, possibly overlapped in position. Provide operations for drawing frames on the screen and for inserting, modifying, and deleting frames and the contents of frames. (Actual drawing is not required).
2. Write a program to represent part as an object. A part can contain other parts as members. Provide operations to list all the required ingredient parts for any given part looking at the deepest of the hierarchy. Provide routines for inserting and removing parts or the information related to parts.