Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in java plz B. The Audio class inherits from the class Disk. It has as data a String artist and an array list tracksList to

in java plz image text in transcribed
image text in transcribed
B. The Audio class inherits from the class Disk. It has as data a String artist and an array list tracksList to store the names of the tracks. This class has: A constructor that initializes all attributes and creates the tracksList. The getter methods for the attributes. addTrack method that takes as parameter the name of the track ( to be added to the array list. removeTrack method that takes as parameter the name of the track to be deleted from the array list. A toString() method that overrides the toString() method in the Disk class by adding the data fields of the Audio class in the form shown below. The toString returns: "Title: " + title + " Play time: " + playtime: "Artist name: " + artist + " List of tracks: "; "track 1:"+ nameOfTrackl; "track 2:"+ nameOfTrack2; "track 3:"+ nameOfTrack3; etc.. C. The Video class inherits from the class Disk. The code is below: public class Video extends Disk private String director; private String description; public Video (String director, String description, String title, int playTime) super (title, playtime); this.director = director; this.description = description; } public String toString() { String result = super.toString() + " Video Director =" + director + " Description = " + description; return result; } Disk -title: String - playTime: 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 + getTracksList(): ArrayList + addTrack(name: String): void + remove Track(name: String): void + toString(): String Video - director: String - description: String + Video(dir: String, dese: String, ti: String, pTime: int) +toString(: String +

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why are the ORG and END directives also called pseudocode?

Answered: 1 week ago