Question: Part II: ArrayList and Inheritance [40 points] Question 1 [20 points] Implement the class Audio only. The code of the classes Disk and Video is
![Part II: ArrayList and Inheritance [40 points] Question 1 [20 points]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f45443d6fe6_38766f454434f206.jpg)

Part II: ArrayList and Inheritance [40 points] Question 1 [20 points] Implement the class Audio only. The code of the classes Disk and Video is provided below. Disk -title: String -play Time: int // in minutes + Disk(title: String, playTime: int) + getters + toString(): String Audio -artist: String - tracksList: ArrayList + Audio(artist: String, ti: String, pTime: int) + getArtist(): String + getTracks List(): ArrayList + addTrack(name: String): void +removeTrack(name: String): void + toString(: String Video - director: String - description: String + Video(dir: String, desc: String, ti: String, pTime: int) + toString(): String A. The Disk class is the super class. The code is below: public class Disk 1 private String title; private int playTime; Question 2 [20 points] Write a client class (application) in which you: a) Create an array of 10 disks (not an ArrayList). Write code to insert one audio and one video in the array. The values of these two objects are given by the programmer. Assume the remaining cells of the array D are filled with audio and video objects. b) Write code that displays the director of each video disk in D. c) Write code that adds one track named "Hello" to the first audio in the array D. Note: You have to search for the first audio disk and not assume it is in cell 0 or 1. d) Prompt the user to enter a track name as a String. Then, display whether the name is found among the audio disks in the array or not. You need to check the trackslist of cach audio disk in the array D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
