
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
See attached photos for the question.
Do it in Java Language!

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](https://content.bartleby.com/qna-images/question/675f953f-bef5-43c0-8ba9-513be4b8b383/3efde7cf-1c7b-4669-a46e-18498a60cd5f/hikyrg_thumbnail.png)
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

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 nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images

Knowledge Booster
Similar questions
- Use ruby on rails and on command line. Add the following parts to your student management system. Prefix: prefix, has many courses. Course: Belongs to a prefix, number, name, has many sections. Semester: semester ("Spring", "Summer", "Fall", …), year, has many sections. Section: CRN, belongs to a course, belongs to a semester. Clean up the browser display for the following. Foreign keys are not displayed, but reasonable text is. There is a drop-downs for prefixes when creating courses, and drop-downs for course and semester when creating a section. A course displays all the sections. A semester displays all the sections. Something reasonable is displayed if a null is detected.arrow_forwardFind a way to increase the value of X by 10 while processing a game object in JavaScript?arrow_forwardHow to create an AnimationGUI in java?arrow_forward
- Write one code for it. Write a Comparator in Java to compare two employees based upon their name, departments and age?.arrow_forwardHello, is there a way that you can write the fleet class in java?arrow_forwardWhen comparing the java.io and java.nio packages, what distinctions should be made?arrow_forward
- How to code a brick in the game brick breaker game in Javaarrow_forwardDiscuss the Sierpinski Gasket and run the appropriate program/code in Java to produce said gasket. Please and thank you... Also if its not too much to ask can you please include comments as to what each section of code is doing/give an understanding. It helps me in my learning.arrow_forwardCreate a Rock Paper Sissors game using Java Swingarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education