1. COMPUTER SCIENCE || PAPER - 1
LIST OF PRACTICALS
C++ PROGRAMS
1. UsingArray and Pointers
2. WithClassImplementation
3. UsingArrays of Objects
4. Basedon constructorsand destructors
5. Basedon operatoroverloading
6. Basedon type conversions
7. Basedon single inheritance
8. Single File Operation
VB PROGRAMS
1. Use of varioustoolsintoolbox.
2. Creatingand CustomizingMenus.
3. Use of If… Then…Else,For… Next
4. Use of Do… Loop,Case…Else
5. Designingatable
6. A Simple projectusingVB
HTML PROGRAMS
1. Designingasimple webpage withtext.
2. Designingasimple webpage withtextandgraphics.
3. Use of simple VBScriptinwebpage designing.
2. Experiment No.1
1. Write a program inC++ that firstinitializesanarrayof given10 real numbers.The programmust
sort numbersinascending/descendingorderusing Bubble –Sort method.It shouldprintthe
givenlistof numbersaswell asthe sortedlist.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard copy of the program listingaswell asoutput.(05)
OR
1. Write a functioninC++ that exchangesdata (passingby reference) usingswap function to
interchange the giventwonumbers.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard copy of the program listingaswell asoutput.The outputmustlistthe given
numbersbefore aswell asafterswapping.(05)
OR
1. Write a program inC++ that firstinitializesanarrayof given10 sortedreal numbers.The
program mustverifywhetheragivenelementbelongsthisarrayor not,using Binary – Search
technique.The element(tobe searched) istobe enteredatthe time of execution.If the number
isfound,the program shouldprintitspositioninthe arrayotherwise itshouldprint“The
numberisnot found.”(15).
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10).
3. Obtaina hard copy of the program listingaswell as outputforsuccessful aswell as Unsuccessful
search.(05)
OR
1. Write a program inC++ that firstinitializesanarrayof five givennumbers(short/float/double).
The program must addthese numbersbytraversingthisarraywitha pointer.The output should
printthe startingaddressof the array withthe size of the number(inbytes) towhichitpoints.
The program must alsoprintthe sum andpointeraddresswithadditionof everynumberaswell
as the endingaddress.(15)
2. Enter the programand verify properexecutionof the same onthe Computer.(10)
3. Obtaina hard copy of the program listingaswell asoutput.(05)
3. Experiment No.2
1. Write a program inC++ witha ratio classusingmemberfunctionslike assign()functionto
initialize itsmemberdata(integernumeratoranddenominator),convert() functiontoconvert
the ratio intodouble,invert() functiontogetthe inverse of the ratioandprint() functiontoprint
the ratio andits reciprocal.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard copy of the program listingaswell asoutput.(05)
Experiment No.3
1. ImplementaCircle classinC++. Each objectof thisclasswill representacircle,storingitsradius
and x and y co-ordinatesof itscenterasfloats.Include adefaultconstructor,accessfunctions,
an area() functionanda circumference() function.The programmustprintthe co-ordinateswith
radius,areaand circumference of the circle.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard copy of the program listingaswell asoutput.(05)
Experiment No.4
1. Write a program inC++ that initializesaRatioclasswithnoparametersas a defaultconstructor.
The program must printthe message “OBJECTIS BORN”duringinitialization.Itshoulddisplay
the message “NOWX IS ALIVE’’,whenthe firstmemberfunctionRatiox iscalled.The program
mustdisplay“OBJECTDIES” whenthe class destructoriscalledforthe objectwhenitreaches
the endof itsscope.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard copy of the program listingaswell asoutput.(05)
4. Experiment No.5
1. Write a program inC++ witha complex constructortoadd the giventwocomplex numbers.
A=_________________ and B=_______________. The programshouldprintthe givencomplex
numbersandtheirsum.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard-copyof the programlistingaswell asoutput.(05)
Experiment No.7
1. Write a program inC++ usingvirtual function.The programmustdeclare pto be a pointer to
objectsof the base class Person.First,the programmustassignp to pointan instance x (name
of the personeg.“BOB”) of classPerson.The program mustthenassignp to pointat an instance
y (name of the student,eg.”TOM”) of the derivedclassStudent.Define aprint() functioninthe
base classsuch that it invokesthe same base classfunctiontoprintthe name of the personby
default. The secondcall forthe same shouldevoke the derivedclassfunctiontoprintthe name
of the student.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard-copyof the programlistingaswell asoutput.(05)
OR
1. Write a program inC++ to implementthe followingclasshierarchy:ClassstudenttoobtainRoll
Number,ClassTesttoobtainmarks scoredintwo differentsubjects,ClassSportstoobtain
weight-age (marks) insportsandClassResulttocalculate the total marks.The programmust
printthe roll number,individual marksobtainedintwosubjects,sportsandtotal marks.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard-copyof the programlistingaswell asoutput.(05)
Experiment No.15
1. Create a simple HTML page on any of the followingtopics:College Profile,Computer
Manufactureror Software DevelopmentCompany. The page mustconsistof at least3
paragraphsof text.The page must have an appropriate title,backgroundcolororbackground
5. image,andhyper-linkstootherpages.The paragraphsmusthave textconsistingof different
colorsand stylesintermsof alignmentandFontSize.(15)
2. Save the file andviewthe same usinganyHTML Browser.Verifyfunctioningof the Hyper-links.
(10)
3. Obtaina hard-copyof the HTML code only.(05)
Experiment No.16
1. Create a simple HTML page on any of the followingtopics:College Profile,Computer
Manufactureror Software Development Company. The page mustconsistof a scrollingmarquee
displayinganappropriate Message.The page mustincludeatable withatleast5 rowsand 3
columnshavingmergedcellsatleastat1 place.The page must alsodisplayanimage,suchthat
whenthe same isviewedthroughabrowserandthe mouse isplaced(hovered) onthe Image,
an appropriate textmessage shouldbe displayed.The image itself shouldalsoactas a hyper-link
to anotherpage.(15)
2. Save the file andviewthe same usinganyHTML Browseroff-line.Verifyfunctioningof the
hyper-links.(10)
3. Obtaina hard-copyof the HTML code only.(05)
OR
1. Write a program inC++ to read the name of a countryfrom one textfile andname of its
correspondingcapital cityfromanothertextfile.The programmustdisplaythe countryname
and indicate itscorrespondingcapital (foratleastfive countries) inthe output.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard-copyof the programlistingaswell asoutput.(05)
Experiment No.17
1. Write a program inVisual Basicthat calculatesareaand selectionof twoshapes,Circleand
Rectangle.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard-copyof the programlistingbyprintingthe FRMfile.(05)
6. Experiment No.24
1. Write a program inVisual Basicto findthe Sumof first100 numbersenteredusingDoloop.(15)
2. Enter the programand verifyproperexecutionof the same onthe Computer.(10)
3. Obtaina hard-copyof the programlistingbyprintingthe FRMfile.(05)