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", 1460, "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(0); | The title is Hollywood's Black List The length is 24 minutes and 20 seconds System.out.printin(p.displaylength()); System.out.println(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!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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!
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
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education