Package src.model
Class Cinema
Object
Cinema
- All Implemented Interfaces:
- Serializable,- Comparable
- Direct Known Subclasses:
- IMaxCinema,- PlatinumCinema,- StandardCinema
The Class that handles the data of Cinema
- Version:
- 1.0
- Author:
- Lee Juin
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidMethod to add a seat into the cinemaintMethod to compare between cinemas, sorted by UUIDMethod to make a copy of the seats in the cinemaGets the class of the cinemaabstract doubleGets the price weight of the cinemaintGets the total number of rows of seats in the cinemagetSeats()Gets all theSeatinstances in the cinemaintGets the total number of seats in the cinemagetUUID()Gets the unique ID of the cinemavoidsetCinemaClass(CinemaClass cinemaClass) Sets the class of the cinemaabstract voidsetCinemaPrice(double cinemaPrice) Sets the price weight of the cinemavoidsetNumOfRows(int numOfRows) Sets the total number of rows of seats in the cinemavoidSets all theSeatinstances in the cinemavoidsetTotalNumOfSeats(int totalNumOfSeats) Sets the total number of seats in the cinemavoidSets the unique ID of the cinema
- 
Constructor Details- 
CinemaConstructor for Cinema class- Parameters:
- UUID- is the unique ID in the database
- seats- is all the- Seatinstances in the cinema
- numOfRows- is the total number of rows in the cinema
- totalNumOfSeats- is the total number of seats in the cinema
 
 
- 
- 
Method Details- 
getUUIDGets the unique ID of the cinema- Returns:
- Unique ID of the cinema
 
- 
setUUIDSets the unique ID of the cinema- Parameters:
- UUID- is the unique ID to be set
 
- 
getCinemaClassGets the class of the cinema- Returns:
- CinemaClassof the cinema
 
- 
setCinemaClassSets the class of the cinema- Parameters:
- cinemaClass- is the- CinemaClassto be set
 
- 
getSeatsGets all theSeatinstances in the cinema- Returns:
- ArrayList of Seat
 
- 
duplicateSeatsMethod to make a copy of the seats in the cinema- Returns:
- ArrayList of Seat
 
- 
setSeatsSets all theSeatinstances in the cinema- Parameters:
- seats- is the ArrayList of- Seatinstances to be set
 
- 
addSeatMethod to add a seat into the cinema- Parameters:
- seat- is the- Seatinstance to be added
 
- 
getCinemaPricepublic abstract double getCinemaPrice()Gets the price weight of the cinema- Returns:
- Price weight of the cinema
 
- 
setCinemaPricepublic abstract void setCinemaPrice(double cinemaPrice) Sets the price weight of the cinema- Parameters:
- cinemaPrice- is the price weight of the cinema to be set
 
- 
getNumOfRowspublic int getNumOfRows()Gets the total number of rows of seats in the cinema- Returns:
- The total number of rows
 
- 
setNumOfRowspublic void setNumOfRows(int numOfRows) Sets the total number of rows of seats in the cinema- Parameters:
- numOfRows- is the total number of rows to be set
 
- 
getTotalNumOfSeatspublic int getTotalNumOfSeats()Gets the total number of seats in the cinema- Returns:
- The total number of seats
 
- 
setTotalNumOfSeatspublic void setTotalNumOfSeats(int totalNumOfSeats) Sets the total number of seats in the cinema- Parameters:
- totalNumOfSeats- is the total number of seats to be set
 
- 
compareToMethod to compare between cinemas, sorted by UUID- Specified by:
- compareToin interface- Comparable
- Parameters:
- object- is the cinema to be compared to
- Returns:
- More than zero if object is lower priority, equal to zero if equal priority, less than zero if object is higher priority
 
 
-