Question: Classes of the code should look like or close to following pattern Output of the code close to following pattern 10:34 AM picasso.cs.qc.edu AT&T Due
10:34 AM picasso.cs.qc.edu AT&T Due to their nature, all projects in this semester must be implemented by Oracle Standard Edition compliant Java. In this semester you wll implement a series of programs involving emulation of management of objects and the runtime stack, leading to emulation of garbage collection in Project 4 Peruse these classes. All the classes whose objects you will maintain and manage are to be subclasses of the root class Obj; examples of parametric binary search trees, Data class, and subclasses PC and Car are included. This project must be implemented by modifying/expanding these template classes. Additional classes may be created to implement some of the functionalities described below; however such classes must not be subclasses of Obj. Implement assignment of object identifiers to Obj objects: All Obj objects must be assigned unique sequential integers from 0 as their object identifiers, to be stored in objld field. Devise a suitable data structure to maintain all the constructed Obj objects; you may use standard Java library classes to implement this. This data structure, together with suitable functions, must support the following operation: For each subclass of Obj, display the total # of its objects followed by a sorted list of their objld values; the subclasses are to be listed in decreasing order of the # of objects. You may find getClass() and getNamd functions useful (I used them). This part of the program must work generically on all Obj objects regardless of what or how many subclasses exist under it. In the main function of MainBST class, implement the following process 1. Construct and insert to an empty binary search tree the following PC objects in the order shown: Smartphone IDcode 001" Laptop Desktop IDcode "d001 Smartphone IDcode002 Laptop Desktop IDcoded002 Smartphone IDcode = "s003" Laptop Desktop IDeoded003 Smartphone IDcode "s004 Laptop Desktop IDcode="d004" IDcode1001" IDcode "1002" 1Dcode "1003" IDcode "1004" The type of this binary search tree must be BST PC 2. Construct and insert to another empty binary search tree the following Car objects in the order shown: Sedan IDcode"se001 Coupe IDcode"co001 Van IDcodeva001" Sedan IDcode"se002" Coupe IDcode = "c0002 van IDcode="va002" Sedan IDcode"e003 Coupe IDcodeCo003 Van IDcode "va003 The type of this binary search tree must be BST
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
