Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Searcy Flix - Internet Development - Project | COMP 250, Study Guides, Projects, Research of Computer Science

Material Type: Project; Professor: McCown; Class: Internet Development; Subject: Computer Science; University: Harding University; Term: Unknown 1989;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 08/18/2009

koofers-user-k5z
koofers-user-k5z 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Searcy Flix
COMP 250 - Internet Development
Due Mon, Mar 23
100 points
The goal of this project is to develop a website for Searcy Flix that allows customers to view the movies now
showing and rate movies from 1 to 10 stars.
The system will be composed of the following files:
1) movie.dat – data file that contains the m ovie information.
2) now_showing.cgi – displays the movies that are now showing.
3) various movie image files – JPEG files for each movie.
4) greystar.gif and goldstar.gif – used to display the voter’s rating.
5) movie_detail.cgi – displays details about a movie and allows the user to rate the movie.
6) save_vote.cgi – saves the submitted vote to a data file.
7) movie_title.dat – data file for each movie that contains the voter’s ratings for the m ovie.
The CGI files and data files will reside in /home/username/public_html/cgi-bin/movies/.
All the HTML and image files will reside in /home/username/public_html/searcy_flix/.
A description of each file follows.
movie.dat
This is a text file that contains all the movies now playing. When the movies change each week, this file will be
modified. It may contain anywhere from 1 to 20 movies. Each field is separated by a carrot (^) since that character
is highly unlikely to appear in the movie data. The fields appear in this order: movie title, rating, length in minutes,
and showtimes. An example is shown below:
Planet of the Apes^PG-13^119^7:00 pm, 9:30 pm
Monsters, Inc.^G^92^5:00 pm, 7:00 pm, 9:00 pm
Spider-Man^PG^121^7:00 pm, 9:30 pm
<EOF>
There will never be a space before or after a carrot. You may assume all data in this file will be formatted correctly
and the last line will read “<EOF>”.
now_showing.cgi
This CGI program displays the movies now showing. It should display the image associated with the movie, the
movie title, the rating, the movie length, and the show times.
The movie’s image is named according to the title of the movie. The title is converted to all lowercase and all non-
alphanumeric characters are changed to dashes. For example, the movie “Monsters, Inc.” would use an image
called “monsters--inc-.jpg”. (Hint: You will find the function isalpha to be useful for this conversion.)
Given the data file above, the now_showing.cgi program would display a page like the following:
pf3
pf4

Partial preview of the text

Download Searcy Flix - Internet Development - Project | COMP 250 and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

Searcy Flix

COMP 250 - Internet Development Due Mon, Mar 23 100 points

The goal of this project is to develop a website for Searcy Flix that allows customers to view the movies now showing and rate movies from 1 to 10 stars.

The system will be composed of the following files:

  1. movie.dat – data file that contains the movie information.
  2. now_showing.cgi – displays the movies that are now showing.
  3. various movie image files – JPEG files for each movie.
  4. greystar.gif and goldstar.gif – used to display the voter’s rating.
  5. movie_detail.cgi – displays details about a movie and allows the user to rate the movie.
  6. save_vote.cgi – saves the submitted vote to a data file.
  7. movie_title .dat – data file for each movie that contains the voter’s ratings for the movie.

The CGI files and data files will reside in /home/username/public_html/cgi-bin/movies/. All the HTML and image files will reside in /home/username/public_html/searcy_flix/.

A description of each file follows.

movie.dat

This is a text file that contains all the movies now playing. When the movies change each week, this file will be modified. It may contain anywhere from 1 to 20 movies. Each field is separated by a carrot (^) since that character is highly unlikely to appear in the movie data. The fields appear in this order: movie title, rating, length in minutes, and showtimes. An example is shown below:

Planet of the Apes^PG-13^119^7:00 pm, 9:30 pm Monsters, Inc.^G^92^5:00 pm, 7:00 pm, 9:00 pm Spider-Man^PG^121^7:00 pm, 9:30 pm

There will never be a space before or after a carrot. You may assume all data in this file will be formatted correctly and the last line will read “”.

now_showing.cgi

This CGI program displays the movies now showing. It should display the image associated with the movie, the movie title, the rating, the movie length, and the show times.

The movie’s image is named according to the title of the movie. The title is converted to all lowercase and all non- alphanumeric characters are changed to dashes. For example, the movie “Monsters, Inc.” would use an image called “monsters--inc-.jpg”. (Hint: You will find the function isalpha to be useful for this conversion.)

Given the data file above, the now_showing.cgi program would display a page like the following:

Searcy Flix – Now Showing

Planet of the Apes PG- 119 minutes

7:00 pm, 9:30 pm

Monsters, Inc. G 92 minutes

5:00 pm, 7:00pm, 9:00 pm

Spider-Man PG 121 minutes

7:00 pm, 9:30 pm

When the user clicks on the image or the title of the movie, the browser will be redirected to movie_detail.cgi?title= movie-title where movie-title is a modified form of the movie title. The movie title will follow the same naming convention as the image. For example, the link to the movie “Monsters, Inc.” look like this: movie_detail.cgi?title=monsters--inc-.

The movie_detail.cgi program will use the title of the movie in the query string to determine which movie was selected.

movie_detail.cgi

This CGI program displays the selected movie in more detail. It looks in the query string to determine which movie was selected from now_showing.cgi. The program will search the movie.dat file for the given title and will display all the movie information except showtimes. The average voter’s rating will also be displayed, and the user will have the ability to rate the movie by selecting 1 – 10 stars.

For example, if the user clicked on the “Monters, Inc.” link from the now showing screen, the following page would result:

Deliverables

Submit all your .cpp files to Easel before class on the due date.

The Now Showing page should be accessible at: http://taz.harding.edu/~ username /cgi-bin/movies/now_showing.cgi

In order to test your CGI programs, I will copy my own movie.dat and image files into your directories, so it is very important that you name your directories and files correctly. I will use the timestamp on your CGI files to determine when you finished the assignment.

A (mostly) working version of this system is available at http://taz.harding.edu/~fmccown/cgi-bin/movies/now_showing.cgi

Practice good programming habits: Do not write any function (including main) that is longer than one printed page, use a consistent naming convention throughout your program for functions and variable names, use self- documenting variable names and functions, and use constants where appropriate. At the top of each cpp file, document the name of the file, the author, the date, and a brief description of what the program does.

Make sure your CGI programs are robust. For example, what happens if the movie_detail.cgi can’t find the given movie in movie.dat? Always give appropriate error messages to the user with a link back to the root page.

Your screens do not have to look precisely like the examples, just as long as it displays the necessary information to the screen. Feel free to be creative.

“Never judge a book by its movie.” J. W. Eagan