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, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Examine the list below. which factors positively affect lifetime income? check all that apply.
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
Questions on the website: 13722362