Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the OOP project is needed to be coded in netbeans and store a information in file on local machine it could be stored with xml

the OOP project is needed to be coded in netbeans and store a information in file on local machine it could be stored with xml tags since its easier.

OOP Project Description

Requirements:

You are to design and build software media rental system. The software will track each users account with its rentals. A user can rent multiple media of different type/genre and all that users rentals are managed under their account (single account per user). A user will be assigned a unique account id by the system and his first name, last name, and email address will also be stored at account creation. There will be ability to update the users name and email address but not the account id.

The software needs to be able to track different accounts, but the software should only load and actively manage one account at a time. There should be the ability to save account information to a file, re-open it later (one account per file using XML format), and delete the account (delete file with account information). The account id will be used as part of the filename to save, lookup to open, and delete account. There can be an account without any media rented.

There are 3 types of media that can be rented: Movie DVD, Music CD, and Audio Book CD. The company only rents certain genre of each media, shown in the table below. All media have following characteristics: media id (integer), title (String), year published (integer), file size in megabytes (double), rental end date (Calendar), and rental fee (Double). Audio book also has number of chapters (integer) and Music CD the length in minutes.

Media Type

Genre

Movie DVD

Romance

Drama

Documentary

Music CD

Country

Classical

Audio Book on CD

Memoir

SciFi

Romance

So for example, a user would rent a specific media such as a movie DVD of genre Romance with title Love, media id 100005, etc. Rental fee needs to be calculated at the time the rental is added to the account and the calculated fee should be stored in the rented medias attribute.

Every media has a price to rent based on a 2 week rental. The following rules show how to determine the rental price.

Movie DVD rental has a flat fee of $3.50 for movie published within current year and otherwise a flat fee of $2.00. So for example if the DVD was published this year, it would cost $3.50 to rent for two weeks but if published last year, it would cost $2.00. However, Drama and Romance media has an additional fee of $0.25 added to the price so for documentary the above example would be $3.75 and $2.25 respectively.

Audio Book rentals are a little more complex.The rental price is calculated by multiplying the number of chapters * 0.10 and adding a $1 if the Audio Book was published this year. So if the Audio Book was published this year and the size is 20 chapters, the rental would cost $3.00 (20 * 0.10 + 1) and if it was published 2 years ago, it would be $2.00 to rent.

Music CDs are even more complicated because they depend of the type of music being rented. So classical rentals are calculated based on the file size * 0.015 and additional fee of 1.00 if published this year.Country music rental are calculated based on the file size * 0.02 and additional fee of 1.00 if published this year. So a classical music rental of size 114 MB published this year would cost $2.71 (114 *0.015 +1) and country music rental of 114 MB published this year would cost $2.28 (114 *0.02).

There also needs to be ability to add a media to the account, and delete media from the account. When a rental expires, it can be renewed for another two weeks.

Here is a scenario how this system should work in a real business:

Imagine there are media boxes on the shelf in some rental place. So a customer comes in and gets some boxes of the rentals they want to get. They go up to the cashier and if it is their first time, an account will be created for them in the system. They will need to provide their first name, last name and email address that will be inputted by the cashier into the new account being created. The system will generate an account id for this user and cashier will give that information to the customer.

Then the cashier will scan each box for the media information, which will create the media object in the system. That object will be added to the account. The cashier will repeat for each media box to be rented. The rental end date will be set by the system, 2 weeks from the current date. The system will calculate the rental fee for each media being rented. All that information will be displayed on the screen: each media with its information and the rental fee for each (the actual displaying will be done by user interface which is not part of the system you are creating). Customer will pay and get receipt but that is outside of the scope of the system we are creating.

Then the customer may come in to return the media. He will provide his account number and the cashier will bring his account up. The cashier will select return choice in the user interface and scan each media to remove from his account. Lets say he had 3 media rented but he is returning two of them. So those 2 rentals are removed from his account. For the one he still has he decides to renew it so cashier selects renew option in the user interface, scans the media and that media gets renewed for next two weeks. Again the fee is calculated and all the new information in the account is displayed by the user interface.

Then he notices on the screen that his name is spelled incorrectly or his email is not right. The cashier will be able to change that information in the account.

Next time when customer comes in, he may return the media he has but he may not want to rent at this time. His account will be still there but without any media until next time when he rents again.

The system you are designing will have the functionality needed to satisfy the above requirements as illustrated by the scenario. You will not be implementing the actual user interface (you will still design them though in assignment 7) but you need the classes, attributes, and methods to receive and provide the information that the user interface will need. You can assume that for a complete solution there would be some other class that implements user interface with main() method and the scanning module and that it will call your classes. You will write such a class with main() in assignment 8 as your test class.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions