Optimal Confidential Interval

Submitted by: Submitted by

Views: 260

Words: 335

Pages: 2

Category: Science and Technology

Date Submitted: 07/03/2013 07:28 PM

Report This Essay

COMP3110 F all 2011 COURSE ASSIGNMENT2

Due: 23:59, Nov 30 (W ednesday), 2011

Q1. Please complete the following PHP script, and output the correct result. Function calculation($para1,$para2,$operator) is used to do the calculation between $para1 and $para2 according to the given $operator. Function sum($start,$end,$step)is used to calculate the sum from the $start value till the $end value. And the interval between the adjacent value is $step. For example, if the $start is 1, the $end is 10 and the $step is 2. This function will calculate the sum of the following equation: 1+3+5+7+9, and print out the result. Please name your PHP file as calculation.php when submitting. Result: 7 -1 12 0.75 5050 2500

1

Q2. You are given an Online Registration table “table.htm” as shown in Fig.1. When click the submit button, the PHP file “input.php” will be called to process the form submission. In this question, you are required to do the coding for the “input.php”.

Fig.1. Online Registration table If all elements are filled, as shown in Fig.2, the submission result will be summarized and displayed in a table, as shown in Fig.3. Finally, all the information will be inserted into a database. If there is any element not filled, as shown in Fig.4., after clicking the submit button, the page will be redirected to the table.htm for user inputting again.

Fig.2. All elements are filled.

2

Fig.3. Submission Result.

Fig.4. Incomplete Submission form

3

Submission Guidelines:

What to Submit: 1. As following: calculation.php for Q1 input.php for Q2. 2. Please pack all the files into one Zip file; and name it as the following format: 093030XXX_Asg2.zip where 093030XXX is your student ID. Where to Submit: There is a link named as Assignment2 093030XXX_Asg2.zip through that link. Late submission: Late submission is not allowed!

on

our

course

website.

Please

submit

4