TECNIAINSTITUTE OF ADVANCED STUDIES
GRADE "A" INSTITUTE
Approved by AICTC, Ministry of HRD, Govt. of India, Affillated to GGSIP University EGAC IS0
Recognized Under Sec. 2() of UGC Act 1956 Accredited 21001:2018 S1001:2018
INSTITUTIONAL AREA MADHUBAN CHOWK,ROHINI,DELHI 110085
Tel:91-11-27555121-24, E-Mail : directortias@[Link], Website: [Link]
ASSIGNMENT
OF
BCA-104T
OBJECT ORIENTED PROGRAMMING USING JAVA
INFORMATION, COMMUNICATION & TECHNOLOG Y
Academic Session: 2024-25
Submitted to: Submitted by:
Dr. Ratandeen Kaur Name: Paramveer Singh
Enrolment no. - 03117002024
Astacint Professor
Programme: BCA
Semester: II
Shift : Morning
Aakigamnd -1
ustin1 hat s inhitanee ?How doesJawa
suhot
ndwe Iheitance id a fndamtal concebt ia (oo)dht
llss a niw clas to nhent bootis dnd behaon
Lbtyd etabldhy a heichchical helationshib s/wlaued.
Slow a neuclas CSbcla) to cinhort psptis anol
Umets ues th extndy eeyd to umelemat unhetane.
atin Explain theconcett o method oreloading
lth
str Mthod oelsading in Java allss a las te hane
mltile wththe wae nene but wth dileret parenies
Thisenebles ou to,eat method that henm imilae
atisn but con hendle diat tys a mbrs
Sut.
ta Iritiae objedts : Conithucod ae shecial methodythet
du autonotica ly [Link] an abjed a cla! s at
Tawyp tsto uot the intial ttati o the abyect b
igning vale to te instaace varahles
Gaist tw
9bjt tuotien : They
nstnces ofa alas. hen you ue th (u)kywod, you au
inveig aLonstuct.
Settin Iritialvalus! Conthuctoi allss yeu to dalne
how an bjt ohoud be et wt when t it oustd This
utisn-t Exblain the dilne betwtn ecnlintanca and
static Vaniablus.
tenpoys uniae ta each
nethods /blscks,
Lscal: Iaside
Becutisn.
tatie : Iaide clauuy shand by allobjot o the clas
lasll
|ustian-S Whotis the inmportane of lss a ploafamig
Atn Loops ae ndemental ta prosming becawu they
lans e the eiient etitn ocode. Losa u l
poghamming ts ust elciet, conci, Ghnd
B helss/bds with:
futomatan of Rapetwt Tasks
Dacta pracssing
Flviility
Rakignmeat -2
estin -1 brplain yle of a thrd.
evesl daty.
dhrgh
Uut AJawa thuad brgus
tartd
New- u a t d but not yt
the Java.
mhod.
ity new l )
a
a
lock
Bosckd- ldaitiny to aceLiru
choltien.
Weity- Ihastie, uaitiy tor a notion ot
c
- llaitiy ora ses cifie duration
Iintd aatiny
Tomintd -Euection Combltd oteminst cw to
stisn -2 Diss thu b r s thad synchiion
Tuith the helo of appranidu code.
cenewwy
BnsutThouad synchizatisn in dawa manage
access ts shard s c s esing moyitoy, clocksntts
-
ised Methads: Tha ete thd ds locked on th obrt
tat a
nonitou ensiny ny
dim
Codei public synchzid void unthemit s cnt +t,
ynchnnid Blocka :Ordy the code within
the Synhrond
Aoches Gn the
peced shjuty manidon.
JIAccaas andmo
ynchenizntian þrevats sae lbnditisy Gad ersl dota
odend
Rieaion to ctho Jaa, UntiQ conhst [Link]
ati? Exlain any S stin clas mudhods in detal.
euew
"mthads:
LenghC: Retums dhe total cot of haraty in the
cher At Cuntindex) Rstires the chanacter at a
spacipie pesition,(inda) uithin dhe
dtring .
eaualsobjct an objct): chacks uy this triny ha dhu
Bact sma deqluence o charactey
itu
Substriny (int bagin Inde) /Substiny Cit bhtyin ind,unt
Cndinde: Suat and t s anew ting dht's a þaction
o the orignal, ether Bromtaing indu dhe emalind
Iado ap(inp st):Funds the ind o thest alune
o a ginn debstig within this sting.
Pustisn -4 Dediate betwen chicksd and unchachud
cebtims.
checked Exception Unchckol txcatsrs
feicad Hadling: The cemklan 1) Not ohcod andiny : Th
to hondlithem
you to handethum
Lsing dry- codeh or declering
them i method'thgus
Indicate Ricoreneble Eres:
Duwu: 2) Trdicate Rscowable E s
ybially epusent eweebtisnal
Conditisnsthat yew
swr prugtom ehy rconditions dhat
ight ualonablyle
during ntin.
bo-inta
Exonle: Io Eruption, SoL 3) Examel: Nall
ecahiing Armay indr Bd o
dounde excaption
Auestisn 5 whit abregnam do iltnate bullsud
stuom amd Blerad Qthut strsam
publie tatic (usid moin
Bring data This is dome dota do uite ordrsd,
andd
(outpstl}
bas. uhite Cbete Dotoa)y
codch CIoEcetdisn e)
buloud inut thuan bi =ne bulcd winhet
ring Buildr conta =nw
lonterd. abpendcho bula uad,
tuan'4 content)
e-bint tack race C),
uusti -6 Lombare bute tuom class and charactn
Jtucm clas
Bute stom clay characo thuan clas
1) Hondle data as Jiquence 1) Honds data asa nce
o charaturs (I6 - bit
ncoda).
) d o binary data Cimagey 2)inal twed otact
udison) and cen hande any dtay
atamaticaly hándliny
cheractr encoding ldscadi
) os end with intut
sth3)cla endt wt Reacer