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!
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!
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 7RQ
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!](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F675f953f-bef5-43c0-8ba9-513be4b8b383%2F3efde7cf-1c7b-4669-a46e-18498a60cd5f%2F7d8urwv_processed.png&w=3840&q=75)
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F675f953f-bef5-43c0-8ba9-513be4b8b383%2F3efde7cf-1c7b-4669-a46e-18498a60cd5f%2Fhikyrg_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT