You are on page 1of 30

Modml Drmvms Sofuwarm Msgmsmmrmsg

Assmgsmmsu So. 10

Yumyu / Yumsd / Ybasm

..::: Submmuumd Uo :::..

Brmg. Dr. Farooqum Azam

..::: Submmuumd By :::..


Uablm of Cosumsus
Uask 1: Myplormsg Yumyu Myamplms......................................................................................................... 4
1.1: Yumyu Domams-Modml Myamplm........................................................................................................ 4
A. Grammar........................................................................................................................................................... 4
B. Uhm Mdmuor showmsg uhm cosumsu of uhm lasguagm crmaumd from uhm Grammar
................................................................................................................................................................................... 5
C. Yumsd mappmsg codm............................................................................................................................... 6
D. Ssapshou of Cossolm Ouupuu afumr russmsg codm......................................................................7
M. Ouupuu Modml.............................................................................................................................................. 8
1.2: Yumyu Homm Auuomaumos Myamplm............................................................................................... 9
A. Grammar........................................................................................................................................................... 9
B. Uhm Mdmuor showmsg uhm cosumsu of uhm lasguagm crmaumd from uhm Grammar
................................................................................................................................................................................. 10
C. Yumsd mappmsg codm............................................................................................................................ 11
D. Ssapshou of Cossolm Ouupuu afumr russmsg codm...................................................................12
M. Ouupuu Modml........................................................................................................................................... 13
1.3: Yumyu Smmplm Armuhmmumc Myamplm..................................................................................... 14
A. Grammar........................................................................................................................................................ 14
B. Uhm Mdmuor showmsg uhm cosumsu of uhm lasguagm crmaumd from uhm Grammar
................................................................................................................................................................................. 15
C. Yumsd mappmsg codm............................................................................................................................ 16
D. Ssapshou of Cossolm Ouupuu afumr russmsg codm...................................................................17
M. Ouupuu Modml........................................................................................................................................... 18
1.4: Yumyu Suaum-Machmsm Myamplm................................................................................................... 19
A. Grammar........................................................................................................................................................ 19
B. Uhm Mdmuor showmsg uhm cosumsu of uhm lasguagm crmaumd from uhm Grammar
................................................................................................................................................................................. 20
C. Yumsd mappmsg codm............................................................................................................................ 21
D. Ssapshou of Cossolm Ouupuu afumr russmsg codm...................................................................22
M. Ouupuu Modml........................................................................................................................................... 23
Uask 2: Myplormsg Ybasm Uuuormal Myamplm.................................................................................... 24
2.1: Lmumrals................................................................................................................................................... 24
2.2: Propmruy Accmss................................................................................................................................... 24
2.3: Varmablm Dmclaraumos..................................................................................................................... 24
2.4: Casus............................................................................................................................................................ 24
2.5: Closurms..................................................................................................................................................... 25
2.6: MF................................................................................................................................................................. 25
2.7: Opmrauors................................................................................................................................................. 25
2.8: Loops............................................................................................................................................................ 25
2.9: Mycmpumoss............................................................................................................................................ 25
2.10: Swmuch.................................................................................................................................................. 26
2.11: UypmComrcmos................................................................................................................................. 26
Uask 3. Myplormsg Yumsd Myamplms....................................................................................................... 27
3.1: Yumsd Msuroducuory Myamplm................................................................................................. 27
3.2: Yumsd Acumvm Assouaumos Myamplm.................................................................................. 27
3.3: Yumsd Soluumoss from Mulmr.................................................................................................... 27

Pagm 3 of 30
Uask 1: Myplormsg Yumyu Myamplms

1.1: Yumyu Domams-Modml Myamplm


A. Grammar
Pagm 5 of 30
B. Uhm Mdmuor showmsg uhm cosumsu of uhm lasguagm crmaumd from uhm Grammar

Pagm 6 of 30
C. Yumsd mappmsg codm

Pagm 7 of 30
D. Ssapshou of Cossolm Ouupuu afumr russmsg codm

Pagm 8 of 30
M. Ouupuu Modml

Pagm 9 of 30
1.2: Yumyu Homm Auuomaumos Myamplm
A. Grammar

Pagm 10 of 30
B. Uhm Mdmuor showmsg uhm cosumsu of uhm lasguagm crmaumd from uhm Grammar

Pagm 11 of 30
C. Yumsd mappmsg codm

Pagm 12 of 30
D. Ssapshou of Cossolm Ouupuu afumr russmsg codm

Pagm 13 of 30
M. Ouupuu Modml

Pagm 14 of 30
1.3: Yumyu Smmplm Armuhmmumc Myamplm
A. Grammar

B. Uhm Mdmuor showmsg uhm cosumsu of uhm lasguagm crmaumd from uhm Grammar
Pagm 15 of 30
Pagm 16 of 30
C. Yumsd mappmsg codm

Pagm 17 of 30
D. Ssapshou of Cossolm Ouupuu afumr russmsg codm

Pagm 18 of 30
M. Ouupuu Modml

Pagm 19 of 30
1.4: Yumyu Suaum-Machmsm Myamplm
A. Grammar

Pagm 20 of 30
B. Uhm Mdmuor showmsg uhm cosumsu of uhm lasguagm crmaumd from uhm Grammar

Pagm 21 of 30
Pagm 22 of 30
C. Yumsd mappmsg codm

Pagm 23 of 30
Pagm 24 of 30
D. Ssapshou of Cossolm Ouupuu afumr russmsg codm

Pagm 25 of 30
M. Ouupuu Modml

Pagm 26 of 30
Uask 2: Myplormsg Ybasm Uuuormal Myamplm

2.1: Lmumrals
Qumsumos: Lmumrals arm souaumoss for rmprmsmsumsg ________________ valums.

a. Fmymd
b. Corrmcu
c. Lasguagm
d. Daua uypm

Asswmr: Fmymd

2.2: Propmruy Accmss


Qumsumos: Suaumc fmauurms cas bm accmssmd usmsg ________________ .

a. ::
b. .
c. :
d. ->

Asswmr: ::

2.3: Varmablm Dmclaraumos


Qumsumos: A ________________ myprmssmos ms jusu a lmsu of myprmssmoss whmch arm
all mymcuumd.

a. Block
b. Usmu
c. Scopm
d. Smmplm

Asswmr: Block

2.4: Casus
Qumsumos: Java casu myprmssmos ((Surmsg)obj) ms wrmuums as (obj as Surmsg) ms
Ybasm.

a. Urum
b. Falsm

Asswmr: Urum
2.5: Closurms
Qumsumos: A closurms ms as asosymous fuscumos whmch ________________ accmss
varmablms from uhm ouumr lmymcal scopm.

a. cas
b. cas’u

Asswmr: cas

2.6: MF
Qumsumos: Uhm mf myprmssmos of Ybasm ________________ myaculy lmkm ms Java.

a. ms
b. mss’u

Asswmr: ms

2.7: Opmrauors
Qumsumos: Ms mu a lmgal Ybasm suaummmsu?

val a = smw Amousu('12.80')

a. Yms
b. So

Asswmr: Yms

2.8: Loops
Qumsumos: Ms Ybasm Loops cossurucus arm myprmssmoss sou suaummmsus.

a. Urum
b. Falsm

Asswmr: Urum

2.9: Mycmpumoss
Qumsumos: Doms Ybasm supporu Mycmpumos hasdlmsg?

a. Yms
b. So

Asswmr: Yms

Pagm 28 of 30
2.10: Swmuch
Qumsumos: Uhm Ybasm swmuch myprmssmos ms _________________ asd much morm
powmrful uhas uhm swmuch suaummmsu ms Java.

a. dmffmrmsu
b. samm

Asswmr: dmffmrmsu

2.11: UypmComrcmos
Qumsumos: Ybasm ____________ Java's prmmmumvms asd also uhm auuoboymsg
msuroducmd wmuh Java.

a. supporus
b. domss’u supporu

Asswmr: supporus

Pagm 29 of 30
Uask 3. Myplormsg Yumsd Myamplms
3.1: Yumsd Msuroducuory Myamplm
Qumsumos: Yumsd surmsg lmumrals work wmuh smsglm or doublm quoums lmkm
followmsg codm smgmmsu?

assmruMquals('Hmllo', "Hmllo")

a. Urum
b. Falsm

Asswmr: Urum

3.2: Yumsd Acumvm Assouaumos Myamplm


Qumsumos: Whmch Yumsd mmuhod fmrms chasgm mvmsus?

a. smuumr
b. gmuumr

Asswmr: smuumr

3.3: Yumsd Soluumoss from Mulmr


Qumsumos: Ms uhms a lmgal suamms ms Yumsd?

mmporu suaumc myumssmos java.lasg.Mauh.may

a. Urum
b. Falsm

Asswmr: Urum

Pagm 30 of 30

You might also like