This document was uploaded by user and they confirmed that they have the permission to share
it. If you are author or own the copyright of this book, please report to us by using this DMCA
report form. Report DMCA
Overview
Download & View Javascript : Online Exam as PDF for free.
<script> var Radix={}; Radix.Question=function(statement,op1,op2,op3,op4,answer,marks){ this.statement=statement; this.op=[]; this.op[1]= op1; this.op[2]= op2; this.op[3]= op3; this.op[4]= op4; this.answer=answer; this.marks=marks; } /////////////////////////////////////DATA Access Layer Radix.QuestionDAL = function() { this.questionL = []; this.questionL.push(new Radix.Question("What is JavaScript?","Its a scripting language","Not related to Java","Both","None","3","10")); this.questionL.push(new Radix.Question("Java is the product of?","Moon","Sun","Star","Microsoft","2","15")); this.questionL.push(new Radix.Question("What is the maximum heap swap supported on a 32bit JavaVirtualMachine?","1024MB","512KB","2048MB","Unlimited","3","15")); this.questionL.push(new Radix.Question("Who is Richard Stallman ? ","Employe of Microsoft","Actor","Father of GNU Public lisence","A Saint","3","20")); this.questionL.push(new Radix.Question("Who is Mark Shuttleworth ? ","Founder of fedora","Founder of Ubuntu","Founder of Debion","None of above","2","20")); this.questionL.push(new Radix.Question("Identify the guys in below picture ? ","Employes of Microsoft","Founder of Linux","Founders of Google","None of above","3","20")); } Radix.QuestionDAL.prototype={ getquestion : function(a) {return (this.questionL[a]);}, getlength : function() {return this.questionL.length;} }; ////////////////////////////////////////Presentation Logic layer Radix.QuestionPLL=function(){
} Radix.presentation_obj.updatetimer(""+Number(timer.timeout-timer.counter)+"",""+timer.timesaved+""); timer.counter++; }, starttimer:function(){timer.tref=setInterval("timer.process()",1000);}, stoptimer:function() { this.counter=0; clearInterval(this.tref); } }; var timer = new Radix.Timer(); ////////////////////////////////////////OBJECT OF PLL alert("Press OK to start the exam. You get "+timer.timeout+" seconds per questions."); Radix.presentation_obj=new Radix.QuestionPLL(); Radix.presentation_obj.start();