Sem3 Papers Y21
Sem3 Papers Y21
Techncogy, Jaipur
The LNM Institute of Information
CSE226: Advance Programming
2022-23(Odd Semester
Mit Term Exam
aie: 27th September 2022 Time: 90 Mins
Max Marks: 50
Instructions:
. There are 7 questions. All the questions are mandatory.
h. Write all the sub-parts of a question at one place.
eMake and state assumptions precisely, as and when required.
d. All the notations have their usual meanings.
What do you mean by software? Discuss Custom, generic, and embedded software with
suitable exanples. 51
2 Discuss the Top-down and Bottom-up software development approach with suitable example. I51
An enployee ofthe company stays in a flat or a bungalow. It may be owned by company, employee
oF may be rented by either the company or the employee. The owner who let houses to company may
themselves be company employees. 1Tenant in a flat must pay society charges apat from rent while
bungalow tenant must pay additional water and electricity charges. Model the above sysiem using
UML techniques and draw the following diagrams. State your assumptions clearly. 10
(a) Class Diagram
b) Object Diagram
Explain Generalization and Aggregation with a suitable cxample. How to annotate these concepts in
the unified modeling language 5+2-71
What do you understand by instance variables? lHow they are dillerent froun reference variables.
plain the use of the statismethad.and staliëvatiable.with.a.suitableesanple. [11+2+2=6}
6.Write the short uotes on the followings:
al Stakehoiders
25-1t}
(b) Software Quality
() Feasibility Study
a) Encapsulation
(e Abstraction
LNMIIT/B. Tech/CSECore:2022-23/ODD/CSE222/MT LNMIIT
stetic hekeg
ciass HelloWorld
public static void main(Stringll args)
String sl-"Sachin":
String s2-"Sachin"
String s3=new String("Sachin");
String s4-"Saurav";
if(s1=s2)
System.out.println("Hi");
if(s==s3)
System.out.println("Bye");
if(s3s4)
System.out.printin("Hi and Byye"):
LNMIIT
LNMIITAB. Tech./CSE/Core/2022-23/01D/KSE216/MT
Technology, Jalpur
The LNM Institute of Inioruation and Architecture
CSE216: Conputer Organiza izatíon
2022-23 d d Semester
Mid Term Exam Time: 0 Mins
2022 CO CO4
Max Marks: 40 Date: 29th September CO2
:
Total Marks
Totat 6.02-4.03-4,043.74 08- 4
QI6.
uestioS 40
Q5 6. Q6-9 8/40 20%
COweightage 32/40 80%
Instrueions:
AJI the questions are mandatory.
a. There are 9 questions.
at one place.
b. Write alt the sub-parts of a question
as and when required.
Make and state assumptions precisely,
.Losdindireet 10
Dut
sa that afl instructións can be imptemcnted nardware
le 4t eonyters ae
strtictured
iunaliy
Hein sonputrs are to ticeorn a kiitieg
h a t wouid ie the. henei(s) o using a two-address instruction
ofneation versus using rce-address instruction?
A
21 Progranis often link lo mmultipie DLlLs Would it not be efficient just put alf thO pCEderei
7 f41 Calculate the rale of instruction execution for a 2.5-GHz RISC processor that uses S-step sequence 10
eecute instnctions with following statistics.
Load 20%
Store 25%
Branch i5%
Computational instructions 40%
Assuie 80a fetch operations are completed in 1 clock cycle, the remaining 20% ferch operaticns are
compieted in 4 clock eycles, and on average. each access to the data operands of a Load or Siore
irstruction takes 3 clock cycles for completion.
1 4 2 2 ] Consider a processor with single-bus organization of datapath and proyide controB sighals for
Echstep to executefollowing instructions.
Add he contents of the memory location whose address is at memory location NLM to Tegister
b. Branch to subroutine: Call NUM, where NUM represents the ofiset value required tor compating
target address. Use a stack pointer to store the retunm address in inemory Assume that cach
insiction consisis ofiwo wonds where the first wordspecifiesthe operatiot and the addressing
Fode,and the seccnd word contains
the nun1ber NUM.
TA
LNMIIT/B. Tech./11 Sem/2022-23/EVEN/C;GE2
iNPORMATIONECNOLOY
INSTITUTE O NINEFRING
THE LNM COMPUTR SOENCE
1DEPABTMENT OF
ud Its Applications
Insiructions
Answer all questions.
with proper justifications.
Write each and every steps while solving the problem
following LP Problem.
I. Consider the
basic ieasible
problen in standard form aud obtain the initial
the given optimization
a) Represent 2
solution.
4
) Optimizes it by using Two-phase Method.
to solve the given problem.
c) Justify why it needs Phase-II
Minimize Z= 3t1 + 2t2
i) 5 + r2101
(ii) 2 +2r2 212
ii) 4 a 1 2
. hree-shift hystom at, o ot tts plants, In a ceitau
2 Let there is production rompany t quired on aci tiue thre suifts is as otlos Th
section of the plant tle tumt f ipe
Namber of Operators
hift
Day (6 A.M to 2 P.M)
to 10P.M 24
Atternon (2 PM
Night 10 PAI to 6 P.M
the astk rate RS per hour inr tiOs working
Companypa s op iff othe day shii. Fr
night shifts, the rates T D
Dng ud
avrd Halt
tnlf t
the aftemoon and the rates tiies the b6sic ratéarit twice thc fiasie
rate respetively In agreenent with cnch operator at the connencement of his uploynee e i
alhd (H are as follows
allocated to oneof thee schenes A.B
A 1Work fou average) oue nigbt shit, o e o i l ait, ant two day shifis in very foar
a Forinulate a linear programming programmiig model to obtain the required number of operators
at the minimum cost.
++F = 15
(1 2 2+2r3 = 20
****END***
LNMIIT
LNMIIT/B.Tech/IC/2022-23/Odd/MTH213/MT
Technology, Jaipur
The 1.NM Institnte of Inforali
Department of Mathematics
MTH213: Mathematics I i
2022-23 Odd Senester
Mid Term Exaination
Max.Marks: 30 Duration: 0 mins
pg n b e r 0n the front tpage of vor answer sheet in the following fornat{the questiori nuiiber
without page iunber mentioned shall not be evaluated
Question No. 1 6 8
PageNo
xanine tie tiunction f(:) = 1z 3 for diltferentiability at z for all 2 E C
coustant throughout D
3. Verify that ulz.y)= Ary- r+3ey satisfics Laplace cquation for al (7,v). Furthior find harmonie
eunjugate of vir. y) aud find corresponding analytic function f(z).
4 Fimd tie largest tdonaiu ou whiclh f(z) = Log(;) is analytic and find the derivative f'() wherever
Cxists
7 1et Che the citcke j - R{R > 1). deseribed in ihe counterclockwise dlirectioni. Usethe MI-inequality
T R+T
.
LNMIIT/B.Tech/1C/2022-23/Odd/MTH213/pr
The LNM Institnte ot Iuformation
1echnology
Department of Mathematics Jaipur
MTH213: Mathenatics I
2022-23 0dd Semester
End Tera xamiiation
1Decoiber i, 2022 Duratiot:3 IIO1RS
Max,Marks: 50 Date:
TotalQpestionsTotal Marks COT CO2 CO3
14
Q-1 Q-2 -3,456,7(9,10,11,12
TO
CO-PO weighilage5 % 86 3 48%
Iistructions: Tlere aic total twelve qnestions. Marks awarded are shown next tothe question. (alcuiator
is not allowed. Justify your stafements. It is nandatory to make an index showing the questjon nurnb*
aud page mber on the ront page of your answer slect in the following format(the questiou number
withont page nunber mentioned shall not be evaluated):
Question No1
Page No.
rove tiat Arg( 2 ) = Arg(i) + Argl22) + 2nt for some n e{-1,0,1} 3 Marks
(Comsiuler the fnction f(:)= Show that f(z) satisfies the CR-Equations atz 0.1s
2 =0
tue functio difterentiable at z = 07 Justify your answer, 4 Marks]
3. Findl: 3 dz. where C is the right half of the circle C: (t) = 5e", st 4 Marks
. Fid ad the possible sevies expausions in powers of for the function f{:) = iz +3 the
iolioving donaius:
fa)D, fi<2}: (b) Da={:2< kl<3}: (0) D={::l=|>3}. 3 Marks}
t , n >0 4 Marks
7. Usn the residue ticory evaile H
ad the sjiutin of the equation uls + yhu t auly)u with the Caihy data o
Marks]
9Deeine the region i witclr ile pquation a 2w44 y j s iyperbolie. puabolie o
pfic. atit transfut the equation i th tespective gn tá its camiical ma 5 Marks
yekacit ukt,O} tia he trs z
wit the ititia tispiataneut í#,U) f(r) nnd initial i) i itingat tirrig f a t e . E
dispiacent 3 } 1on tie ituen m4inri (
Marks
r , } f i r t) I(rt et2
initiai value piobleni {IVPF
I Filid ti siutin ri ile foliow ing
.t
coT
( ,0) = a , u x ,0)
5 Marks
orTESatig
non-noniogeneous itial onitioi
C"osider the homogencous
wave equation with Furtyes.
Hini: the
d'Alembert's solution. Call soiution u(r,t
Solve it directly by using the
t VP (1)-(2. with ho110geneous
mitiál conditions orrestondng toIVP
equation
sidcr tie uon-lhonmogeneous wave Call the solution tlr. t). it
is easy to s e e
the Duhamel p1inciple.
I 2 Sove it directly by using
that u is the solution of thie IVP (1)-(2).
solution of the following initial-bountar
vde
method of separation of variaBbles, find the
12 Ug tie
5 Marks
End of paper
LNMUTB. Tech./CSECore/2022-23/0DD/CSE2i6a
6/T LNMIIT
The LNM institute of Inforaation Technology, Ja+pur Techiny
CSE216: Computer
CSE216: Computer Orga atiom ecnoloRy, Jaipuro
and Architecture
2022-23 Odd Semester
EndTerm Ea
Max Marks:80 Date: 5t Vecember 2022 Time: 3 Hours
Total Total CO1 C02 CO3 C04 COs
Questions Marks Q1-803-5- ,04 Q5-12 Q230
80 02 10
CO weightage 8/8010% 20/80=25 12/8015% 30/80 37.5%10/80-125%
Instructions:
a. There are 5 questions. Al the questiOnS are mandaiory.
b. Write all the sub-parts of a question at one place,
c. Make snd state assumptions precisely, as And when required.
d. Please do not escape any intermedinte step. No marks for only final answers.
18] Consider foliowing Algorithm to determinestudent's final grade:
Step 1: Start
Step 2: Take 4 integer inputs as marks in the 4 subjects: english, physics, chemistry, math.
Step 3: Then calculate the average based on above four marks.
math )/4
average (english + physics +chemistry +
Step 4: if the value of the average is more than 40., it will print grade aspass otherwise it showsfui.
Step 5: END
Design isA or an 8-bit accumulator based machine in term offollowing points, which can abBe toexecute
aboveslgorithm.Assume that 2048 bit memory isalsoavailable.
a. 16} Design expending opcode to represents at least all above instructions.
b. j2 Impiementabovementioned algorithm in above designed instraction set.
2. One computer system. composed of one processor (1 MIPS speed), one cache memory. one main memory.
one hard drive with DMA. All these devices are connected with one another using shared BUS which
transfers the data at 10 4S/byte. Information about all types of memoryis mentioned in table 1. Based on
the given datá answerthefoltowing questionswith proper justification.
Memory Size Speed Cost
Cache 5.bit 10ns/byte 1.0/byte
MM 10bit 10us/byte 0.1/byte
HDD each surface has 8 tracks, each 10 ms/sector, 0.0001/byte
track has 8 sectors, and each 50000/second
sectorstores 512 byte Seek time =3ms
a 4 f the storage capacity of RAM is 10%of HDD, what would:be the cost of HDD?
b. 16}1fcache hit rate is 90% and MM hit rate is 100% what would be the tolal time to execute one
program of100 byte
. 16 ff page updated/not-updated information requites:1 bit. access bontrol requires 3 bit, LRU
dati tskes 8 bit, cach index of pagetable takes 16 bit, and frame size is 512 byte what would be
the size olf page table of a 2048 byte program.
u il0j fthe clock period is 10 ns, howmany cloek cy cleswill be stolen by DMA incase of page
fat with data bufier.
e f14 Let suppose we have an array.A 12I2| which i18 stored-int a memory, compósed of two
nolule, in column najor order. Compare the performauce of interleavcd memory with non-
inerlvaved memory in case of cache miss. Assume each atray element takes one byte.
LNMIITB. Tech./CSE/Core/2022-23/0DD/CSEZI0
16ET
LNMIIT
3. 5-3+21 An instruction Add Rsre. RdstaddressiXCeutedin two ditfererntWapefydiretsderregister
direct and register indirect as Iwodifferent Ssing modes for the first operand. For a processor with
single-bus organization of datapath. prov sets of cntrol signats required for executing the
instruction in given addressing modes and CrCuit using basic iogie gatcs to generate the MAR in
control signa.
4. 15 4+7+ 4A microinstruction sequeneeBtiVen in the tollowing figure wherë mieroinstruction B
is followed by C. D. F, Ior K, depending onDlus b. bs. and bs ofthe machine instruction register
Implementmicroinstruction sequencing in the toowing throc possible ways.
a. Use microprogram counter and brancn nicroinstructions of the following fom to impiement
sequencing of the microinstructions.
fbobsby branch to
Where b.bsba is the branch condition au
n an enhanced design of a CPU, the speed of a floating point unit has been increased by 30% and the
spocd ofa fiaed point unithas heen increased by 15%. Calculatethe specdup achieved iftheratio of
the number of floating point operations to the number of fixed point operations is 3:2 and the tloating
point operation usedtotake thrice the timetaken by the fixed point operation in the original design?
he lollowing assembly code is to be executed ina 3-stage pipelined processorwithhazard detection
and resolution in each stage. The stages areinstruetion fetch. decode and operand fetch (one or more
as reguired), and execute (including a write-back operation). Explain all possible hazards in the
execution ofthe code and use a mechanism to reduce the number of clock cycies required to execüte
thegiven code, assuming each stage takes 1 clock cycle to complete its work. Consider the first
operand of each instructionisrepreseniingthe destination where the computation result will getstored.
lnc R0
Mul Acc. R
Store RI Acc
Add hoe. R0
Store Aee
Marks 3] An 8 x inputs S4, d, a0d
I multiplexer has input A. B, and C connected to the selection1
=17= 0: 13 15 ; 1014D an 16
respectively. The data input i0 through l7, are as follows: 11
=
D. Analyze this system.
2. Marks 7=2+2t 3] Computer Arithmetic:
a. Convert-35.75 to its fhexadecimal representation in 1EEE floating point.
b.Whatis the decimal represented by hex number th40D09000, which is in IEEE 74 S1g
precision ormat.
3F200000
(X * Y) of following number (in hex): X= 41820000,Y
=
c.Evaluate multiplication
3 IMarks 6 3+31Implement
A left 3-shifter using s right 3-shifter.
b A 32-bit tree comparator using 4-bit module.
4 IMarks 1] Design XNOR gate using transmission gate.
. Marks 4} A sequential system has one input with values a, b, and c and one output with values p and q.
of b's. Write
The output is q whenever the input sequence has an even number of a's and an odd number
specification and implement the system using PSA.
6. Marks 31 Analyze the function performed by the following sequential network. Write its specification
CLK
7 Marks 8 2+ 3+3 A Sequential system takes one binary input and gives one binary output. Theoutput
at time t is I whenever xit-3,t)=0101 or 0110.
a. Write the specification of the system.
b Impiement the system using two JR flip-flops and one D flip-flop (for the most sigrniticant bit of
State).
mpleinent the system withadditional ouipui which is 1 whenever five occurrences of the
an
Marks 31 implement the fatowing switchirng functions using 8x4 ROM modules and, 4-input
4ultiplexers
Wab.cd.eonesct (0,3.7, 18, 20, 22. 26 30
X(ab.c.d.e) # one-set (1,4, 10.t1,23, 28,29)
a,6.c.d.c)- ofne-se (0, 9. 18.7. 20. 24,25. 30)
Z.b.t.d,s) ome-setí6, K1 3, 19,24)
2022-23/Odd/0nA artin4 0iy
Instructions
1There are qUestions on 3 pages.
2. Al the questi018 àre mandatory
3 Make d state assumptions, as and when requirod.
4 Start cach answer fronn a fresh pagc.
Algorithm
R3Gonory Cuttng Plane
(i) Solving the prouem by the sinplex netho Hoduens tie oitimal 1ah:au 1
erive tho
Clearly cutting
write
plane cistraint corp
thedetivatiot stes.A thn VAriable to
r row witBi i, nd esniete
ritges +S ihe
L 1atiloan
Table I ableau 1
Region12 34567
Cost 0 G3035 S0 45 90
e
Deining Consttaints.
Region1 2 3 4 5 67
0 10 18120 14 21 12
2 20 0 13 22 11 30 20
3 13 220T9 24 2712
826
18 12 19 020 1110
4
5 25 10 30 27 0 25
1423 7 12 200
10 0
1 289 28 14 25
Tabla 4 Time
D
(e s(T2,, constraints that the problem shoull
satisfy.
describe the
Define and concisely eonstraints to satisfy the folowing
of crates from A to B. Forimulate 12
A COmpany takes 6 types
of type 5 and
conditions. least 5 Crates
be sent. OR At
1 and type 2 must
least a crates of tvpe
(a At
type 6 nmust be
sent.
4 is sent.
only if at least one type
3 c r a t e s can be sent problem. in Miller,
(b) Type to avoid
sub-tour
salesman problem 2
constraints in a four city traveling
17 List
Tucker, Zemlin formulation.
LNMIIT "
LNMIUTB.Lech StORE 20224DYCSE27 Th atsest
trcions to Candidate
Ther are il questions. All questions are Compulsory,
will De given zero marks.
Answers w ithout proper expl»nation of sequence of
order questions.
Al ansers should be given in
Program
Siudent
Prog code | P_name
Roil ng F_naneLname Prog_code
0001 DSA
Aicia Smith 0001
0002 IDBMS
Alan Smith 0002
Sinas rdations k and S have# urples aid lupeEpEcveY, where ng1 and mi,n are positive integers. Give
nunber of upies in t e
ouovng operalions with coipiete justitication.
he mieimum ard axtnum 224Marks)
b RS
LNMIITT
LNMIITB. Tech CSE/CORE/2022-23/ODD CSE227/ET
foF shipping
their tocations
3. Consider the ER schema for a ship-tracking database to track tranisport ships. and keys. 1he
foltowin
and foreign represented ns
authorities. Map this schema into a retational schenna and specify all primaxyThey shoulid be
and.T2. 7 marks
sample reprsentation MUST be used. Suppose there are two tubles 11
T1 (al. a2, a3, a4)
PRIMARY KEY (al)
12 (bi, b2, al, b3, b4)
PRIMARY KEY (b1, b2)
FOREIGN KEY (al) REFERENCES TIal)
Ligitule
Latuke
HiSTORY
Ty onay Hu
PYHE
Cwner
HOAE FCHT
Nake the foliowing assunptions, arzd on/y tlese assiumptiors, ahout tilie reai world being modelled:
Each clerk works in one store.
11. Each store is in one city
A given iem ahways has thesarie price, regardBess of size or color.
iv ach item is available in one or more sizes asd one or more coors, and each item is available in al
conbinations dfsizes and colors for thet ite
Figure 1
nsert 9
b. insert l0
insern 8
d. Delete 23 (8 marks)
Delete 19
items X and
read and write operation on share data
Consider the below given schedule. Here R and W denotes the
the transaction number TI, T2, and T3.
Y. Subscript , 2,3 after the Rand W represents
etie heiov given transactions, Here R(REA12 ANd W{WRIFE) are the operations in the transaction.
pUsber arnd
are
the shared data times.
TI, T2 represent the transaction
Ti:R(X). WX), R[YC
12: RX), wIX). RZ) Cc2
Findon the followin
Total mmber ofrecowerable sehcoie ssibye wjth transaction Ti and T22
otl gumber of irrevoverabie seneaie possible with transaction Tl and T2?
Totalnunberof sehiedules possinle withznsactionTl ad 122 6 Marka):,
LNMIIT/B. Tech. CSE/CORE/2022-23/ODDCSE2271ET
LNMIIT
r a i t Teechriy
Consider a sinple checkpointing protocol and the following set of operations in the log file.
(start, T4); (write. T4. x, 3, 2): (start, TI): (commit, T4): (write, Tl, z, 7, 5%
(checkpoint.
(start. T2(Nrite, T2. x. 2,9); (commit. T2): (start, T3); (write, T3,y, 2,7): Crash
After the Crash. if the system tries to recover
Wbich ransactions will be there in the active list of the checkpoint.
What will be the contents of the UNDO and REDO list.
What will be the value of all shared data-items atter the recovery. (7 Marks)
.
LNMIITB. Tech./CSE/Core/2022-23/0D CSE227/MT
LNMIIT
Tlse
LNAM
Iaitute of
infeayhati Tooy
The LNM
The Institute of Ination Technology, Jaipur
LNM Ins
CSE227: Information & Database
&abase Management
Management Svste
2022-23dd semester Systems
tSystems
Mid Term Exam
1. We want to design an attribute fora STUDENT entity type to keep track of previous college
cducation. This attribute Stnud_Degree will have one entry for each college previously attended.
and each such entry will be composed of college name, start and end dates, degree entries (degrees
awarded at that college). Each degree entry contains the degree name and the month and year the
degree was awarded. Represent this attribute to hold this information. 21
2. Answer each of the
followingquestions briefly, based on the following relational schema:
Emp( eid: integer, ename: string, age: integer, salary: real)
Works( eid: integer, did: integer, work_time: integer)
Dept(did: integer, dname: string, budget: real, managerid: integer)
various
attributes of each entity
a) sure to indicate
Draw an ER diagram for airport database Be constraints. 3
and atio and participation
relationship type; also specify cardinality by a technician
who is an
b) AA passes be conducted
a
regulation that tests on a plane must
ER diagran? Ifyou
expert on that modei. this constraint in the
cannot express it Explain you express
pain how can vou 12
it, explain bricfly
includes
*as following
schema. respond to
2
False. Justify each answer.
PERFORMS IN
MOVIE
ACTOR
2 LEADROLE N
ALSO A
ACTOR
DIRECTOR
PRODUCER
DIRECTS
DIRECTOR
PRODUCER MPRODUCES
5. Consider the following relation: R(Doctor#, Patient#, Date, Diagnosis, Treat_code, Charge)
a treatment code and
a visit of a patient to a doctor, along with
In the relation, a tuple describes
daily charge. Assume that
. Diagnosis is determined (uniquely) foueach patient by a doctor
ii. Each treatment code has a fixed charge (regardless of patient).
11 Each day a patient visits a doctor, a different treatment is pertormed.
( A ) . What should be the output ofthe following program? Give your justifications through proper memory interpretation
diagram only. 51
public class Test
public static void main (String U args)
inta{{123, {3,4}
int f] b i n t ]) a [1]:
O b j e c t o1 = a:
int [ ) [ ] a 2 = (int [] [ ) o l :
5.
6. publicclass Eggs
7. publicstatic void main (String [] args)
Dozens da= new Dozens [3}:
LNMUT/R Tech.CSECore/2022-23/0DD/CSE226/1 LNMIIT
The LNM Institute of
9. da (0
Infoamatior 1choogy
new Dozens (0
Dozens d new Dozens ():
da [1- d
2 dnull;
13
14
ua [1null;
il do stuff
17.
5. Create an interface called Cur with two ahsiract methods String getNamet) and int getMasSpeed). Aisodeclareone default
method void applyBreak() which has the codesnippe System.out.printlaApplyingbreak on" getName): in the same
interface include a statie method Car getFastestCartCar carl, Car gar2). which relurns carl if the maxSpeed of carl is
Mo Speca
LNMIITB. Tech./CSE/Core/2022-23/0DD/CSE226/ET
LNMIIT
The tNM lttute of
greater than or equal to that of car2. else shouldcar: Lreate a class called
return
3ntoernation Techrioiogy
Car and provides the
implementation abstract metrous getName() and BMW which implements the interface
getMaxSpeed() (make sure to declare the
appropriate ficlds to store name and maxSpecd and alsothe constnuctor to initialize
Audi whieh
implements the interface Car and them). Similarly, create a
proeld class called
getMaxSpeed) (make sure to declare the appropriate
initialize them). Create public class
t c s lo nentation
store name
for the abstract methods
getName() and
and
with the bclow.code in its maxSpeed and also the constructor to
a
called MainApp
public static void main(String args[}){
main() method.
Car carl new BMWBMW X5, 320);
Car car2 new BMVAUDI Q7, 300)
System.out.println("tastest car is+ Car getF astestCar( carl.car2).getName)%.
. What is the output of the following code? Explain. 141
class A
class TI extends
synchronized void f10 Thread{
A a
for(int i=0:i<3:it+) {
TI(A a)
this.a a ;
System.out.printla("thread1:"+i);
try
publie void run() {
notify0:
wait(; a.f1)
catch (lnterruptedException e){
e.printStackTrace(); class T2 extends Thread{
A a;
T2(A a)i
this.a = a,
synchronized void f20
for(int i-0;i<3;it+) {
publicvoid run(){
a.f20;
System.out.println("thread2:"+i);:
System.out.println("debiting "+amount);
bankBalance=amount,
catch(lnterruptedException e
3
LNMIIT/B. Tech./CSECore/2022-23/ODIDCSEZ26/ET
LNMIIT
The &M Irettute of
Tnfoemotoe echrnokigy
System.ot.printin"in catch"):
public synehronized void creditAccount (int amount)
hankBaiance + amount: public void run)
System.cnst.printint "balance-"*bankBaiance notify "
int i0
notify Al)
try whilefis0f
ac.creditAccmritf f60
cBass Thrcadi extends Thread{ sheep 101.
Account ac;
String name:
Thread1(Account ac. String name) catch(nterruptedException e)f
this.ac-ac: c.printStack'Tracel):
this.name näme
8.99 10 89.9
i French Roast 00049
of coftees
the name of the coffee and its price for all the types tne DB are
Display and password
of
url, user name
driver name is "oracie.jdbc.driver OracleDriver".
Assumyihat the respectively
"idboracle:thin: 4DB IPaddress:port _no:host string"uid'" and "password" 81
Expiain the diflerent 1 pes of drivers wih necessary diagrams.