Peruse all java classes from the attach. 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 assingment 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 objId 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 objId values; the subclasses are to be listed in decreasing order of the # of objects. You may find getClass() and getName() 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 into an empty binary search tree the following PC objects cumulatively in the order shown:
Smartphone IDcode = "s001"
Laptop IDcode = "l001"
Desktop IDcode = "d001"
Smartphone IDcode = "s002"
Laptop IDcode = "l002"
Desktop IDcode = "d002"
Smartphone IDcode = "s003"
Laptop IDcode = "l003"
Desktop IDcode = "d003"
Smartphone IDcode = "s004"
Laptop IDcode = "l004"
Desktop IDcode = "d004"
The type of this binary search tree must be BST.

 

Doing a similar assignment? Save your time and hire our Genuine Essay Writers to do your task. Get 15% Discount on your 1st order. Use code: FREE15