es04
Class Spectacle

java.lang.Object
  |
  +--es04.Spectacle

public class Spectacle
extends java.lang.Object

Questa classe rappresenta l'astrazione di uno spettacolo identificato da un nome. Un oggetto Spectacle contiene anche informazioni sui posti prenotati e occupati.


Constructor Summary
Spectacle(java.lang.String name)
          Crea un oggetto di tipo Spectacle caratterizzato da una stringa name.
 
Method Summary
 int[] getBookedSeats()
          Fornisce l'array dei posti che sono stati occupati
 int[] getBoughtSeats()
          Fornisce l'array dei posti che sono stati acquistati
 java.lang.String getName()
          Fornisce una stringa contenente nome dello spettacolo.
 void setBookedSeats(int[] seats)
          Aggiorna l'array dei posti prenotati
 void setBoughtSeats(int[] seats)
          Aggiorna l'array dei posti acquistati
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Spectacle

public Spectacle(java.lang.String name)
Crea un oggetto di tipo Spectacle caratterizzato da una stringa name.

Parameters:
name - nome dello spettacolo.
Method Detail

getName

public java.lang.String getName()
Fornisce una stringa contenente nome dello spettacolo.

Returns:
il nome dello spettacolo.

getBookedSeats

public int[] getBookedSeats()
Fornisce l'array dei posti che sono stati occupati

Returns:
posti occupati.

getBoughtSeats

public int[] getBoughtSeats()
Fornisce l'array dei posti che sono stati acquistati

Returns:
posti acquistati.

setBookedSeats

public void setBookedSeats(int[] seats)
Aggiorna l'array dei posti prenotati

Parameters:
seats - array dei posti da occupare.

setBoughtSeats

public void setBoughtSeats(int[] seats)
Aggiorna l'array dei posti acquistati

Parameters:
seats - array dei posti da acquistare.