Department of Information Technology
United College of Engineering & Research, Prayagraj
Dr. A.P.J. Abdul Kalam Technical University
Web Technology Lab (KIT-551)
Practical File
Name: Sumy Mishra
University Roll No.: 2)00]00| 30/2)
+h
Semester: SP
Session: 203= DRGINDEX
Name of Experiment Page | Dateot | Faculty |
Number | Evaluation | Signature
WAP inj ‘
mete to take input from user by using all the following |
| © Command Line Arguments 25}9)203
© DatalnputStream Class 4-4 Hh
© BufferedReader Class
© Scanner Class
Console Class >
Array) and print all the values using loop statement,
WAP in java which creates the variable size array Jagged | 5 25/9]2023 Lz
rote
WAP in java to implement the following types of inheritance: |
© Single Inheritance 6-8 |2s]9]2023 |
Multilevel Inheritance
| * Hierarchical Inheritance |
Hybrid Inheritance |
Create a package named “Mathematics” and add a class
| Satie PaaS: ade to add and subract matrices 2x2) 9711 | 3/t0/2003 =
| Write a Java program importing the Mathematics package and AA
use the classes defined in it. VZeN\
5, | WAP in java to implement constructor chaining and
| constructor overloading.
2-13 |9|J0]2023
6. | “Java does not support multiple inheritance but we ean \e-1s | lel to}203
achieve it by interface”. Write a program to justify the above
statement.
WAP in java to demonstrate that finally block is always 16 Ie] 10}202
executed whether exception occurred or not.
WAP in java which creates two threads, “Even” thread and |) —) 16] lol 023
“Odd” thread and print the even no using Even Thread and odd
no using Odd Thread.
9, | WAP in java which takes a name of a person as an input fm | q 44 | G||)] 2023}
the user implement the followings:
«Find the length of the string.
| a Create the abbreviation of the name.
|. Swap the case of all input characters.
—_+—-—
T
Write a HTML program to display your complete class time Nat
Gl} | 20%3
4 |
28-26 | 6|1)033 |
10.13
15
16
17
18
<| Write a HTML program to divide
web page using frames
Write an HTML code to demonstrate the usage of inline CSS,
intemal CSS, external CSS and imported CSS.
Java script for Web Page to display
Write a Java seript to validate
| Id and Password.
Name must contain alphabets and whitespace only
| © Mobile number must be 10 digits only.
Email Id must have one “@", and domain name is
“united.ac.in
Password must have atleast one alphabet, one digit and
cone special character (!@#S%8&")
Mobile Number, Email
Writing program in XML for creation of DTD, which
specifies set of rules. Create a style sheet in CSS/ XSL &
display the document in internet explorer
Write a program to implement Math server using TCP socket
and also write a client program to send user input to Math
server and display response as the square of the given mamber.
aq | aof|23
| 8-29 | 29|)]]2023
| a] (1/2023 |
30
a)-34 | 20)/)|2033
|
3S-36 | 24|11]2805)
1
37-40
2A] i)]2023
| \
Write a program to illustrate CURD operations using JDBC
connectivity with MySQL database.
41-43 | +] 12]2023| |
19
Write a SQL query to create and call the stored procedures
with following specifications:
Procedure without parameter and no return type
Procedure with parameter and no return type
Procedure with parameter and with return type
a4— 95 | 4] 2/2028
20
| write a program to illustrate CURD operations using JSP
ty with MySQL database on Apache Tomcat web
4fia}eos3Experiment - @ a
Objective — ;
wedeetve—- WAP in gava to dake input From user
y using all dhe following roedhode -
© Command — Line Arguments
© DotoInbutSteam — Class
© BoffevedReacer Class
© Scanner Class
© Console Class
Ii command — line srgumert9
class Commardlineinpur -
public @atic void irain (Shing a)
{ ig (ogo: length ==2)
{ syennou pintdn[ Pease
command Sine - 0-9
je inbt 08
0 2);
else
sem out
Vegan dire - argument") ;
for Cink d co) d< ange: length 5 iH
: Sybtern- out: paintuln vrgoment (sy) +"
+ owpo [a]);
frdn("You entered "+ ongd-degiht// Detoinputsirewm — Class
Import awa ios 3
Closs User input-@sarn ple
public Matic Ic Stir
' 2 Batic void rain (dd ig orga ))
DataTnpute eom —clajainpitehream = new
4 DatanbubSbream (Seen in);
coy §
at Sybreen: ouk= print (“Enter integes’),
int num aoteger porsednt (datadr put © lpm»
“readline ()) > Z|
SyGrem- out» pant Jn{*
entered: "nvm );
Enter 4 double”);
(cotadh putShew
dase pat Stor * thse;
Anlz0Eenepvion eo
‘ sien: er pinks (NE 7 en getnessage)
J
j
3} BufferedReader Closs
import —gava-io- BufFeredReader ;
import gaa: 10: DOENception 5
import Java +!0- Input Sbyeam Reader;
class Userdinbut
i ;
pobhe’ Qalic void main (shing ong LY)
' BufferedReader wedder = new Bollered Reader
(new aputStream Reader (5)Aeen sind)I| Stoner Class
Import — gava- Util Scanner}
Class Userinpit
pobic Gate vold main {Shing ang J)
Stonner Scannny = new Scanner [Spee in );
ier 00+ = pitt (“Enter au yy
String input Sting = scanner neat Line U ;
SyBtem: outs printdin (“You entered infasting );
2
scomney » Close 2
j
J
/ console Class
import gwa- To: Conse S
closs
Console console = Syem console (J,
if (console == null) { ; oy
ieenak- pointe (“Console 16 ho} available);
Sydem. exit uy
user Number = gnkeger . poco edie (“er Fi
Wy)
syjem-cu}: part dn (You ented ?-+ userNumbte)d
—Dbgective - wap i a e9 e Ve
in Java PIC oat }h Vorb
byechive hich dh rab |e
_Exberiment — 6)
Sze amay (Jagged Av
say) and print
*"9 loop Peis - pink all dhe valuro
class nggtdAvray
public Soke void
rot( JCI saggeatrroy 7
{1235, (Hs3, 16%% oJ;
co; dc gagged Ay length 5 4-4)
J lengthy a4)
a)
Ly
for (ine di
{
for(int I-05 IS angg estcrayh ES
639 96
_Labeiment - 6)
Objective — . .
eedive— wap in gum fo iemplemert the sellwing
yea of inhendomce :~
© Single inhertbonce
© monileved inheritence
© Hierarchical inheritence
® Hy brid inheritence
[|Sivgle Anhesitance
class Anima) | )
{
void eat
{ cyétere- out - print ros! is eating”);
J
class Do eatends Arimod) {
vid bork CJ
{ r ing’ 5
Siem out: paptin ("Oey booking");
Single f
ig Qadic void main (9 og (J) f
Deg oop = new Deg;
dag. atl);
dg bork O;
Jj
JJJ moldileved Irbert-once
Class grand porert {
void grondporent me) hod) {
Sytem: out point dn (" Oprand porente jo”);
,J
J
Class parent @aterdo grorobovent (
void — porentmedhod () {
Sytem-out: prinkln (“povente ")
J
Class Child extend powent {
void childrnedhod Uf 7
Syftera-out print (" thild’e
J
class Multi {
poblic Gate
{ ‘child = new Child 0,
6, geeondparent method Q
oe evel)
Child «child meehod
4
chi Md
JI] Hierarchical — Tnhevitem ce
class Shabe f
void chm l{
Sy@ern outs prinkdn ("Orowiv, Gabe”,
] er otrt: prinkdn ("“Orowing abe 1)
Class Ciycle e@xlendg Shape
void dvawCircle OU {
Sem out: printda (°Drowing civtle”) ;
dass Rectangle — entenda Shope {
void drawRectong le Of
Sytem: out prinkdn (Drwieg ze
gu)
J
lass Hier ovducal {
public Static up y, rain (Shing opal)
= wo Circle UL
Circe
Rectang le ag © = new Rectong le (J
ecoctomple -dwaw UO,
vechongle drow Rectong le (1;
7Exheriment > 4
Obyechve— Cade a package nomed Mathematica” and
& class Matin” with methode@ 10 add ond
Subhack matrices (22), write a gova program
tm porting. dhe Mad¢hemadied patkoge and use
dhe classeg defined «int
Mekhi Jove
backage Mathematic® ;
fublic class Matyi
private int [ILI roodin ;
public Matin Cin (IO mahin)
Unis. mada = mats y
5
public Machin acl other)
jr JC] /reoult = new int PIC];
for(i dco; dea dH)
; for(int JS 05 I677 att)
© ell phi. mebrinli [9] tether mahinGill
j
alum new Madina (esult)j
Zbublic Medyia Subbact(Motin odhex)
IMCI(] vesulk= new jot BIBI;
for(int dso; dea pdt
1,
for(int J= 0; 5427 a4)
T seat GIT = this. radian [o] [91] — other. mote ICT
j
atm new Neb (result);
:
;
public void peink fade)
forlint dam L520 +p
{.
forlint J=es yeas ot
t
System. outs pein (rm wain+ * ”);
System: out Py de 7
J
Main: goua
— smnbort — Maghernadica- Mat" 5
public class Main
1
public. etodie void main(String] og)
iIMCIC] morvinOotat = 11125, 13,4) J)
IMECIC] marinDataa = (4565, (7,055:
Mabie mobil = new Matyin (madsiv Dated);
Mohiw maliw2a = new Martin (matin ata2) :
Sy@lem: out prints (*Madwia d2 ”)
moalvind print Madina J;
Systers sont» printeln ("Madoiw 2+ ")
made a.print Matyie (7
Mobi sumMohiv = madrind: add Cmatain2)
Sedlem- out printdn (“tn Matin LF Wadein 21”)
Suman. oink Macha (J
Metin diffMadbig = madyind- Sub drack
Seem: out point (“in Matin 2 = Mate
aifP Madria « paint raha);
(readin); is
Matin 2:
yo 12 \
mobi 1 podria 2!
4-4
4 4_Exbecin nt ©) i
Obitdive— AP in gave to implement —tonPrurtor cheining
and —oracter overloading —
Lonshuctor chaining.
class Temp
Temp
dhis (SJ 5 ,
Sytem out: printdn “The Default corGheuctor”);
J
Temp Cin)
{ dhis(s, 1S)E j
Seem: out: printde (%) aft
; a
Temp (ink % int y)
{ ‘Siers-out print
Tre default conductor—ConGleuctor Overloading :
fublic class Box {
cbuble width, height , clepth>
int — boo
Box (double w, double h , couble dy int nom)
width= w)
beig ht =h
depth = d}
bowNo = num;
J
box U)
{
wideh = height = depth=o)
J 7
Bow (tht nor)
this U7
boxNo = 1
Jj . .
public Sadie old rain (shirg EJ og)
{ Bow dort = new Bon (Le
System: out printdn (bowd: wie Hh),
J
J
ouput — 0-0Enberirnent_No - © 4
Object ve - "Juve clore not Support —roulttple — inhradance
bol we can achieve it 0 interfaue”. Waite
a program to otlity the above = adtement +
[Define dhe fixe — interface
interface Animal
{
void eat}
void sleep):
N0efine Phe second — interface
interface Mamma,
void giveBith U;
3
[/irplemert jnteacea in a class
class Big implercerta Anima), Marna
public void eat)
t Syden- out - printdle (“Dog fs enting);
J
| public void AeepU
T sae outs prtbel™0ug. sehig’)
3(s
buble void giveBirthU
Seétem-out- printdn (“Cog giver birdh to fubpioe'):
J
3
poblic class. Maint)
public atic void — mean (shina 7 ogg)
Deg myo = new Doge:
m Ong -eat VU;
™ Dog: Sleep
ro eg s grebiedU;
citteh- py ic ent
De is € “4
Dog gives bidh to pebbiesExberiment No-() 16
| Okpdive— WAP in gave to clemondhate — Rat Ball;
bloods i's alway eoecuted — whether
Ca
public closs fret
excepion occured
bubhic slodic void evan (Shira [7 ong?)
q
tyf
int -reevlk = lo/o 5
Soleo: oud printuln ("Resolh” + xesuld);
catch ( drithmedicEuce pron e)
éption cong lt own
‘ Sem: out + brinteln ("
get Message U)>
J
Finally { ; ,
Sylem-our+ bintdle fe Finally look is cnoated’)
J
ayGenatl: pinkh( pogrom contioues after dhe
fey cach Fially blocks”);
Jj
J
put Exception — caught? / by Zero
™ Finally block " cool
progim —continves afte the toy~Cadch #nally Boeds1+
Enheriment. No- @)
Objective — yap in gova whith orealee two Heade ,
“Even” dread ond “odd? tread and pink
the even no wing Even dread and odd no, ceeiyg
Odd tread —
Class Even ewtenda@ — Thread
public void wn
for(in. deo; dele ti)
if(dv~acso)
‘ SyGten sour: brink ("Event ip:
jo
j J
class Odd a Thread
{ public void ant)
for(int deo; G<)0; 044)
t iF (dy2)=0)
monk nt
j J
gdclass ted
p
4
poblic Bake void main( Aeing] args)
1
Even obgd = new Even (J;
Obl: Hort O 5
Odd oboe new Odd (35
Obga: Sart U-_Exberiment No—@) 19
whith Jakeo a name of
goa
dhe user —imbjement
Objective— wap jn
Q person as am jmp fem
dhe — followinge —
© Fird dhe deegth of the Shing
abbreviation of the name
© Create the
© Swab éhe case of all input charade
impost §— gave tttil- Scanner;
poblic class tect
public stale void main [Sina [J ovge
pid
Stapner Scanner = new Scanner (SyAem in) 3
Sytem oul + printdn [4 Enter ame”):
Stn hame =
stanner+ Close (zy
j = rrarae: JergthC];
SyGem out: prirtdn (“length of be nome” + leogth);
Shing [J] nomePorta = name-
Zhtmd>
Time Table 4itle>
Z}head>
ineeeing and Rescordh
Zcenter > United College of bg
<|hi>
zha> B TECH V SEMESTER TIME Tate <]b2>
Zeaphion > wr ref do Mog 30p3
cable border = “1">
2" > Branch! TT
2th colspon 342" > Sections H< [th>
Room N <]th>
Lth —colshan = "> WeEH
Zh
i>
Zth celspon ="4" > Class Fnchorge |
Zth celsbon = Gg" > 6299516099 < th>
Z| tr><40>
ZAth> DAY <|th>
SAS 9il0 S/LAD
10! 1)
| sia 2] th>
| 2: 1<(th>
Zth>}:2<[th>
Sth> 213 <)th>
ZEND 3B» 44 [END
4te>
ci
: ZAK> Monday. 2] th>
zid> WT <[4d>
Ztgy LR ae
Zta> Pan4ltd?
eig> DBMS
zid> wT Tuesd 2)th>
zid> LR< td>
eddy COL
Zid> PAA
Zhdy OBMS <}td >
ctd> PSP
ZAdz_MAaTH c]t%>
Wedne sda
| Cot < Ha>
| DAA 40>
Zid> PR
|
Std> CoT 2htd>
eae mh
<4d> Oosp <)4d>
Ziv
Zbb> Thorsdoy
Zids HRMS ZItd>
24g> wT
ML
Z4ds OSD |
td > 9sD cltd> ee
Lay MATH | we
oro
Zah> Pride <14h>
etd> WT
ys" > LAB <)td>
Zag Ape selon:
chd> WT Zttd>
eta> pps <14d>
cAd> Cor |
ctd> PSP cl4td>
ante? Sodurrdagt 4) th>
| wT
24d > LAB
le = “wbr! blue" > pems |
Atd sy
eid> WT <)td>
Ztd> MATH
Ltd > PSP
Papeoy fies
fo
<[cen\er >
Z| body>
Zfbinl>_Expesimert No ~ @ as
Objedive— write og HTML rogram 40 display the
given need dia —
4. Coffee
2 Tea
A. Black tec
2 Green tea
8: nile
° Black Mi}
° Gree Mile
4. Cheese
zhiml>
< head’ >
Zkhe> Nebed Li€k> a
.
Zhi > Coffee <)>
Zdi> Tea
Zod> .
Black tea<|dbi>
Orreen bea
Llok>
ahdi>
2di> Milk
cud> .
Z0i> Black Milk sid
- Oreen Mills i>
i Cheege
>
aibml>Exherme
Yyotr
th
HTML broavam to divide
¢
frameg —
— Write 4
web page using
¢
=|pocTYPE btmd>
ZHU Use Frame <]Lite>
< fromeset rows = “aon, Got, 207”
Frome names “top” src= "c3 JUsers | abet. rp” >
“pain” sxc = “Ci fosees | adra-po9”>
frome rome = “boftom” ere = “C2 Jusers/ atte 3 pma">
Zrofromes > _
doee not
| nofrarea>
<[Fromeset>
Z|htad>_ Bubeximent No- (13) 20
Objective rile on HTML ede to cemonghate dh
5 re
usage of inline CSS, inlernad css » Ceternal
ess amd imported = CSS
Zhimd>
CSS <[Htle>
Zbink veh =" oigleet” ayhe = Newt fss! brveP= "ng speest>
dink ved =" atglosheed” the = “Feobkfess” hee £ = "imordeg css"
body f ¥
d bavkground — lori blues
J
«para {
Z)8gle> <| head >
Zbody>
Zhi Class = “para” > Tnterral css
Zho syle = color: ved;""> Fnline Css
ep css = "4e"> This is 0 Lwternal 045
and dhs is the enum ple of — bet
css enannble 29
ha> Porageabh of Eaten) ess
clotaderiad of huported CSS CPaueh le h4>
Browser Name: + i ifator- opp Name +
ipo"),
joni "+ nawigator.app Version +
“eyp>");
clocumen}: write (“ Browser
clowwment- ware (“ap > Cookies Enabled + "+ rawigaton coofs ie Enabled
“ip>”);
docomen|-wnite(*ZP> Online Status "+ rawigator. online + "ejps”).
dovument- write(" PlaHfowre +” nonigaior: bheHferm +Yp>”):
esp?
Z} body>
htmEnbesirent No- (3
Urile a Jon Seribt 0 validate Name,
Okjecive -
id amd password —
rmobile nurnber , Email
contain adphatele ond —cuhife xhave on
0) oighte ong
ond — dorain name
OName mud
© Mobile number moxb be
id mut fave one #6)”
© Email
Ss tunlted-acc ip? 6
® fossword mvt hone atdeakk one abhabe} ,
digit ord one Gecrad choracter (1 OH-K 4 24)
one
Zhtmd>
Zhead>
Z4title’> Form validation <]-Li:
form \alidation <|hi>
| | |
ath > Nawe <(thd 2thd
wee her mi)
while Cos- neetO) f
out +pouthlle (Meee?) 5
i
out pinks (Hetd pte vs. gobi (SFa)# Mel);
ott: prinkdn (Set dd" 495+ gedShing (Cramee?y Melee) |
pudepinddn (cay? bas: getznk (ge) + Le;
eu pinkdn (“CoH JOud -prinkde (“”);
eine pan oy = '“ypolade emp set ae = 81 where
name = ohh!" »
st: neue Updete (upde ourny t)
String. delete Ouro = “Delete fom — emp where
home = ®t ohn! tig
st- eveuteU pdo¥e (delete Quer)
J catch (exception @)
t e+ point Stark Trace (J)
I
b>
Z [body>
<[himd?
| | |