

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Key points of this quiz are: Web, Programming, Body, Source, Code, Output, Pages, Case, Study.
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


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:
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;
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.