Introduction to Web Programming - Web Programming - Quiz, Exercises of Web Programming and Technologies

Key points of this quiz are: Web, Programming, Body, Source, Code, Output, Pages, Case, Study.

Typology: Exercises

2011/2012

Uploaded on 10/24/2012

gaggan
gaggan 🇮🇳

4.4

(51)

111 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Department of Management Sciences
Program: BBA –VI Course: web Progg.
Time Allowed: 1.5 Hrs
Max Marks: 25 Time: 1200 - 1330 Hrs.
Instructions: I. Question carrying equal marks.
II. There is no choice available.
Q # 1) Answer the following short questions:
Body tag is for?
There are three equal columns in the web page document, what tags are used to create it?
Create table of 4 columns and 3 rows, and span the last row to one column?
How to create a button and two text fields in a form?
Write the tag for sending mail with subject?
Q # 2) Go- through the source code and show its expected output?
// JavaScript File
function ValidateCreditCardNumber(objSource, objArgs){
var retValue = false;
var CC = document.getElementById(objSource.controltovalidate).value;
if(CC.length > 19)
retValue = false;
sum = 0;
mul = 1;
l = CC.length;
for(i = 0; i < l; i++){
digit = CC.substring(l-i-1,l-i);
tproduct = parseInt(digit ,10)*mul;
if(tproduct >= 10)
sum += (tproduct % 10) + 1;
else
sum += tproduct;
if(mul == 1)
mul++;
else
mul--;
}
if((sum % 10) == 0)
retValue = true;
else
retValue = false;
objArgs.IsValid = retValue;
}
function ValidateCreditCardExpiration(objSource, objArgs){
var month = document.getElementById(objSource.controltovalidate).value;
Docsity.com
pf2

Partial preview of the text

Download Introduction to Web Programming - Web Programming - Quiz and more Exercises Web Programming and Technologies in PDF only on Docsity!

Department of Management Sciences

Program: BBA –VI Course: web Progg. Time Allowed: 1.5 Hrs Max Marks: 25 Time: 1200 - 1330 Hrs. Instructions: I. Question carrying equal marks. II. There is no choice available.

Q # 1) Answer the following short questions:

  • Body tag is for?
  • There are three equal columns in the web page document, what tags are used to create it?
  • Create table of 4 columns and 3 rows, and span the last row to one column?
  • How to create a button and two text fields in a form?
  • Write the tag for sending mail with subject?

Q # 2) Go- through the source code and show its expected output?

// JavaScript File

function ValidateCreditCardNumber(objSource, objArgs){ var retValue = false; var CC = document.getElementById(objSource.controltovalidate).value; if(CC.length > 19) retValue = false;

sum = 0; mul = 1; l = CC.length; for(i = 0; i < l; i++){ digit = CC.substring(l-i-1,l-i); tproduct = parseInt(digit ,10)*mul; if(tproduct >= 10) sum += (tproduct % 10) + 1; else sum += tproduct; if(mul == 1) mul++; else mul--; } if((sum % 10) == 0) retValue = true; else retValue = false;

objArgs.IsValid = retValue; }

function ValidateCreditCardExpiration(objSource, objArgs){ var month = document.getElementById(objSource.controltovalidate).value;

Docsity.com

var year = document.getElementById(objSource.controltovalidate.substring(0, objSource.controltovalidate.length - 5) + 'Year').value;

var expireDate = new Date(year, month, 1); var currentDate = new Date();

objArgs.IsValid = (expireDate > currentDate); }

Q # 3): Read the case study and code web pages:

Consider a hospital: Patients are treated in a single ward by the doctors assigned to them. Usually each patient will be assigned a single doctor, but in rare cases they will have two. Healthcare assistants also attend to the patients; a number of these are associated with each ward. Initially the system will be concerned solely with drug treatment. Each patient is required to take a variety of drugs a certain number of times per day and for varying lengths of time. The system must record details concerning patient treatment and staff payment. Some staff is paid part time and doctors and care assistants work varying amounts of overtime at varying rates (subject to grade). The system will also need to track what treatments are required for which patients and when and it should be capable of calculating the cost of treatment per week for each patient.


Docsity.com