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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, Gaby702
Which is produced by the endocrine system to control how cells and organs function
Answers: 2
image
Computers and Technology, 22.06.2019 11:30, mmimay3501
What do character formats do for your document's message? a. set the tone b. provide organization c. provide clarity d. set how texts align with documents
Answers: 2
image
Computers and Technology, 22.06.2019 15:10, reycaden
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
image
Computers and Technology, 22.06.2019 18:30, emojigirl2824
Word vocabulary words: print, proofread, status line, graphics, font effects, left margin, justification, line spacing, copy/paste, data. review words: font point, bold, save, center, error. fill in the correct word for the definition and then transfer the letters to the appropriate spot by number. some numbers will be found multiple times. you will end up with a quotation about…… what else? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 k 16 17 18 19 20 21 22 23 24 25 8 27 28 29 w 31 32 k 34 35 36 w h 39 40 41 42 8 44 45 46 47 48 49 50 51 52 53 54 55 .1. a software function that records keystrokes on a disk or drive so information can be 5 4 52 9 later retrieved. p n 2. to produce a paper copy of information. 10 7 12u n 3. a display that shows the location of the cursor, pages, etc. 45 46 18 27 36 20 42p4. pictures or images, located in clip art or other files. 6 24 44 28 34 49 555. any mis-stroke of a key. 47 41 48 2 10 n6. allows major changes to the font such as shadow, emboss, etc. 21 25 46 35 23 21 29 14 22 17 n7. a feature that centers lines of text horizontally. 49 53 46 9 51 p8. size of the font 31 16 22 b l 9. a feature that prints designated text darker than the rest to add emphasis. 32 3 . p10. to compare copy on a display screen or printout to the original 24 39 25 23 54 9 50 3 and correct errors. j un 11. a feature that allows text to be aligned at the left 11 12 7 21 16 49 40 46 34 2 and right margins. leftn 12. amount of blank space on the left side of the paper. 8 18 41 6 34 linen 13. number of blank lines between lines of text. 17 4 49 13 1914. any information inputted into the computer. 3 4 46 44 p /p15. feature that duplicates text from one location and places it in another.
Answers: 2
You know the right answer?
When artists have a successful career, there is sometimes the need to collect all their works in an...

Questions in other subjects: