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, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
question
Computers and Technology, 24.06.2019 08:50
Write a program that will compute the volume of ice cream served in a cone. as you can see in the diagram below, the ice cream is served as a hemisphere of frozen deliciousness on top of a cone, which is also packed with frozen deliciousness. thus, the total volume of ice cream sold is the volume of the hemisphere plus the volume of the cone. the example shows an ice cream cone in which the hemisphere and cone have a radius of 10 inches and the cone has a height of 15 inches. your program must instead prompt for these two values, which are taken from the keyboard as integers: • the hemisphere/cone radius in inches, and
Answers: 3
question
Computers and Technology, 25.06.2019 02:30
What are the charges for invasion of privacy on computers
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
History, 21.04.2020 00:56
question
Mathematics, 21.04.2020 00:56
question
English, 21.04.2020 00:56