


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Project; Professor: McCown; Class: Internet Development; Subject: Computer Science; University: Harding University; Term: Unknown 1989;
Typology: Study Guides, Projects, Research
1 / 4
This page cannot be seen from the preview
Don't miss anything!
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:
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.
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 “
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.
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:
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