Java Reference
In-Depth Information
{
return this.showDate;
}
CustomerBooking.prototype.setShowDate = function(showDate)
{
this.showDate = showDate;
}
CustomerBooking.prototype.getFilm = function()
{
return this.film;
}
CustomerBooking.prototype.setFilm = function(film)
{
this.film = film;
}
CustomerBooking.prototype.getBookingId = function()
{
return this.bookingId;
}
CustomerBooking.prototype.setBookingId = function(bookingId)
{
this.bookingId = bookingId;
}
// Cinema type
function Cinema()
{
this.bookings = new Array();
}
Cinema.prototype.addBooking = function(bookingId, customerName, film, showDate)
{
this.bookings[bookingId] = new CustomerBooking(bookingId,
customerName, film, showDate);
}
Cinema.prototype.getBookingsTable = function()
{
var booking;
var bookingsTableHTML = “<table border=1>”;
for (booking in this.bookings)
{
bookingsTableHTML += “<tr><td>”;
bookingsTableHTML += this.bookings[booking].getBookingId();
bookingsTableHTML += “</td>”;
bookingsTableHTML += “<td>”;
Search WWH ::




Custom Search