0% found this document useful (0 votes)
15 views

TSA1-(Applications Development and Emerging Technologies)

Uploaded by

Samuel Reyes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

TSA1-(Applications Development and Emerging Technologies)

Uploaded by

Samuel Reyes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

COLLEGE OF COMPUTER STUDIES

(Applications Development and Emerging


Technologies)

TECHNICAL-SUMMATIVE ASSESSMENT

1
PHP OUTPUT, VARIABLE FAMILIARIZATION, OPERATORS
AND CONTROL STRUCTURE

Student Name / Group


Name:

Name Role
Members (if Group):

Section:

Professor:
I. PROGRAM OUTCOME/S (PO) ADDRESSED BY THE LABORATORY EXERCISE

● Design, implement and evaluate computer-based systems or applications to meet desired needs and

requirements.

II. COURSE LEARNING OUTCOME/S (CLO) ADDRESSED BY THE LABORATORY EXERCISE

● Understand and apply best practices and standards in the development of website.

III. INTENDED LEARNING OUTCOME/S (ILO) OF THE LABORATORY EXERCISE


At the end of this exercise, students must be able to:

● Familiarize various Web Architecture, tools that used in PHP

● The basic understanding before using PHP

● Familiarize in environment of web developing

● Use of comments, variables and Echo / Print

● To understand the different types of operators that are available on PHP.

● To know what is operator precedence and operator associativity in PHP.

● To use escape sequence properly in the program.

● To know the different approach of control structures.

● To know the fundamentals syntax for conditional and looping structures.

● To properly use the compound expression using the logical operators.

● To know the rules of break, continue, and goto statements.

Applications Development and Emerging Technologies Page 2 of


22
IV. BACKGROUND INFORMATION

Applications Development and Emerging Technologies Page 3 of


22
Applications Development and Emerging Technologies Page 4 of
22
V. GRADING SYSTEM / RUBRIC (please see separate sheet)
VI. LABORATORY ACTIVITY

1. The student will create a student registration form using HTML and CSS with the
integration of PHP Scripts please refer to the attached image for the example.
a. All user entries from the student registration form will be converted in variables
b. In the output, they need to call for the declared variables and do some string
formats like name cases and numbers

Applications Development and Emerging Technologies Page 5 of


22
Applications Development and Emerging Technologies Page 6 of
22
Source:
<html>
<body>
<div style="width: 1250px;font-family:sans-serif">
<h1 style="text-align:right;">Student Registration Form</h1>

<br>

<fieldset style="background:#c0bec3;">
<?php
echo "
<form action=TSA1_Protacio.php method=post>
<table >
<tr>
<td>
<i>For School Use</i><b>-Permision to Register:</b> <input
type=text name=Data1>
</td>
<td>
<b>Date:</b> <input type=text name=Date size=25>
</td>
<td>
<input type=checkbox name=ESL> ESL
</td>
<td>
<input type=checkbox name=SPED> SPED
</td>
<td>
<input type=checkbox name=IPRC> IPRC

Applications Development and Emerging Technologies Page 7 of


22
</td>
<td>
<input type=checkbox name=ISA> ISA
</td>
</tr>
<tr>
<td>
Student Number: <input type=text name=Student_Number
size=45>
</td>
<td>
Entry Date: <input type=text name=Entry_Date>
</td>
<td>
Entry Type: <input type=text name=Entry_Type>
</td>
<td colspan=3>
Grade: <input type=text name=Grade>
</td>
</tr>
<tr>
<td colspan=2>
OEN: <input type=text name=OEN size=95>
</td>
<td colspan=4>
Class/Homeform: <input type=text name:Class size=48>
</td>
</tr>
</table>

Applications Development and Emerging Technologies Page 8 of


22
</form>
";
?>
</fieldset>
<br>
<fieldset style="width:520px">
<?php
echo "Is the student currently expelled from any school board?
<input type=checkbox name=Yes> Yes <input type=checkbox name=No> No";
?>
</fieldset>
<br>
<fieldset>
<h3>Student Information</h3>
<?php
echo "
<table>
<tr>
<td colspan=3>
Full Legal Name: <input type=text name=Name size=155>
</td>
</tr>
<tr>
<td colspan=3>
Preferred Name: <input type=text name=PName size=155>
</td>
</tr>
<tr>
<td>

Applications Development and Emerging Technologies Page 9 of


22
Gender: <input type=checkbox name=Male>Male <input
type=checkbox name=Female>Female
</td>
<td>
Date of Bith: <input type=text name=Birth size=25>
</td>
<td>
If the student has other siblings in this school, please list them:
<br>
<input type=text name=Siblings size=90>
</td>
</tr>
<tr>
<td colspan=3>
<i>For School Use</i><b>Proof of Birth:</b>
<input type=checkbox name=OSR>Copy in OSR
<input type=checkbox name=BRecord>Baptismal Record
<input type=checkbox name=BReg>Birth Registration
<input type=checkbox name=BCert>Birth Certificate
<input type=checkbox name=IPC>Immigration Papers/Card
<input type=checkbox name=Passport>Passport
<input type=checkbox name=Other>Other
</td>
</tr>
</table>
";
?>
</fieldset>
<br>

Applications Development and Emerging Technologies Page 10 of


22
<fieldset>
<h3>Previous School Information</h3>
<?php
echo "
<table>
<tr>
<td colspan=4>
Name of Previous School Board/Municipality: <input type=text
name=Prev_Board size=120>
</td>
</tr>
<tr>
<td colspan=4>
Name of Previous School: <input type=text name=Prev_School
size=140>
</td>
</tr>
<tr>
<td colspan=2>
Language of Instruction: <input type=checkbox
name=English>English
<input type=checkbox name=French>French
<input type=checkbox name=OtherL>Other
</td>
<td colspan=2>
Reason for Transfer: <input type=text name=Reason size=50>
</td>
</tr>
<tr>

Applications Development and Emerging Technologies Page 11 of


22
<td colspan=4>
<b>Did the student ever attend a Waterloo Region District School
Board school in the past?
<input type=checkbox name=Yes2>Yes
<input type=checkbox name=No2>No
If yes, name school(s):</b>
</td>
</tr>
<tr>
<td>
<input type=text name=School_A size=36>
</td>
<td>
<input type=text name=School_B size=36>
</td>
<td>
<input type=text name=School_C size=36>
</td>
<td>
<input type=text name=School_D size=36>
</td>
</tr>
</table>
";
?>
</fieldset>
<br>
<fieldset>
<h3>Health Information</h3>

Applications Development and Emerging Technologies Page 12 of


22
<?php
echo "
<table>
<tr>
<td colspan=2>
Medical Conditions (include information on special equipment or
medication, if required):
</td>
<td>
<table border=1px bgcolor=#c0bec3>
<tr>
<td>
<b>For School Use<b> <br>
Immunization Record provided:
<input type=checkbox name:Yes3> Yes
<input type=checkbox name:No3> No
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=2>
<input type=text name=Medical size=120>
</td>
<td colspan=2>
Does the student require an epi-pen?
<input type=checkbox name:Yes4> Yes
<input type=checkbox name:No4> No

Applications Development and Emerging Technologies Page 13 of


22
</td>
</tr>
</table>
";
?>
</fieldset>
<br>
<fieldset>
<h3>Citizenship Information</h3>
<?php
echo "
<table>
<tr>
<td>
Birth Country: <input type=text name=BCountry>
</td>
<td>
If Canada, Province of Birth: <input type=text name=Province>
</td>
<td rowspan=3 bgcolor=#c0bec3>
<table border=1px border-collapse=collapse>
<tr>
<td colspan=2>
<i>For School Use</i><b>-Status in Canada:</b>
</td>
</tr>
<tr>
<td>
<input type=checkbox name=CCitizen>Canadian Citizenship

Applications Development and Emerging Technologies Page 14 of


22
</td>
<td>
<input type=checkbox name=Resident>Permanent
Resident/Landed Immigrant
</td>
</tr>
<tr>
<td>
<input type=checkbox name=SPermit>Student Permit/Student
Visa
</td>
<td>
<input type=checkbox name=Refugee>Refugee Claimant
</td>
</tr>
<tr>
<td colspan=2>
<input type=checkbox name=Ancestry>Native Ancestry
</td>
</tr>
<tr>
<td colspan=2>
<input type=checkbox name=Specify>Other (specify):
<input type=text name=OSpecify>
</td>
</tr>
</table>
</td>
</tr>

Applications Development and Emerging Technologies Page 15 of


22
</table>
<input type=submit>
";
?>
</fieldset>
</div>
<br>
<hr>
<br>
<?php
echo $_GET['Name'];
?>
</body>
</html>

Applications Development and Emerging Technologies Page 16 of


22
2. Create a php program that will display the same output below. Use control structures
to display the multiplication table with alternating color.

Applications Development and Emerging Technologies Page 17 of


22
Source:

<html>
<table align="center" border="2px" style="width:50%; height:50%; text-
align:center; font-size:50">
<?php
for($i=1;$i<=10;$i++){

Applications Development and Emerging Technologies Page 18 of


22
echo "<tr>";
for($x=1;$x<=10;$x++){
$data=$i*$x;
echo "<td>$data</td>";
}
echo "</tr>";
}
?>
</table>
</html>

VII. QUESTION AND ANSWER

1. What is a variable? In PHP, a variable acts like a labeled storage box in your program. You create it with a
name starting with a dollar sign ($), then assign it a value like a number, text, or even another variable. This
value can change later on.
2. What are the rules in creating a variable? Using a Dollar Sign, Start with a Letter or Underscore, It can
contain alphanumeric and underscore characters. It is also case-sensitive.

Applications Development and Emerging Technologies Page 19 of


22
3. Is it important to know HTML and CSS before using PHP? Explain. A: Because PHP is used primarily for
web-development, particularly the back-end part of web development. As a result, web development
involves collaboration between back-end developers and front-end developers.
4. What is the difference between operator precedence and operator associativity? Precedence defines the
order of operations while associativity when you have multiple operators of the same precedence which
helps specify which direction these groups of operators are prioritized during calculation.
5. What are the different control structures? Sequential Control Structures execute statements one after the
other as it is written in the code. Selection Control Structure allows for decision-making based on certain
conditions that must be fulfilled within the program. Iteration Control Structure enables code to be repeated
a specific number of times or until a certain condition is met.
6. Explain the rules of break, continue, and goto statements. Break is used to prematurely exit a loop or switch
statement. Continue is used only within loops to skip the current iteration and proceed to the next one. Goto
transfer control to a labeled statement elsewhere in your code.

VIII. REFERENCES

1. https://www.w3schools.com/php/func_string_echo.asp
2. https://www.w3schools.com/css/
3. https://www.w3schools.com/html/
4. https://www.w3schools.com/php/php_variables.asp
5. https://www.w3resource.com/php/operators/arithmetic-operators.php
6. https://www.tutorialspoint.com/php/php_arithmatic_operators_examples.htm
7. https://www.w3schools.com/php/php_if_else.asp
8. https://www.w3schools.com/php/php_switch.asp
9. https://www.w3schools.com/php/php_looping.asp
10. https://www.w3schools.com/php/php_looping_while.asp
11. https://www.w3schools.com/php/php_looping_do_while.asp
12. https://www.w3schools.com/php/php_looping_for.asp
13. https://www.w3schools.com/php/php_looping_foreach.asp
14. https://www.w3schools.com/php/php_looping_break.asp

Applications Development and Emerging Technologies Page 20 of


22
Note: The following rubrics/metrics will be used to grade students’ output.

Program (100 (Excellent) (Good) (Fair) (Poor)


pts.)
Program Program executes Program executes Program executes Program does not
execution (20pts) correctly with no with less than 3 with more than 3 execute (10-
syntax or runtime errors (15-17pts) errors (12-14pts) 11pts)
errors (18-20pts)
Correct output Program displays Output has minor Output has Output is incorrect
(20pts) correct output errors (15-17pts) multiple errors (10-11pts)
with no errors (12-14pts)
(18-20pts)
Design of output Program displays Program displays Program does not Output is poorly
(10pts) more than minimally display the designed (5pts)
expected (10pts) expected output required output
(8-9pts) (6-7pts)
Design of logic Program is Program has Program has Program is
(20pts) logically well slight logic errors significant logic incorrect (10-
designed (18- that do no errors (3-5pts) 11pts)
20pts) significantly
affect the results
(15-17pts)
Standards Program code is Few inappropriate Several Program is poorly
(20pts) stylistically well design choices inappropriate written (10-11pts)
designed (18- (i.e. poor variable design choices
20pts) names, improper (i.e. poor variable
indentation) (15- names, improper

Applications Development and Emerging Technologies Page 21 of


22
17pts) indentation) (12-
14pts)
Delivery The program was The program was The program was The program was
(10pts) delivered on time. delivered a day delivered two delivered more
(10pts) after the deadline. days after the than two days
(8-9pts) deadline. (6-7pts) after the deadline.
(5pts)

Applications Development and Emerging Technologies Page 22 of


22

You might also like