Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

See attached photos for the question.

Do it in Java Language!

[画像:eritance L x Collapse Inheritance -> Lab - Inheritance Inheritance Lab Challenge Problem In the IDE to the left, the class MP3 is already defined. Use this class to do the following things: Create the class Podcast that inherits from H93 • Override the constructor such that the podcast has the following attributes: • name - a string that is the name of the podcast | title -a string that is the title of the episode • length - an integer that has the length of the podcast in seconds genre - a string that is the genre of the podcast • date - a string that represents when the podcast was released to the public Expected Output Declare an instance of the Podcast class as shown below. // add code below this line Podcast p - new Podcast("Planet Money", "Hollywood"s Black List", 146e, "econon // add code above this line The table below shows the method calls (left) and the output (right). Your class will be expected to work with all of these method calls. Method Call Return Value System.out.println(p.displayName()); The name is Planet Money System.out.printin(p.displayTitle()); | The title is Hollywood's Black List System.out.printin(p.displaylength()); The length is 24 minutes and 20 seconds System.out.printin(p.displayGenre()); The genre is economics System.out.printin(p.displayDate()); | The date is 10 July 2020 TRY IT Submit your code for evaluation. Check it! ]
expand button
Transcribed Image Text:eritance L x Collapse Inheritance -> Lab - Inheritance Inheritance Lab Challenge Problem In the IDE to the left, the class MP3 is already defined. Use this class to do the following things: Create the class Podcast that inherits from H93 • Override the constructor such that the podcast has the following attributes: • name - a string that is the name of the podcast | title -a string that is the title of the episode • length - an integer that has the length of the podcast in seconds genre - a string that is the genre of the podcast • date - a string that represents when the podcast was released to the public Expected Output Declare an instance of the Podcast class as shown below. // add code below this line Podcast p - new Podcast("Planet Money", "Hollywood"s Black List", 146e, "econon // add code above this line The table below shows the method calls (left) and the output (right). Your class will be expected to work with all of these method calls. Method Call Return Value System.out.println(p.displayName()); The name is Planet Money System.out.printin(p.displayTitle()); | The title is Hollywood's Black List System.out.printin(p.displaylength()); The length is 24 minutes and 20 seconds System.out.printin(p.displayGenre()); The genre is economics System.out.printin(p.displayDate()); | The date is 10 July 2020 TRY IT Submit your code for evaluation. Check it!
[画像:LabChalleng x codio.com- htt. class MP3 ( private String artist; private String title; private String album; private int length; private String genre; 1. 2 3. 5 public String getartist () { return artist; 8- 9. 10 11 public void setartist(String newArtist) { artist = newartist; 12. 13 14 15 public String getTitle() { return title; 16. 17 18 19 public void setTitle(String newTitle) { title = newTitle; 20- 21 22 23 public String getAlbum() { return album; 24. 25 26 27 public void setAlbum(String newAlbum) { album = newAlbum; 28. 29 30 31 public int getLength() ( return length; 32. 33 34 35 public void setlength(int newlength) { length = newlength; 36 37 38 39 public String getGenre () { return genre; 40 41 42 43 44 public void setGenre(String newGenre) { genre = newGenre; 45 46 47 48 49 //add class definitions below this line 50 51 52 //add class definitions above this line 53 54 public class LabChallenge { public static void main(String[] args) { 55 56 . 57 58 //add code below this line 59 60 Podcast p = new Podcast ("Planet Honey", "Hollywood's Black List", 1468, "economics", "10 July 2028"); 61 62 63 64 //add code above this line 65 66 ]
expand button
Transcribed Image Text:LabChalleng x codio.com- htt. class MP3 ( private String artist; private String title; private String album; private int length; private String genre; 1. 2 3. 5 public String getartist () { return artist; 8- 9. 10 11 public void setartist(String newArtist) { artist = newartist; 12. 13 14 15 public String getTitle() { return title; 16. 17 18 19 public void setTitle(String newTitle) { title = newTitle; 20- 21 22 23 public String getAlbum() { return album; 24. 25 26 27 public void setAlbum(String newAlbum) { album = newAlbum; 28. 29 30 31 public int getLength() ( return length; 32. 33 34 35 public void setlength(int newlength) { length = newlength; 36 37 38 39 public String getGenre () { return genre; 40 41 42 43 44 public void setGenre(String newGenre) { genre = newGenre; 45 46 47 48 49 //add class definitions below this line 50 51 52 //add class definitions above this line 53 54 public class LabChallenge { public static void main(String[] args) { 55 56 . 57 58 //add code below this line 59 60 Podcast p = new Podcast ("Planet Honey", "Hollywood's Black List", 1468, "economics", "10 July 2028"); 61 62 63 64 //add code above this line 65 66
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Similar questions
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education