|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MediaRentalManagerInt
Interface that defines the functionality expected from
the media rental manager. The two possible media we can have
are movies and music albums. A movie has a title, a number of copies
that are available for rent, and a rating (e.g., "PG"). An album
has a title, a number of copies, an artist, and a list of songs (String
with title of songs separated by commas).
IMPORTANT:The database of the media rental manager, must define and use two
ArrayList. One stores the media (both Movies and Album information)
and one stores Customer information. You will lose significant credit
if you do not define and use these ArrayList objects.
Method Summary | |
---|---|
void |
addAlbum(java.lang.String title,
int copiesAvailable,
java.lang.String artist,
java.lang.String songs)
Adds the specified album to the database. |
void |
addCustomer(java.lang.String name,
java.lang.String address,
java.lang.String plan)
Adds the specified customer to the database. |
void |
addMovie(java.lang.String title,
int copiesAvailable,
java.lang.String rating)
Adds the specified movie to the database. |
boolean |
addToQueue(java.lang.String customerName,
java.lang.String mediaTitle)
Adds the specified media title to the queue associated with a customer. |
java.lang.String |
getAllCustomersInfo()
Returns information about the customers in the database. |
java.lang.String |
getAllMediaInfo()
Returns information about all the media (movies and albums) that are part of the database. |
java.lang.String |
processRequests()
Processes the requests queue of each customer. |
boolean |
removeFromQueue(java.lang.String customerName,
java.lang.String mediaTitle)
Removes the specified media title from the customer's queue. |
boolean |
returnMedia(java.lang.String customerName,
java.lang.String mediaTitle)
This is how a customer returns a rented media. |
java.util.ArrayList<java.lang.String> |
searchMedia(java.lang.String title,
java.lang.String rating,
java.lang.String artist,
java.lang.String songs)
Returns a SORTED ArrayList with media titles that satisfy the provided parameter values. |
void |
setLimitedPlanLimit(int value)
This set the number of media associated with the LIMITED plan. |
Method Detail |
---|
void addCustomer(java.lang.String name, java.lang.String address, java.lang.String plan)
name
- address
- plan
- void addMovie(java.lang.String title, int copiesAvailable, java.lang.String rating)
title
- copiesAvailable
- rating
- void addAlbum(java.lang.String title, int copiesAvailable, java.lang.String artist, java.lang.String songs)
title
- copiesAvailable
- artist
- songs
- void setLimitedPlanLimit(int value)
value
- java.lang.String getAllCustomersInfo()
java.lang.String getAllMediaInfo()
boolean addToQueue(java.lang.String customerName, java.lang.String mediaTitle)
customerName
- mediaTitle
-
boolean removeFromQueue(java.lang.String customerName, java.lang.String mediaTitle)
customerName
- mediaTitle
-
java.lang.String processRequests()
boolean returnMedia(java.lang.String customerName, java.lang.String mediaTitle)
customerName
- mediaTitle
-
java.util.ArrayList<java.lang.String> searchMedia(java.lang.String title, java.lang.String rating, java.lang.String artist, java.lang.String songs)
title
- rating
- artist
- songs
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |