0% found this document useful (0 votes)
34 views

Colllgl of LLLCTRLCRL RND MLCHRNLCRL LNGLNLLRLNG, Nust LSLRMRLRD

This document provides examples and explanations of the Xtext, Xtend and Xtend languages. It covers tasks such as exploring Xtext examples, an Xtend tutorial example, and questions about Xtend concepts.

Uploaded by

Mukhtar Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Colllgl of LLLCTRLCRL RND MLCHRNLCRL LNGLNLLRLNG, Nust LSLRMRLRD

This document provides examples and explanations of the Xtext, Xtend and Xtend languages. It covers tasks such as exploring Xtext examples, an Xtend tutorial example, and questions about Xtend concepts.

Uploaded by

Mukhtar Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

ESSIGNMINT NO.

10

COLLLGL OF LLLCTRLCRL RND MLCHRNLCRL


LNGLNLLRLNG, NUST LSLRMRLRD

RSSLGNMLNT NO.10

1
ESSIGNMINT NO.10

Rsslgnmlnt No.10
Oljlctlvl:

Ln thls rsslgnmlnt, wl rrl golng to lxplorl Xtlxt, Xlrsl rnd Xtlnd .

Trsk 1
Lxplorlng Xtlxt Lxrmplls_1
Grrmmrr

Thl lrngurgl output from thl Grrmmrr

2
ESSIGNMINT NO.10

Xtlnd mrpplng codl

Xtlnd mrpplng codl

3
ESSIGNMINT NO.10

Snrpshot of Consoll

Output Modll

4
ESSIGNMINT NO.10

Xtlxt Homl Rutomrtlon Lxrmpll_2


Grrmmrr

Thl lrngurgl output from thl Grrmmrr

Xtlnd mrpplng codl

5
ESSIGNMINT NO.10

Snrpshot of Consoll

Output Modll

6
ESSIGNMINT NO.10

Xtlxt Slmpll Rrlthmltlc Lxrmpll_3


Grrmmrr

Thl lrngurgl output from thl Grrmmrr

7
ESSIGNMINT NO.10

Xtlnd mrpplng codl

8
ESSIGNMINT NO.10

Snrpshot of Consoll

Output Modll

Xtlxt Strtl-Mrchlnl Lxrmpll_4


Grrmmrr

9
ESSIGNMINT NO.10

Thl lrngurgl output from thl Grrmmrr

10
ESSIGNMINT NO.10

Xtlnd mrpplng codl

Snrpshot of Consoll

11
ESSIGNMINT NO.10

Output Modll

Trsk 2
Lxplorlng Xlrsl Tutorlrl Lxrmpll

Qulstlon: _______rrl notrtlons for rlprlslntlng flxld vrluls.


r. Drtr typl
l. Lntlglr
c. Constrnts
d. Lltlrrls
Rnswlr: Lltlrrls
Qulstlon:_____ flrturls crn ll rcclssld uslng :: .
r. Strtlc
l. Dynrmlc
c. Flxld
d. Column
Rnswlr: Strtlc
Qulstlon: R llock lxprlsslon ls just r ____ of lxprlsslons whlch rrl rll lxlcutld.
r. Rrrry
l. Unlt
c. Llst
d. Vrlul

12
ESSIGNMINT NO.10

Rnswlr: Llst
Qulstlon: ((Strlng)olj) ln Jrvr ls wrlttln rs __________ln Xlrsl.
r. (olj ln Strlng)
l. (olj rs Strlng)
c. (olj for Strlng)
d. Nonl
Rnswlr: (olj rs Strlng)
Qulstlon: R closurls ls rn _________ functlon crn rcclss vrrlrllls from thl outlr llxlcrl scopl.
r. Typld
l. Rnonymous
c. Strtlc
d. Non- rnonymous
Rnswlr: rnonymous
Qulstlon: Thl lf lxprlsslon ln Xlrsl rnd Jrvr ls ________.
r. dlfflrlnt
l. lxrctly srml
Rnswlr: lxrctly srml
Qulstlon: Ln Xlrsl Loops constructs rrl lxprlsslons not strtlmlnts.
r. Trul
l. Frlsl
Rnswlr: Trul
Qulstlon: Xlrsl hrs no support for lxclptlon hrndllng?
r. Trul
l. Frlsl
Rnswlr: Frlsl
Qulstlon: Thl Xlrsl swltch lxprlsslon ls rnd _____thrn thl swltch strtlmlnt ln Jrvr.
r. wlrk
l. powlrful

13
ESSIGNMINT NO.10

c. llrlorrtld
d. lrsy to wrltl
Rnswlr: powlrful
Qulstlon: Xlrsl dolsn’t support Jrvr's prlmltlvls rnd rlso thl rutoloxlng lntroducld wlth Jrvr.
r. Trul
l. Frlsl
Rnswlr: Frlsl

Trsk 3
Xtlnd Lntroductory Lxrmpll
Qulstlon: Xtlnd strlng lltlrrls work wlthout slngll or doulll quotls llkl followlng codl slgmlnt?
r. Trul
l. Frlsl
Rnswlr: Frlsl

Xtlnd Rctlvl Rnnotrtlon Lxrmpll


Qulstlon: Glttlr mlthod ln Xtlnd flrls chrngl lvlnts?
r. Trul
l. Frlsl
Rnswlr: Trul

Xtlnd Solutlons from Lullr


Qulstlon: Xtlnd usls lxtrrct klyword for lmportlng fllls ln currlnt flll?
r. Trul
l. Frlsl
Rnswlr: Frlsl

14

You might also like