CS609 – ASSIGNMENTS – FALL 2004



CS609 – ASSIGNMENTS – Spring 2006

Students must keep all home works organized within a web site having a home page and links to home works. Home page should include students name. The web should have a theme where possible

Exercises:

1)

a) Write a ASP program to illustrate the order of execution of the following elements: HTML, server-side script ASP code (inside …), and ASP code (inside ). Send to the browser 9 text lines written in the program in the following order: HTML, asp script, asp code, HTML, asp script, asp code, HTML, asp script, asp code. Which is the order of execution?

1)

a) Create a form in an html file (first name, last name, email, age) and the corresponding asp file to process the input sent by the user. The asp program should just acknowledge the input by the user. Include all form inputs such as Text, multiple groups, List box, check box, text area, and Password. Use POST as the value of the METHOD attribute in the form.

b) In the previous example, change the value of the METHOD attribute of the form to GET. What happens in this case when you run the web application? How can you fix the problem?

c) Run the ASP file in the previous example sending the parameters of the form in the URL. Which is the URL that you need to create?

===================================================================

2) Create a pair of files to demonstrate the workings of the following

i) Comparison Operators - Greater than, less than, equal to, not equal to

ii) Arithmetic operators - Addition, subtraction, mult, div, exponential, mod(ulus)

iii) Logical operators – AND, OR NOT

3)

a) Form validation in asp except state JavaScript in html. Error messages in red please if following

i) Name - is empty

ii) Zip code - is not numeric 5 characters

iii) Email does not have @ or ends with .COM, .EDU, .ORG, .NET

b) You know how to customize the background color of a web page using Javascript. In this exercise, write an ASP script to customize the background color of a web page. The user should make the choice from a set of radio buttons.

c) The Response.Redirect method can be used to transfer control to another web page. Write a web application that contains a selection list so a user can choose a web page destination.

4) Put a and b on the same form

a) Write a web application to convert a temperature, either to Fahrenheit or to Celsius temperature. The user has to indicate the output type required. Use Functions

b) Write a web application that computes the average of a number of grades (input to indicate how many) and the corresponding letter grade (A, B, C, D, and F). A=9x, B=8x, C=7x, D=6x, F=everything else Use case structure and the idea we used in class

c) Write an ASP script to illustrate how the Response methods flush () end () and clear () can be used to control the HTML output stream. Make it into 2 pages and incorporate session level variables. Make it interactable

5) Complete the following

a) Create a Web application that takes a paragraph entered by a user in a text area and returns to the user the number of characters, the number of words, and sorts the words in alphabetical order (one word per line).

b) Create a Web application that will calculate the gross salary of all company employees. The application should accept the employee’s name, hours worked, and hourly rate, IRA contribution as input. An employee gets time and half for any hours over 40 hours worked. Your job is to create an application that displays an employee’s name, hours worked, regular pay, overtime pay, and total pay. Assume the tax rate is a flat 10% of taxable (gross less IRA) income Output should be Name, Hrs, Rate, Gross pay, Net pay

For EC 1 pts add each net pay amount to a session variable and continually display the cumulative total as you go.

For EC 1 pts ask first how many employees you have and the display all them in a table

6)

a) 3/3#5Create a form containing three text boxes (labeled “Enter your name”, Enter your address” and “Enter your date of birth”), one submit button and one reset button. Write a web application to validate the form in the server.

b) Create a web application to estimate the cost of a business trip. The expenses should include round trip, meals, hotel, and number of days. There should be options to choose a cheap ($20) or expensive meal ($50), and a cheap ($100) or expensive hotel ($200). Use a function to calculate the total cost

c) Include a link to Application retrieve file AppRet.asp

7)

a) Create an ASP file with an expiration date 2 hours after it is first requested from the server.  The file should contain the current time to be able to see easily if the page is cached or newly requested from the server. Close the browser and request the file for a second time. Is the browser reading a cached version or a current version? In which folder are cached files are kept? How can you request a current version?

b) The final exam for CS609 will be on 12/ ??/2005. Create an ASP web application that calculates the number of days left to the final from any given day entered by a user.

8)

a) Write a web application to show the contents of the ServerVariables collection of the Request object.

b) Create a form with 3 textboxes with the same name attribute (note that this is something that you shouldn’t do in general). Demonstrate how you can access the values of the different textboxes in ASP.

9)

a) Create a web application to view, add and delete permanent cookies. It should be possible to add several values to the cookie. Find the file in the client computer where cookies are stored. Find the cookies that you created with your application in that file.

b) Create a web application such that a user can register and customize (background color, favorite URL, and some other feature of your choice) the web page in the first visit. On subsequent visits to the site the user shouldn’t be prompt to register, and should see a customized web site. It should also be possible to change the customizable features.

1) Create a web application to view, add and delete Application variables.

2) Create a web site that contains at least 5 linked pages. Each page should have a link that will show the number of pages visited during the session, and which are those pages in chronological order.

10)

a) Create a web application such that a user can add and delete entries in a Dictionary object. The user should also be able to view all entries in the dictionary.

a) Create a Web application that displays the drives present in a computer. Select one drive and display information about the drive (drive type, file system, free space, serial number). Display the folders in the drive. Select one folder and display information about the folder (attributes, date created, path).

b) Write a web application such that a user can specify a folder in the file system. The user should be able to view all subfolders in the folder, create a new subfolder or delete an existing subfolder.

c) Write a web application so visitors to the web site can enter their first names, last names, and email addresses in a form. The application should read the form and store the information entered by the visitors in a text file in the server. The application should return to the visitor all information stored in the file.

11) Create a web application so a user can create a dictionary, save it to a file in the server, and search for specific entries in the dictionary (use the RegExp object for the search).

12)

a) Write an ASP application using VBScript that allows a user to interact with an Access database. This exercise is to practice your SQL skills. The user interface should consist of a text area, submit and reset buttons. The user should be able to interact with the database by typing an SQL command in the text area. The Access database should consist of a table (called students), with three fields (student_id, last_name, first_name). The primary key of the table is the student_id field.

b) Write an ASP application using VBScript with a friendlier user interface with the Access database than the one used before. Specifically the user should be able to view all records in the database, to add records to the database and to delete records from the database. You need three elements for that: a database file, a html file that implements the user interface, and an asp file that process the data provided by the user. The Access database will consist of a table (called students), with three fields (student_id, last_name, first_name). The primary key of the table is the student_id field. The user interface should be an html file with a form with the following elements. A set of three radio buttons the select the possible options: view all records, add a new record, and delete a record. Three text boxes to enter the student_id, the student’s first_name and the student’s last_name. A submit and a reset button. The asp file should be able to do the following: view all records in the database formatted using a table, add new records to the database, and delete existing records from the database.

13) Project Design a Web application so students can order goods online. The application should consist of the following. See separate flow chart.

a) Create a login ASP page. The login page should have two textboxes (one for login name and another for the password) and two buttons for login (submit) or reset. After a successful login, the user should be able to get to the site home page. A link on the login page should also allow an unregistered user to register to the site by entering a userid, password and email address.

b) An order page

c) Generate an order

d) Send back confirmation

e) Deduct from inventory

f) Add features for extra credit

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download