Sie sind auf Seite 1von 4

School

Department
Course Code
Course Description
Purpose

: ACLC College of Mabalacat


: College of Computer Science
: WAD 322
: ASP.NET (Active Server Pages)
: To be able to create a Dynamic Website using ASP application in
Web Development.

Period
Scope
Week #
Machine Problem

: Prelim
: Sequential, Conditional, Looping and Array Programs
: 1
: Setup the IIS in your Computer and execute a simple ASP program
that display Hello World message in your web browser.

Solution
Procedure on Setting up IIS
1. Click Start
2. Control Panel
3. Uninstall Programs
4. Turn Windows features on or off
5. Check IIS/ WWW Services/ Application Development Features/ ASP and ISAPI
Extension

Create a file Hello.asp and save this at drive C:\inetpub\wwwroot. After saving execute and
view the file using web browser. Command at address bar should be
http://localhost/Hello.asp.

Week #
Machine Problem

:
:

2
Create a sequential program that will compute two numbers using
four basic operations (-, +, * and /).

Create a conditional program that identify if the grade is passed or


failed. Remember that 50% is the passing grade.

Solution
1.
<%
dim num1, num2, calculate
num1=10
num2=30
calculate=num1+num2
response.write("Sum is:" &sum)
%>
2.
<%
dim grade
grade=70
if grade >=50 then
response.write("Passed!")
else
response.write("Failed!")
end if

%>
Week #
Machine Problem

:
:

3
Create a conditional program that will determine if the entered
choice is either Male or a Female.

Create a Looping Program that will display A S P . N E T five times.

Solution
1.
<%
Dim Gender
Gender="F"
if (Gender="M" ) then
response.write("Male!")
elseif(Gender="F") then
response.write("Female!")
else
response.write("Invalid Gender!")
'end if
end if
%>
2.
<%
dim Ctr
Ctr=0
do while Ctr<5
response.write("A S P . N E T </br>")
ctr=ctr+1
loop
%>
Or
<%
dim Ctr
for Ctr=1 to 5
response.write("A S P . N E T </br>")
next
%>
Week #
Machine Problem

:
:

4
Write a program that read 5 test scores in array then output the
highest and the average score from the given inputs. Identify if the
Average is Passing or Failing.

Solution
1.
'Declaration of Variables
Dim Score(5),ctr,high,sum,average
<%

'Value Entered in array Format


Score(1)=75
Score(2)=87
Score(3)=90
Score(4)=77
Score(5)=88
response.write("WAD322 PRELIM AVERAGE<br/><br/>")
'5 times loop
for ctr = 1 to 5
response.write("Score("&ctr&"):"&Score(ctr)&"<br/>")
'Condition for getting the highest value from the give array entered values
if (Score(ctr)>=high ) then
high=Score(ctr)
end if
'Get the total Scores
sum=sum+Score(ctr)
next
'Getting the Average
average= sum/5
response.write("<br/>Highest:"&high)
response.write("<br/>Average:"&average)
'Condition if the average if Passing or Failing. Remember that 74.50% is the passing.
if (average >=74.5) then
response.write("<br/>Passed!")
else
response.write("<br/>Failed!")
end if
%>
PRELIMINARY EXAMINATION

Period
Scope

: Midterm
: Form actions using ASP commands
MIDTERM EXAMINATION

Period
Scope

: Pre-Finals
: SQL and some File Maintenance program
PRE-FINALS EXAMINATION

Period
Scope

: Finals
: Continuation of File Maintenance Program and Building Own website.
FINALS EXAMINATION

Das könnte Ihnen auch gefallen