subject

When artists have a successful career, there is sometimes the need to collect all their works in an anthology album. Given main() and a base Album class, define a derived class called BoxSet. Within the derived Album class, define a printInfo() method that overrides the Album class' printInfo() method by printing not only the title, author, publisher, and publication date, but also whether it is the complete works, and number of discs. Ex. If the input is:
Master of Puppets
Metallica
Elektra
1986
The Complete Studio Albums
Creedence Clearwater Revival
Fantasy
27 Oct 2014
true
7
the output is:
Album Information:
Album Title: Master of Puppets
Author: Metallica
Publisher: Elektra
Publication Date: 1986
Album Information:
Album Title: The Complete Studio Albums
Author: Creedence Clearwater Revival
Publisher: Fantasy
Publication Date: 27 Oct 2014
Is Complete Works? true
Number of Discs: 7
AlbumInformation. java
import java. util. Scanner;
public class AlbumInformation {
public static void main(String[] args) {
Scanner scnr = new Scanner(System. in);
Album myAlbum = new Album();
BoxSet myBoxSet = new BoxSet();
String title, author, publisher, publicationDate;
String bTitle, bAuthor, bPublisher, bPublicationDate;
boolean isCompleteWorks;
int numDiscs;
title = scnr. nextLine();
author = scnr. nextLine();
publisher = scnr. nextLine();
publicationDate = scnr. nextLine();
bTitle = scnr. nextLine();
bAuthor = scnr. nextLine();
bPublisher = scnr. nextLine();
bPublicationDate = scnr. nextLine();
isCompleteWorks = scnr. nextBoolean();
numDiscs = scnr. nextInt();
myAlbum. setTitle(title);
myAlbum. setAuthor(author);
myAlbum. setPublisher(publisher);
myAlbum. setPublicationDate(publicationDate) ;
myAlbum. printInfo();
myBoxSet. setTitle(bTitle);
myBoxSet. setAuthor(bAuthor);
myBoxSet. setPublisher(bPublisher);
myBoxSet. setPublicationDate(bPublicationDate );
myBoxSet. setIsCompleteWorks(isCompleteWorks) ;
myBoxSet. setNumDiscs(numDiscs);
myBoxSet. printInfo();
}
}
Album. java
public class Album {
protected String title;
protected String author;
protected String publisher;
protected String publicationDate;
public void setTitle(String userTitle) {
title = userTitle;
}
public String getTitle() {
return title;
}
public void setAuthor(String userAuthor) {
author = userAuthor;
}
public String getAuthor(){
return author;
}
public void setPublisher(String userPublisher) {
publisher = userPublisher;
}
public String getPublisher() {
return publisher;
}
public void setPublicationDate(String userPublicationDate) {
publicationDate = userPublicationDate;
}
public String getPublicationDate() {
return publicationDate;
}
public void printInfo() {
System. out. println("Album Information: ");
System. out. println(" Album Title: " + title);
System. out. println(" Author: " + author);
System. out. println(" Publisher: " + publisher);
System. out. println(" Publication Date: " + publicationDate);
}
}
BosSet. java
public class BoxSet extends Album {
// TODO: Declare private fields: isCompleteWorks, numDiscs
// TODO: Define mutator methods -
// setIsCompleteWorks(), setNumDiscs()
// TODO: Define accessor methods -
// getIsCompleteWorks(), getNumDiscs()

// TODO: Define a printInfo() method that overrides
// the printInfo in Album class

}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 11:00
In three to five sentences, describe how you can organize written information logically and sequentially
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
question
Computers and Technology, 24.06.2019 15:30
George is working as a programming team lead. which statements correctly describe the skills that he requires?
Answers: 3
question
Computers and Technology, 24.06.2019 15:40
In the above figure, what type of cylinder arrangement is shown in the figure above? a. l-type b. v-type c. in-line d. horizontal pls make sure its right if its rong im grounded for 3months
Answers: 1
You know the right answer?
When artists have a successful career, there is sometimes the need to collect all their works in an...
Questions
question
Mathematics, 15.02.2022 14:00
question
Mathematics, 15.02.2022 14:00
question
English, 15.02.2022 14:00
question
Chemistry, 15.02.2022 14:00
question
Mathematics, 15.02.2022 14:00
question
Biology, 15.02.2022 14:00
Questions on the website: 13722363