Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Index A: MediaRentallnt interface Includes: Method Detail addCustomer void addCustomer(String name,String address,String plan) Adds the specified customer to the database. The address is a

 

Index A: MediaRentallnt interface Includes: Method Detail addCustomer void addCustomer(String name,String address,String plan) Adds the specified customer to the database. The address is a physical address (not e-mail). The plan options available are: LIMITED and UNLIMITED. LIMITED defines a default maximum of two media that can be rented. Parameters: name - ,address -, plan - addMovie void addMovie(String title, int copiesAvailable,String rating) Adds the specified movie to the database. The possible values for rating are "DR", "HR", "AC". Parameters:title -,copiesAvailable - rating - addGame void addGame(String title, int copiesAvailable,double weight) Adds the specified game to the database. Parameters:title - ,copiesAvailable - weight - addAlbum void addAlbum(String title,int copiesAvailable,String artist,String songs) Adds the specified album to the database. The songs String includes a list of the title of songs in the album (song titles are separated by commas). Parameters: title - ,copiesAvailable -artist -,songs - setlimitedPlanLimit void setlimitedPlanLimit(int value) This set the number of media associated with the LIMITED plan. Parameters: value - getAllCustomersinfo String getAlICustomerslnfo( Returns information about the customers in the database. The information presented sorted by customer name. Returns: getAlIMedialnfo String getAlIMedialnfo() Returns information about all the media (movies, albums, and games) that are part of the database. The information is presented sorted by media title. Returns: addToCart boolean addToCart(String customerName,String mediaTitle) Adds the specified media title to the cart associated with a customer. Parameters:customerName - ,mediaTitle - Returns: false if the mediaTitle is already part of the cart (it will not be added) removeFromCart boolean removeFromCart(String customerName, String mediaTitle) Removes the specified media title from the customer's cart. Parameters:customerName - ,mediaTitle - Returns: false if removal failed for any reason (e.g., customerName not found) processRequests String processRequests() Processes the requests cart of each customer. The customers will be processed in alphabetical order. For each customer, the requests cart will be checked and media will be added to the rented cart, if the plan associated with the customer allows it, and if there is a copy of the media available. For UNLIMITED plans the media will be added to the rented cart always, as long as there are copies associated with the media available. For LIMITED plans, the number of entries moved from the requests cart to the rented cart will depend on the number of currently rented media, and whether copies associated with the media are available. For each media that is rented, the following message will be generated: "Sending [mediaTitle] to (customerName]" Returns: returnMedia boolean returnMedia(String customerName,String mediaTitle) This is howa customer returns a rented media. This method will remove the item from the rented cart and adjust any other values that are necessary (e.g., copiesAvailable) Parameters:customerName - ,mediaTitle - Returns: searchMedia ArrayList searchMedia(String title,String rating, String artist, String songs) Returns a SORTED ArrayList with media titles that satisfy the provided parameter values. If null is specified for a parameter, then that parameter should be ignore in the search. Providing null for all parameters will return all media titles. Parameters: title - rating - ,artist -, songs - Returns: Index B: Public Driver: Method Detail public void testAddingCustomers() public void testAddingMedia() public void testingAddingToCart() public void testingRemovingFromCart() public void testProcessingRequestsOne() public void testProcessingRequestsTwol) public void testReturnMedia() public void testSearchMedia() Index C: Academic Integrity Please make sure you read the academic integrity section of the syllabus so you understand what is permissible in our programming projects. We want to remind you that we check your project against other students' projects and any case of academic dishonesty will be referred to fail in the course and the student is referred to a system committee. NOTE: THERE IS PASS OF ( There is a face-to-face discussion)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

ASAP is an acronym for As Soon as Possible It is often used in business correspondence to request th... 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

Step: 3

blur-text-image

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

More Books

Students also viewed these Computer Engineering questions

Question

Shielding shown on an EWD is used to protect a wire from

Answered: 1 week ago

Question

11. What brain mechanism enables the startle refl ex to be so fast?

Answered: 1 week ago