Question: Number 2 Implement the following classes in the UML: 1. List class includes new double [100]; double constructor List): Create an empty list with a

Number 2  Number 2 Implement the following classes in the UML: 1. List

Implement the following classes in the UML: 1. List class includes new double [100]; double constructor List): Create an empty list with a length of 100. Hint: double [] list- constructor List (len add: add a new element to the end of the unsorted list int) list-new double [len]; Create a List with a user specified maximum length. Hint print: display the list 2.SortedList class includes two constructors: similar to the constructors in List, add: add a new element into the ascending sorted list 3.TestProgram: main method creates a genera list (unsorted) and a sorted list with random numbers using add methods; display the unsorted and sorted lists. list: double [I length: int ListO List(len: int) add(ele: double) + getListdouble + getlengthO: int int len):void SortedList print): v TestProgram +main(args: String SortedList0 SortedList(len: int) void

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!