Question
Hello guys, can anybody help me, i did all of the classes but i'm stuck with the The Test class can you solve it
Hello guys, can anybody help me, i did all of the classes but i'm stuck with the " The Test class" can you solve it for me?
this is my code so far,
public class Item { private String title; private boolean hasIt; private String comments; private int playingTime; public Item (){ this.title =""; this.comments= ""; this.playingTime =0; }
public Item(String title, boolean hasIt, String comments, int playingTime) { this.title = title; this.hasIt = hasIt; this.comments = comments; this.playingTime = playingTime; }
public String getTitle() { return title; }
public boolean isHasIt() { return hasIt; }
public String getComments() { return comments; }
public int getPlayingTime() { return playingTime; }
public void setTitle(String title) { this.title = title; }
public void setHasIt(boolean hasIt) { this.hasIt = hasIt; }
public void setComments(String comments) { this.comments = comments; }
public void setPlayingTime(int playingTime) { this.playingTime = playingTime; }
@Override public String toString() { return "Item{" + "title=" + title + ", hasIt=" + hasIt + ", comments=" + comments + ", playingTime=" + playingTime + '}'; } }
public class CD extends Item{ private String artist; private int NumberOfTracks;
public CD(){ super(); this.artist=""; this.NumberOfTracks=0; } public CD(String artist, int NumberOfTracks, String title, boolean hasIt, String comments, int playingTime) { super(title, hasIt, comments, playingTime); this.artist = artist; this.NumberOfTracks = NumberOfTracks; }
public void setArtist(String artist) { this.artist = artist; }
public void setNumberOfTracks(int NumberOfTracks) { this.NumberOfTracks = NumberOfTracks; }
public String getArtist() { return artist; }
public int getNumberOfTracks() { return NumberOfTracks; } }
public class Video extends CD { private String director; public Video (){ super(); director =""; }
public Video(String director, String artist, int NumberOfTracks, String title, boolean hasIt, String comments, int playingTime) { super(artist, NumberOfTracks, title, hasIt, comments, playingTime); this.director = director; }
public String getDirector() { return director; }
public void setDirector(String director) { this.director = director; } }
public class DataBase { ArrayList thanks,,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started