Ask Question, Ask an Expert


Ask Statistics and Probability Expert


Solent Cinemas is an independent company who runs one cinema located in a large town in the south of England. The company wishes to create a new dynamic website to replace its existing static, HTML-only website. The existing website has the problem that it must be edited by hand, for ex, when the film schedule changes.

There is also no way for customers to reserve tickets for films online, an often-requested feature. The cinema would ideally like to extend this feature so that a user can sign up for an account, to allow them to view and cancel their own bookings.
The new website aims to use database-driven server-side scripts to provide a more interactive experience for both the user and the company website administrator.

You need to design and implement a simple, prototype system which allows users to book films and administrators to add new films to the schedule.

Database design

Database tables will be created for you on the Technology web server. The schema will be as follows. Please note that this is a simplified database structure, designed to make it straightforward to implement the assignment on a basic level; you can modify this or add additional tables if you wish. Only the first two tables are absolutely essential to implement a bare pass solution.

sc_users table

Records users in the system, and whether they are an administrator or a regular user.

isadmin TINYINT
name VARCHAR(255)
username VARCHAR(255)
password VARCHAR (255)
dayofbirth INT
monthofbirth INT
yearofbirth INT


Records the current film showings.

film VARCHAR(255)
date VARCHAR(255)
time VARCHAR(255)
screen INT
maxtickets INT
certificate VARCHAR(5)

A table which can be used if you wish to implement code to allow users to view, change and cancel their bookings. Not required for a bare pass answer but useful for more advanced answers.

username varchar(255)
showingID INT
ntickets INT


The tasks you need to complete are presented below. For each task, you must produce:

- an analysis and design (see "Analysis and Design report", below the tasks, for details);

- an implementation in PHP.

For a pass, it is essential to complete tasks a), b) and c). Please see the marking scheme for details on what mark you are likely to receive for completing a given number of the tasks.

Please complete the tasks in the order in which they are presented, or you will not receive the full credit. For ex, you will not receive the credit for task f) if you do not complete tasks a) to e) successfully.

Note that you also need a login facility, but you can use, more or less unchanged, the HitTastic! code that we developed in class for this. Consequently, your login script will not be counted towards your grade.

Analysis and design report

You are required to produce a report describing the process of analysing the specification and designing your scripts, in addition to the coding itself. For each task from a) to i) that you propose to complete, identify the PHP scripts (or, in the case of AJAX, JavaScript functions) necessary to implement that task, and for each script or JavaScript function, do the following:

i) In one or two paragraphs, describe the general role of the script, and discuss what the script needs to do in terms of database queries, gathering input from the user (e.g. from a form, or from a query string), linking to other scripts or performing calculations. If appropriate, details of techniques to maintain state (sessions, query strings, cookies), and of which security measures are to be implemented and why must be included.

ii) Design each script using pseudocode.

For a Grade D, it is necessary to…

a) Allow an administrator to add a new showing. An administrator should provide the film name, screen, date, time and certificate. The certificate should be one of: "U" (can be seen by anyone), "12" (can only be seen if you are at least 12 years old), "15" (at least 15 years old) or "18" (at least 18 years old) - note that this is slightly different to the current UK certification system.

This should add a record to the showings table, containing the information the administrator entered. For a basic pass it is not necessary to check that the user is an administrator.

b) Allow a user to search for a film showing by film name. A user should be able to enter a film name (e.g. "Avatar"); once they have entered the film name, all showings of that film should appear. Each search result should contain a hyperlink, allowing the user to book that film showing.

c) Allow a user to book a film showing once they've chosen one from the search results. For a basic pass, you do not have to implement the facility to allow a user to book more than one ticket: you can assume that they are only booking one ticket. However, the site must reduce the number of available tickets for that showing and record the showing ID and current user's username in the mybookings table.
For a Grade C, it is necessary in addition to…

d) Allow a user to book more than one ticket.

e) Add appropriate error checking to tasks a) to d). It should not be possible to book tickets for a showing which is sold out;  only logged-in users should be able to book a showing; and only administrators should be able to add new showings. You will need to modify your login system to check that the user logging in is an administrator.
For a Grade B, it is necessary in addition to…

f) Allow a user to view and cancel their own bookings. The "view bookings" page should list the film name and time of each film showing that they have booked; beside each event there must be a "Cancel" link allowing the user to cancel that booking. Cancelling the booking should behave in a realistic manner.

For a Grade A4 it is necessary in addition to…

g) Prevent users from being able to book a film which they are not old enough to see.
For a Grade A3 it is necessary in addition to…

h) Implement an AJAX interface. Users should be able to search for and book films using AJAX (it is not possible to get an A3 with just a basic AJAX search, and no AJAX should be attempted unless you have completed tasks a) to g) ). In other words, a user should enter a film name, all the showings should be displayed (using AJAX) and then a user should be able to book a particular showing by clicking on a button (the communication with the booking script must again be done using AJAX).
For a Grade A1 or A2, it is necessary in addition to…

i) Develop a seating plan, which should show unbooked seats in green, and booked seats in red (or a similar scheme). You will need an additional table for this to record booked seats. This will need three columns:

id INT - the primary key
showingid INT - the showing that this booked seat relates to
seatnum INT - the seat number of this booked seat

Assume that all showings have 100 seats. For a very advanced (A1) answer, allow users to book a free seat by clicking on it; for an A2, it will be sufficient to allow the user to input the seat number separately.

Statistics and Probability, Statistics

  • Category:- Statistics and Probability
  • Reference No.:- M91148

Have any Question? 

Related Questions in Statistics and Probability

Regression exercises assignmentpart 1 we will start this in

Regression Exercises Assignment Part 1 (We will Start this in class.) Suppose that theory predicts that Y is related to X by a linear function of the form: Y = m X + b, but random experimental error has been making it di ...

1 if you lived in england in seventeenth century and

1. If you lived in England in seventeenth century and decided that you wanted to emigrate to the new world, which colony would you have chosen, Virginia or Massachusetts bay? why? 2. Discuss possible motivation for john ...

Consider a moment-generating function of the general formor

Consider a moment-generating function of the general form or constants a , b , and c . Find constraints that the constants a , b , and c must satisfy so that M X  (u ) is the MGF of a valid random variable.

A sample of the hourly wages of 15 employees at one of the

A sample of the hourly wages of 15 employees at one of the Hospitals in Spokane was organized into the following table: Hourly Wages ($) Number of Employees 8 up to 10 3 10 up to 12 7 12 up to 14 4 14 up to 16 1 Total 15 ...

Scenario analysis computer chipsnbsp- use analysis

Scenario Analysis: Computer Chips - use analysis guidelines in helping (let me know if more information is needed, but this is all we are given) A manufacturer of computer chips has a computer hardware company as its lar ...

A computer memory has the capability of storing words due

A computer memory has the capability of storing words. Due to outside forces, portions of the memory are often erased. Therefore, words are stored redundantly in various areas of the memory. If a particular word is store ...

Suppose x is a gaussian random variable with

Suppose X is a Gaussian random variable with mean  Suppose we form a new random variable according to Y= aX +b  for constants a and b . (a) Prove that Y is also Gaussian for any a ≠ 0 . (b) What values for the constants ...

If two events a and b are such that pra is not zero and prb

If two events A and B are such that Pr(A) is not zero and Pr(B) is not zero, what combinations of independent (I), not independent (NI ), mutually exclusive (M ), and not mutually exclusive (NM ) are permissible? In othe ...

The number of hours per week that the television is turned

The number of hours per week that the television is turned on is determined for each family in a sample. The mean of the data is 37 hours and the median is 33.2 hours. Twenty-four of the families in the sample turned on ...

A random variable x has a gaussian pdf with mean 5 and unit

A random variable, X, has a Gaussian PDF with mean 5 and unit variance. We measure 10 independent samples of the random variable. (a) Determine the expected value of the sample mean. (b) Determine the variance of the sam ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate