Question: Implement the following classes in the UML: 1. Iist class includes: constructor Iist (]) Create an empty list with a maximum length of 100 .
![constructor Iist (]) Create an empty list with a maximum length of](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f51e1110d68_04866f51e10a2b86.jpg)
Implement the following classes in the UML: 1. Iist class includes: constructor Iist (]) Create an empty list with a maximum length of 100 . Hint: double [] 1 ist = new double [100]; constructor Zist (lent int) : Create a List with a user specified maximum length. Hint: double [] 1ist: new double [1en]; add: add a new element to the end of the unsorted list. print: display the list 2. Sortedriat class inciudes two constructors : similar to the constructors in Uist, add: add a new element into the ascending sorted list. 3. FeatProgram: main method creates a genera list (unsorted) and a sorted list with random numbers using add methods; display the unsorted and sorted lists. List -list: double [] -length: int + List() + List(len: int) + add(ele: double) : void + getlist(): double[] + getlength(): int + setLength(int len): void + setList(double[] list):void + print(): void + Sortedlist() + SortedList(len: int) + main(args: String [1): void tadd(ele: double) : void
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
