+ 1
Hey guys so I’m having some trouble with an assignment. “Media rental system”.
I’ve been able to work out some but I’m a little lost because in the class we didn’t really spend much time on it and now the assignment was like 0-100 real quick. I’m not really sure where to turn for help on this one. If any are willing to help, I can post where I’m at and such. But was wondering if anyone could turn me anywhere for help because I’m pretty lost. Thanks everyone.
12 odpowiedzi
+ 4
Ipang can you help?
+ 3
Post your question here, I'll try to help you. I don't know much about files but I know a good amount in inheritance so i think i can try to help you👍
+ 3
Jake Scanlan yes save your code in the code playground and share it's link here
+ 3
Jake Scanlan was there an initial code given already?
+ 2
Rishi,
There were mentioned "Week 3", "Week 8" in OP responses. Without details on what those were about, I'm afraid I might do more damage than any help.
But I'll be standing by to see if anything was in my limits ...
+ 1
1) Media hierarchy:
Create Media, EBook, MovieDVD, and MusicCD classes from Week 3 -> Practice Exercise - Inheritance solution.
Add an attribute to Media class to store indication when media object is rented versus available. Add code to constructor and create get and set methods as appropriate.
Add any additional constructors and methods needed to support the below functionality
+ 1
2) Design and implement Manager class which (Hint: check out Week 8 Reading and Writing files example):
stores a list of Media objects
has functionality to load Media objects from files
creates/updates Media files
has functionality to add new Media object to its Media list
has functionality to find all media objects for a specific title and returns that list
has functionality to rent Media based on id (updates rental status on media, updates
file, returns rental fee)
+ 1
3) Design and implement MediaRentalSystem which has the following functionality:
user interface which is either menu driven through console commands or GUI buttons or menus. Look at the bottom of this project file for sample look and feel. (Hint: for command-driven menu check out Week 2: Practice Exercise - EncapsulationPlus and for GUI check out Week 8: Files in GUI example)
selection to load Media files from a given directory (user supplies directory)
selection to find a media object for a specific title value (user supplies title and should
display to user the media information once it finds it - should find all media with that
title)
selection to rent a media object based on its id value (user supplies id and should
display rental fee value to the user)
selection to exit program
+ 1
4) Program should throw and catch Java built-in and user-defined exceptions as appropriate
5) Your classes must be coded with correct encapsulation: private/protected attributes, get
methods, and set methods and value validation
6) There should be appropriate polymorphism: overloading, overriding methods, and dynamic
binding
7) Program should take advantage of the inheritance properties as appropriate
+ 1
Havent really used sololearn so wasnt sure how to put this all into a link. My apologies.
I cant post the code i have right this second, but I’m currently working on my manager() class. Was trying to follow a guide but I think that made it more confusing for me rsther than simplify.
+ 1
I can post my code(where im at, im currently in the process of creating the manager class()) which has those inside it at lunch time.
+ 1
https://code.sololearn.com/cyD3hn6D4WV4
Here it is, I know its all over the place. It's just stressing me out a bit because even my teacher, really only showed us basic file reading and writing.
I was trying to follow a guide on my manager class and mediaRentalSystem class. But I think that did more harm than good, rather than help me simplify it so I can get a better understanding.