Tasks: Write a BluRayDisk class which has: a. Public attributes called title and director (strings), year of release (int) and cost (double). b. Constructor which takes in the 4 attributes and sets the objects variables. c. Override of toString/ToString which prints the objects variables as follows: 1.
Tasks: Write a BluRayDisk class which has: a. Public attributes called title and director (strings), year of release (int) and cost (double). b. Constructor which takes in the 4 attributes and sets the objects variables. c. Override of toString/ToString which prints the objects variables as follows: 1.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Java language, create 4 separate classes based on the instructions.
+ BluRayDisk, DriverClass (Main class), Node, and Collection class.
![Tasks:
1. Write a BluRayDisk class which has:
a. Public attributes called title and director (strings), year of release (int) and cost
(double).
b. Constructor which takes in the 4 attributes and sets the objects variables.
c. Override of toString/ToString which prints the objects variables as follows:
[Dollar sign]Cost [space] Year of release [Space] Title [comma] Director
$19.99 2019 Avengers - Endgame, Anthony Russo & Joe Russo
2. Write a node class which has a data field that holds a BluRayDisk and a next field which
is a link to another node.
3. Write a BluRayCollection class which has:
a. A private link called head that links to a Node, it should be initialized to null
b. A public method called add() which takes 4 parameters (title, director, year of
release, cost) and returns nothing. It should create a new Node and add it to the
end of the linked list.
c. A public method called show_all() which takes no parameters and returns nothing,
but prints out all the BluRays in the collection. It should utilize the toString or
ToString method to print each BluRay.
4. Write a main program which does the following:
a. Instantiate a BluRayCollection
b. Present the user with a menu that gives the following choices:
0. Quit
1. Add BluRay to collection
2. See collection
c. Read in the users choice. If they choose 1, prompt the user for a title, director,
of release and year, and call the add method in the BluRayCollection object
year
you created. If they choose 2, call the show_all method in the BluRayCollection
object you created.
Sample Output:
Ouit](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F9e4bcf82-2d8b-4d97-9bca-b14a409e8c50%2F3ebdde8a-e24e-4128-9070-d88dde84e3f5%2Fgialnke_processed.png&w=3840&q=75)
Transcribed Image Text:Tasks:
1. Write a BluRayDisk class which has:
a. Public attributes called title and director (strings), year of release (int) and cost
(double).
b. Constructor which takes in the 4 attributes and sets the objects variables.
c. Override of toString/ToString which prints the objects variables as follows:
[Dollar sign]Cost [space] Year of release [Space] Title [comma] Director
$19.99 2019 Avengers - Endgame, Anthony Russo & Joe Russo
2. Write a node class which has a data field that holds a BluRayDisk and a next field which
is a link to another node.
3. Write a BluRayCollection class which has:
a. A private link called head that links to a Node, it should be initialized to null
b. A public method called add() which takes 4 parameters (title, director, year of
release, cost) and returns nothing. It should create a new Node and add it to the
end of the linked list.
c. A public method called show_all() which takes no parameters and returns nothing,
but prints out all the BluRays in the collection. It should utilize the toString or
ToString method to print each BluRay.
4. Write a main program which does the following:
a. Instantiate a BluRayCollection
b. Present the user with a menu that gives the following choices:
0. Quit
1. Add BluRay to collection
2. See collection
c. Read in the users choice. If they choose 1, prompt the user for a title, director,
of release and year, and call the add method in the BluRayCollection object
year
you created. If they choose 2, call the show_all method in the BluRayCollection
object you created.
Sample Output:
Ouit
![Sample Output:
0.
Quit
1.
Add BluRay to collection
2.
See collection
1
What is the title?
Jaws
What is the director?
Steven Spielberg
What is the year of release?
1975
What is the cost?
19.95
0.
Quit
1.
Add BluRay to collection
2.
See collection
2
$19.95 1975 Jaws, Steven Spielberg
0.
Quit
1.
Add BluRay to collection
2.
See collection
1
What is the title?
Jurassic Park
What is the director?
Steven Spielberg
What is the year of release?
1993
What is the cost?
17.99
0.
Quit
1.
Add BluRay to collection
2.
See collection
2
$19.95 1975 Jaws, Steven Spielberg
$17.99 1993 Jurassic Park, Steven Spielberg
Quit
1.
Add BluRay to collection
2.
See collection](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F9e4bcf82-2d8b-4d97-9bca-b14a409e8c50%2F3ebdde8a-e24e-4128-9070-d88dde84e3f5%2Fsghtobo_processed.png&w=3840&q=75)
Transcribed Image Text:Sample Output:
0.
Quit
1.
Add BluRay to collection
2.
See collection
1
What is the title?
Jaws
What is the director?
Steven Spielberg
What is the year of release?
1975
What is the cost?
19.95
0.
Quit
1.
Add BluRay to collection
2.
See collection
2
$19.95 1975 Jaws, Steven Spielberg
0.
Quit
1.
Add BluRay to collection
2.
See collection
1
What is the title?
Jurassic Park
What is the director?
Steven Spielberg
What is the year of release?
1993
What is the cost?
17.99
0.
Quit
1.
Add BluRay to collection
2.
See collection
2
$19.95 1975 Jaws, Steven Spielberg
$17.99 1993 Jurassic Park, Steven Spielberg
Quit
1.
Add BluRay to collection
2.
See collection
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
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY