Вы находитесь на странице: 1из 532
~ _ 7 r . ’ Technologies HA acerse C#.Net Si 0 *No NCR Renae aaa gay? C+ Net Stok cn xg beoate. app } Ghoorw, apppticabion in cottaction ag Aftacus Prgms hich om ctevelyed by terme boy ore Ap fen technologie, fo fulkilt tee enckrizen reRyttanrent. 4 AS. eppicee , Gyrmos!s Corn > Sot 4, Soh ome pan Dt Ay cobtection + Yogical trakaichons Jo the compiz | 7 Hy Pholf , Sant CDoaical ‘wihisactony ) Example. Pow Saphents Teche bogies + Net) Tava, PHe 7 Eqornple for Snalusers. att qmail wows, at Ams office une Types el MyPomre ape Vicattons, ~y ftoos Tapp cae clamitied tbo vosieous ype, waned on i application behowtow. i > Bore Pay ont 1 bsfndouss opptcations + &y HS - ico wat? 2 Web ogprication > 24 - Gmail. corn. fasolook eke. . tote. Neb > Nek to Fats. technology which was trfioducod by Micro aogt tn the year IH08-. oa tee Soyt a Geoding dp aniaation , obs ch waeuy eofablishact by BilGalin in USA > -nNet wD a frame (Og technotog ag which 2, q 2 b Z bol eth Mm muttiple technologies aa soi) opontat, Le Net egtactoas Fechnologyy Cisirdowss Forms) BR web technology (spe Net) | ‘ni qroud 3. Web gesvice techn (we F » e Fechnosaoy ) : inclowss ead ey Mobile tec hnotogy winclae eae ee F eNlet Sn Snfegaahd usith multiple Hechno logics clue 0 that s202009 wing Ang Le sniet OL prOgromm ar can dovebep vadion® Ryre 4 oe opplications Qike below 1. estado’ applications B. welo applications 2. Web Acwicer le. Hobile applications 5) windows Sauiice ~~ - y enet bb Supporting [24 wu litpae peagroroming fangnag en which ce collahay +Net horgrogen Arey Oo tC oNek & VB ene 3 Vert nee UE. Nope «met Se VE dere 6 CH emeb => Te Prvelo pe ony type q app lteaion wring 8d We sequie ora amet tecknodegy ard ona ene tangaage dow 24% re want — fp duvolop a wuindans application, oe foue fo ux. wtrdors foxrny andl: CH onlet- fg Yow want te chevelop ub appiication we fy use ASP Neb ancl Cate Nek. 34, we wank Py dave Dop web Secs oe ae ee we. efi wce and ca oNek av that 4 wNet C8) Challengers food by Snbiocierce thet + ~ > Repo + Net technology Ves, fom RO -T~ UNder Mooi famtly we hove 3 popular techrotogien - Tey ave "VG Wisusl Bate) Qe Nett butal te) % ASP C native Serer Pager) . : ~> These tacknotogien one having Ame -% the drawback ay bel \" Plotgown clependency + , > Fae There Bchrotogien itl wie onby on ustedes —opsiattog —pystun Not dnsgetlieg to chustop sont Hype a apo Ur ———C. clevetope omy wirdows applicators 7Y viding ASP we can chvelop only web ap plicadions « 7M Are Some by -ttrre in the. YT Sun Nicrorbyilirn fon Tabroducd 9 Aechrolegy catlect FAVA > | OF TAVA in x Platforra Indpencterk cleshn ology orc uring AVA WE GA hoveRop — Vaxigus typer of Attware appSteaMona_ ~y Beco. Sf oleove advantages 9m Tava, MiewAgt exinHng- Techno way clint,” ue aAtoocting tauords Tava + % ee meade fos anounced cbt Nek ficak dine 1 the fie REL te) mectaing cathd PDC C projextional eee re eT a a a eats + To Pde HicwAoyt hon annovrCed abour smek eafures Liter below fe gnlet wit bo platform Sndxpendenty Rechn ology ao eek % Arpediting to davelipe vorlows Ripe of Ope Leecitions ] Bo mer Be asttt be dupeedtiog fox malt danguoges- s Py fem wag— 2009 Microsoft RED team han designed + Net technology: and finally thoy have elasea ; fit ean t a jerion eek Le) + Rek AD tn the yoo aeele Verio 4 » Net technatogyt : . ao TD geleaw .— “enlet frame wors 210 —% doa 4.1 2003 we BO ~y¥ aoe 13.0 > 2006 “3.6 + 100% " a ud 7 ord S YS BOR iNet aprame work isan: toprfant Yotgeal comporamt in extra | han we bobol & ener Git conse thin eccompmet pot enbagulled ise ety. cDegini fron + ham frame eB de Common. plabgeran for cvelapng votsous types | spp ticettom by wring = nak sechnotogfen andl Sia Cine pond frame wit hh tnakigated with 4 Tims an bolo , one fanguager wie technologies wet beveclovs L2 brarien o 4. mek exteuon Sigine w Net Frere monk rebttectuve Cty sNet qrame wow wit be. cleutdech tate see tayers i eNet Fame work Arthitecture | acer danguage| Prapy [ Cewek [Vener [vertwer |] i 5 Abod windows af | = loge voindaw! Fosms fo Tayo. ertet Aednolo-| 1 Sen | D oye Babe eos Libsaxtes(@c te) pe H oo “gyasen togra | F top wee Eqecution Engine ner —-commna language Pasa > Lower a. seperenting. — erick Pargangen To “Avelage + any type af appttcatfon boy curing met, anet progrommey v saquive one rock Ranguage ie, | Cikener Con ve. wet =~ bogert Ww seererteg + nob Fachnotap te Ve wWirdo ws’ Forces: ERG Pract ay tr » a net vsindes technology 7 uring winds forms we con chaveloe o Windows’ opp eatin. + wiedows —apelicatton conte 7 Ming met Ty we wont to cluelope windorss foray we rok, © Fave 40 ung, 'oindnad technology and cdf + mt A-ASP Nels — TT Tt fh a ewet web techn ofoay - By wing AEP Net use can otevellope a Wel opphiali on Ty En enek Fp we want ty tavelop a wee application y we foe #0 une eek aeb Fachnology. cated Asp, wer | and — , wet danguog e cattad Cit swe Dorguage . 3. wees - Ww > wee Mandy oy window) Communication Foundation, 7 St wai ener weld rAekvice technotogy + FP Bn ser gy we wart to cavelope A We Anwiee by, kg set We have to wre wee ond CHtenee - adils 7 Loger Bi- = layer 3 do ssprnenting Bare clan Lioraiien 7 what wa clan? > claw % a colleclion a Vanfables and methodn 7 Clomer one & types 1. Po ctaftrod chars a. uner daira dan eee oe digicnd by eroSogt Programmer. een be cattsd oF pre deginnd § cla? fp com, which to deptaad by the oh programmer con be. catled op upen clagfaad clar- 7 whor “es . > what an cbaw Ltbrarien? > clan Cibrasy “Ww a coltection %q clo en a cton Vibraries ase g peo 4. Pas Regine ch clan O2Gaagten a, her cleptradh clam MNbsarzes - tay Worortor + > H daw Otbsorss hich “es Anpirad by the etlewoSogt * Programmer, con be called a7 pt Aegina. cton Ubsarks. or Pre haga clam Wtororup , contain cetaction % Pe Reginacl clomea. yr pre. ckegioed stews ibamies ene cated a6 Bare clos F2brAnier, hich OW prdting by he Toots aundh ening by ind enet Parpramrn eA: ae fo Wath, the, hae a. Bsing ”| cj Ries below Code. window Clin Uibrastes can be cattad 2s eNek Frame work. clas Libsorteg. Las ey 4 sett jee ve CL > Caer 4 tn saprenenting +Net eqteation engiea LR CLR th a. Common eyecutton engine for ath met werquagse Ew = Net Qan, © dleyelope ct Phication hay to exececti “4 gage eels on " ust the help CLR. aus Eqgecetion procen oY Net applicatt Tegra fe Net application Syecaton 4 Proce chet * qo a ig bevel language (sz | + Just rns STINE sWet application green wit be divided Into & tips Step? * > Compitens rst be convening Atgh Quid Canguoge code (cH. set These language cor@BPlarts ae. no © q MicwAnttwors 2 | =x That means whaneer ber “pr. mon - velcro soEE ener Banguegee » Programmen has to wantg to ure prog rarnyn en Prochaoe the language camptler from the Concrn nw a webast. rasyh onlins « .! ot “Typ 4, heeowe. opp dications ¢ = Sopteoorre a one olamifiest nto Vorisus types bared on application behawtouwr 4. Console application 2. iotndows Appealion 3, Web application. 4 web Sesnee 5. windows Sexvice- 6. Mobile apptt cation 1. Console agp lication: 7 Conde application to a ingle uper app eaten + To consume thin application end user doesnt sagive Internek Conec Rut by ot put” > No user Brkeryore be, tnpak ond “OP esill be wtthto the corea.rd grompt vsindow # —> wil not have saat -ttme applicators but, i Lean C4t sweet we ane. gee, to develope there applications. > To dauetope console applications toy aning mek use have td vse console technology and catenet + Windows ape > winclows apeticatiors CO) Standard alone — app Lea Hans Caraphiteat oper Bateyoce) 8) wot formy appttcaMons 5. So.on Hong can be. cated. an dleoktop applications C8) GUT hanect appdicatfon > Gtagle one apptteatters ‘ > To canine © ustrdows applicator endure cloesnt gugulye :cintennet Consett oly > Ee ke Uber Interyate. will be thos hich Vs called os windlouss forms -¥ appitcakion Ahovid be emtated ot and ut)em machine » ~% whan we win clevetop window opplcattong} firs: Whenever an application should be oyot table for single Wen ata tyr we ust go for usincows applicattors Eq: Fates bourne accounts arpltcattony Nettle Shopper . oly doy tonactory , og Cisaary Menage runt , Hadteal gtour OR opppication » MS ottce - ~Y To davetope 9 satndowt oppitaation by wing @ ene we Kove 4D ude swet —uadows technology Called wach ocm & wet lonquage Ceol CH -weti are web enablid opplicatons Web appricatiors ase matt? wren applications web appticatten wit have a user Inteyoce. eskich ean be cottest as web page web , application should be Installed at semete machine Cobled vwoel Aenven- when we wlll go for web apeVication? wherever an opptication Should be avarlable for Ainge. S vmattipte anew ok “Hat ym we go for web opplication © Bay. 000+ facebook corr e299 grnatls ca yT cdavelope a web application. by using «Net we have. to wre. ASP. hee and oO fanguage colled C4t.Wer between Conroe. appiicatton and windows application Comrok. “application urindows applicator F Atogle nen + TDatengace tetheeshich tcaltod i windows forms Ty No. Ietenriet Conact of 7 No foternet conscttri ty 7 No peal Hine apphteatton -y we will davelop Real time Apedicatrons . wy Bagh weight” app ag adios 5” - Heavy, "Welgh appticaiten, windows Applicaton > Siegte unesy 7 Vhen Enterface otndows gorrmr ™ Internet Connectivity 2A nob needed > % develop we have to we wendous forms anc CAS Net % Whaneves, toe appitaation should be oumStatclt Jor Angle nem, woo © for weindouss appttcalten Ex MS offte R__ Ouckitecture +t > cee + & port of Net Pyare werk oa pont Of eNet So.pteoave > The nate Tesponat bitty 4 CLR in exscacting Te uot Provide Some memory management , exception hand ting Support, rult? Hereoding Support , Secuarly , debugging amd $0 on. there cally sNet prame work: they | Services and web _spplications. 2 web agpttcatten —y Rut Oren —7 Uher tntermee Yn there calted webs page— Y Tnkomet come cht vi ty tA Required —y To develop we ave to ure ASP,» Net and Cdt+NeF. Te Dheneven the applicator shouted be available tot muff nen we Qo foe web appticatton . Ex: Gmail +com i cae scom + let applications y Sich Code. nanapnes vam for CLR dtchitectur purport bilities gy the > CLR axchitectue iy pap resenting | f LR Ee Nee : CLR Anchiteckeve Gare cto way “Bopport [ Exception Manages [[ commanshaber Threat Sepport Secentty Engine ra Fa Claw Loader ¢ ~y TH beads ctamer ror Application to. CLR | One by one. according 49 Saegution Suquttement | > Code Manogen ¢ fa i} | —® ushtcn Manages “the code aoegs emotion of the applicatton. > SLT Compiler: (Tust- Sn- Tre.) Syushich coments MSIL code +d Motive code > Gorbage collector: —¥Io Net, memory Mono.gement b Pergormtag by qoge: cotlectot + ~> To pesforrn this memory — management gorenge collects ww doing A cutter a) allocating memory 5 - ee ————— == will attocate memory for “that par Heulasi object je collector within the heop dofadtnucture » 1) Deattoating wremerys —y when on object ko not using by the opetication qottage collecto¥ will recognize porticetort object On VAS vouned object and tt wil Cestrog that unused object | 3 atlocati rnemoxy ant 4 de ctouate mame ry pregyoromdy, Teed not 40 WEG Single Bine at Code recaube Which hs internal proce. Dua to that suanon. o vivet raern thy TMONapeMent ds cated ay aytomabic ad wemdy Yoanagement ' a OF Exception Moroges : 7 Eom axe Cav typed t+ Comptfe Rene eanot Be Run time eso Compile time anon an wood which uy occerted of the time ap comptl 7S catled cornprle time eanor em: Syotox eds hl > BA esd hich in occetod gh the time 4 exscatting Prograra th cattad a9 sun Kee. ex Bae oe —y Run He enrct wht occur ‘loecaune — of invalid tnpur ot tm paoper On that is on eyteptton 7 ! AM! Ag exception Con be dapined a suntime ae | > whak ip exapen handling 2 f dass Exception handling te a mechani +2 fandle. siuntime eomosy by ustng toy Catch not 4teally block > : / P>Puspose of Exeeptter handitng 7 ‘the alonovemat termination hen th eact ; > Exoption Promagen witt provide exception handing acitity-- J ener appticaltons pron & —y that in a thread 2 Aw: AWread ‘in an Independent exreatton pathy PE able to aun Stmultancourly © wlth other execution palin > what “we rmaltt threading 7 : firs: Enplamenting multiple. execution pathy Stmultancoushy 7s cated as, mull? tuaddting - RO Umer Pore ef malt tarading 2 | fsx To Impwove Ane peryormance ap application well godor woulti thanad in; —y Thosod Support te pastaing mula ttssad ing faceltty for oe Net —opptteation. Tyee, ctackes 7 which provider Staict data ype checi COM Moxshaler + - —¥ COM Stands tor "Component Object Moctel. Yom in a wero apt ot tracktional technology ~Y using com we can develop saurable components, C DL 4ttes)- — CoM mansholen atlows eNek appkicatiom 40 contume com components. : ‘ aint Security Engine: | > which provides Security to +Net applications | ‘Debug Engine « | > which provides Vartour types of debugging 426 to eNet application Rane, clans Ubnony Support: => which provides predesined chm Ribsrany Support tO + Net apptications CLS (Common tanguaye Spectzication} —retS 24 a Set af. Common fonguage Stancards Ceginad logy rier Sogt for ast +net tanguages > whenever a Plogrorering Language wants to Stecognige as oNer language Te han to follow CLS Stanascds S_ (cornon Tyre Syptire) 2 — + CTY 1] Cubret CLs. > CTS f€ O Set 9% common bare datatypes ofeytned by microsog4 Jor alt enlet tanguages- : y ita tm CTS. a Every snlet Canguage date Rypes coil hove bate data typ to gO System «intr ig the CRS Bype which ig bone, type fh VB. Net loteger and CiteNek tat like below CAEN ot Sait Dk gD Vanek foteges Sygtem + String a Care Nek > whot ig cit Net 2 “fms Bh ip a sNeb Rangeuage y why Ca Nee 2 fy uheneven we wont to develop arg type of Soptantt appliol sKet programmes — sequive “one. +Net _ . wy vat etype of prajIammtng targeege 'S Hewur? firs: Cit entet ta a object oriented” Canguoge Foctuves oC Sy CH eNeE bs O Care. Semstttve tanguage et: tnt os B00) ff exon —> St Sopports Block level programming ey! doh lock j- t.. : : "stats bt2y ~y ewery Statement shovld end with Semfextoun Visual Studio nef: > Visual Studio sek fs o predegtrid tool providing by Micratogt wlth “+ net" soft wate - Visual Stadio one | © Visual tadioy Ne & Providing. develoment-’ envionment “for let Progvammens 40 develop yartour Apes of applications by | use Ned techn ologies — and + wet Vanguages suuntine — enwil-vonment —ushich sNet — appdtcation. Sy Net frarre work in ot is aequired to sun the Oder to Intell + Net Sogtware A) dajtoll SQL Server ® conpigue fasta ILS 3) Pnotatl nee Saptooare . How +o create a new Conroe appl cation => Star > Programs —> Nicro Sop visual Studte- 2010 > visual Saito St ein open vinwal Shia ABE [integrating daudopect aout vennant} Hey cick on New Pounject > TF esti open new project iotnclow ‘ hoe Select fanguages vinual cit ard type of apptiotion : OF Comrols appltcalton Ord serame tp a aig conscle p SRP Ecatten j toca 22 OV then otc OK. =y Condos application development environment. woth Rave maint & windows. j VD Sotction Explorer window. 5 i ® code ustedou i AD) Setution Explorer sotrlowe : : ead Geli ca THEA window wit! les play ett Pe project elated, feler, “7 By depautt tt wit! come wstth one. pile called Program .cs Program 2s t > program. cs 35 @ CateNet clu file, - | #C8 and 27 Exesty cabinet olan gle | ewension wail! be VBiNet Clay fle Cvkension ati, be yg = a What 18 claw file 2 29 A clays tele cam contain collection, 64 clamer , boy depault every clas atle will come with a Aingle clan, > Program 6s file well Come. with A defrgle clan catteck Progtarn ard prograrn clam wil tome wri, OO Apectal method Catted Masn yrathod - Matn() + | Main in a apectal ype 4 funetten » Connole “opp Licalt on exec sn’ otayty, by mahOe , contebting Tir maine) in aloo contvolling by «Net coed CLR: executor engine + This window will dhaglay the Selected clam Atle code. Shock, of Program cs stile: fayror! py Bane clam vitng — Syatem 5 (omag I Soespate Myconsele Application 4 sy project nome ¢ wy word i 2 clos rorne Cows Prograre { voyeotl espera parked worn Static Void Yaln C34, ng LI, axe i ; oeony j Te ee ee IN BE D write a console programe 1 print welcome msg Using 84 heros Sah space, teycondale Ae lieations t a clams Progvoro i SuticVoid Moto Cotvingt Jorg J { > & Conde. psrite bine (“weleome- to cH eNet "Ds Comptes Riad Lime ¢). 5 3, 4 We the. program ¢ - weleorne to Cab> Neb Cornpi lin, F6 she _prgrams ys write Gre 4s 0 predeginad yethod re Read Line Pr a predefined nucthod, sales ; compote. in, predegined class 1-7 clam program uae d claw > US a ner dhifine a | > Stahc void colleen duped. tovd the cot be change / Noecoy, it P 7 Syderg An a Neo dom brary 2) write pry to print Koo welcome muy> welcome to Cts Nek weleorne to conndle Apel Static vod MatnC ) \, conmole. Waite Line (ator to CH Net ys ” conndde eBdatte Line ("weleome 40 corse. rt) “conle Read fine C) 5 5) 3) write a Connotea prgrr td print Sl : Weleome to GH Nek welcome to connote Apph welcome 40 Sabya 3 welcome maga Pegsn- Static Votd Mate C J © Warte LineC Welcome +o c#t onet) torsos Waite Line (" welcome to Commas feel); Connales Waite Line (" welcome ty Sobya”),; Comore Coad kine C45 J sider aii oe a bone clay Bbsagy. Condele = Conrdle in O predkagtred clam which bo port of Syrtes Bare clan Ubsary Waite Line ¢) :- ho —y watts Line ta O predagined rerbe. method of Comole cota. > Waike Line method vill print the given Value » apter pring the Volue , 7+ votll move tha Cussoy fo tne Mextd Cites ee Reading? i= Tt holds the comard Prompt window untili we — Behan ote kay, B® Waite a Prgrn to print one dtking Or a ; one numerical valued? wo | OP alte Wid Maint) olp A Es s Tama. a fondole « console . Lbsitz Line (" 25°) 3 comes Read Lined ) 3 j as Waile Line C" rare’)? ” Variable 5 Variable in nepresenting a volite shih can be chonged: Syntae. to dectowe 9 vartable: = < vole >; int a= te. String Ss * Sathyo" ; Duwsita a Connols Program to decove 1 fot variable and 4 4 Vortable 7 , Page. 7 Btatte void Mata C ) § ol Pt nee _ rama oad > Tomer 4 a5 int Oye 25; - sting “name. cama" Sconike. pbatteltne C name) 5 , Console» Lniteline Cage) ; ' conse + Read tine (7+ 8) toon Example display variable vatuen with uacrdaptned Staing? oe yout nome th + ama your 9ge seo) ee weil’ Maia € ) { / tat wd ae” your ve iA gaoma’ ; Bhing b= gow PA) watte a Conte program 40 dinplayy orrptage nfo - Static Void Maint) ge fat oge 2853 gration String nome = tara’; x coe _powet bes / posite Conde . t)azte Line. C" Your _Name_i&2"name ) 5 eonnde, yaite Line C Your age 2 “age); Lomote. - Read Line C) 4 : ernployee AP, employer. name , Satany? State void MainC) “Pak enumber= AQ gi 6344s fat Solany = 509003 Staking came. =“ Arata”; ay @Rama Conreles WatteLine Employee mame fA 1 +t Armtentha) py enumibes Cormale. Waite Line (" Emplapee number tht 4 TPL BY LO): esatany Comnole, Waite bine ("Empoyse Solary ins "4 50000") 3 Connols.Raadline J eures Ereplogee. some. Eenploger number 10 Emnployer Solon, #$ ° 50000 ia. Amwtho » gag r2égulo eit 8) white & Conrote progrars to dinplay dhuctent Student 9), name, Location 9 nyo ary Ig State Votd Matne ) { ink sturps 193, > Stara. Sturome 2" Pallave", Stung Shaleca on Hyduatad”, Comole 6 Watke Lene C" Student 39 Par’ +stugD):, Connotea s Waite Line (Student name 9%. "4 shunae ); Conole, Wadte Line 6“ Shdant Locatisa ty!” khdncolion’), Gornole + Read Line C1 5 Student 49 faz 123 Shidunk rome 6s Pallavi Stident locale tes tydvoload . Shortcut _t9 open visual shictto ener Start -¥ Run -Y Ayrean devenv yon. Nt D waite a conrole prgr to Stove Student Mauka . they ave M1, Ma, mae calcute tofoh monks and average rats § final. Saray» =e Total Wwarks aro » 190 Average. marks aw > 638. Vord rath 7 tat mi = 40; tnt mr: 655 tok m3 = 557 dot orks 2 ant eraz £3 sae aug vermont 3 Commole- Waite Lin CSrotols marks arr “+ totmouxs) ; Connola taitebine C Average puowes a2! ‘+ oan Dy connote | Radline(’)5 5 to) wate %& comole ONG 7 Aeprerent customer foto ier, amtomen ED, cuytormenmame , Cuntomer Locottan, Cuntomner Ph nay Cantorner mot! 2p 9 dinpiay * me 11) witte a comole. gram to ttore pinduct information fey product 9), Product» name, pretuct Company » prddact preok. @, ctioplay ® D tan Noid natal) tak Curd = 23) Stying Cusname = “ sandin " Stating conte =" eatatpaty’; ctouble cunnunn s WUgosz2 tly « Shing cunremodl = “Senthya nos -< com", Comal - vattelinet customer £0 ig” casey y. Comrote - write Line Corutomer name tga ecesname) asnnole, » WaiteLine C'euatarer locator ier +custoc)s Gonovte. » Waite Line CV Cuntomen number i$: -tcenum) ; 4 coals» Watte Unel"cauntomen emadlip igs ecurenalld 7 Comme, Reod Line Os Cortomen TD ww 2193 Cun tomer mame 18 t Sancy ie customer loation 1S: Kucatpal Cumtomer number ty 2 UE BWM. CD ko BNF tae . > mer eal? is Sandryo@qrratl Con. 44 Prq® “Wold Matatd int pabTD = 2235 stating -pllmome = "Tv"; sening procom = « sory"; nt procost = 380005 console sWattetine( Product DD ths" 4pv01D); console Wari teltineC" Product ome 2” proname) ; console initeLine (Product Company Ts: "4 procom Console » Wattebine (Product Coat 183 "4 procont)s ecomole » Keadline ¢ } 5 4 Product Reodline fo a predegined member method of compote clam+ —> Tho method ysill accept input Grom the une, VPI ren will prem an enter Key y once unen stu prea the enter uy thak accepted Yolue thx method with & waitten a. i Staing value becoy Se Rradline() udaithen typ Weluan type i String. Comets ToFn 320) 2 b> Convent ts c predegined clam which “v a pork of System wore clam Cnromy > TOI nt Z2 8 a predegined rmermben metho a Convent Claws. 1 sears method. will convert given value to to ink datatyre, 1B) waite & connote program to accaot ennptoyes noe dinptx va pole ne Exnglayer nromber ¢ i 223 ye empno 2 123 PIP Noid Maknt) ” Console.» Watteline(™ Enter Emplayer nombers Ds Trt end =ConientsToSnk 32 Comte» Raodlinet.)) 5 connotes Warteline. C'ypor empno ¢$"-eno); Connole » Qabed Linel J; $ 16) Waite a Contole ole. Ente a your name: . Grip) Sardi a. o Enter Yor age : ere tel® woe name ise Sandhya . your Oe 18 OF Pagen to accept” upen mane, oga. and dopey yee \otd Mote c) ° : 2 | ‘ a Combe: ¥ Waite Line C Ents yor mame Din Staing wrame = Comvle. Readlinet 34 Combo Waite Une ("Enter yo ages") tok vase = Convints To Int3 2 (Cormote. Read linac) ) 5 Comte, « WarteLine (Your name tgs "4Uname) Connole. Vaaite Line U your age t5¢ "evoge); ” eomote, Leadline () 4. 1A) Walte a Consata Prgr?: to accep employer, namboscrame las & clinplons oe Enter osap number + 12% Ent erop name? Amauctha Enter emp salary + Lr connle . Watteline C” Enter empnumbkers "J 1 tot eno 2 tistgr Conved . Trt 39 (ey + Peod Linet 3 Conte. Warteline C* Enter ernpname ¢ “)s String erame = Consoles Readline 0) 5 Conotes Warteline (“Enter empgatary 2/9: Tok eral = Convert « Bint 32.(Comole BadLline 2); Comoe. . watteling (“Emptoye number i 4 eno, connote + WAitelane (“Employe name 4," pename’):, a Connolt sDazte Line C" Grigloyes Salou ft: +eral 3; : Comoe + Roading (05 PAG warte a Comole Prgm * deapt Shidint comme, Ata 3 Sub mowks they ane 1,2, Band coleuloh the Shenk Foal ments and owereg dinplay total mame, wiih Student nora. - catewlale Shickent one monks & dinploy- aug monies, a Student wth Fore? le Fater Shadnt” name x . Povithsa- Enter mt mani: Ao Enter me mass Enter m3 monks 1s Bue soto. mares $5 + Pavi thn ON gene, te void Hotac) £ pe? Gonbobe s Stiing groere, = Conde Readtine 6)% Compote L0sk teLtne( “Enter mt marty: "D: Fok mt = Convertt ToInt32-Ceonnole» Leadline® 2’) 5 Connie, War teline (“Enter one martes "Ds tr rons Conent Tolintse (Conte: Read ive 0); Comoles, Write Line C" Eaten mM, masesy") 5 EAE ea > Convert “Tointa2( eomotir» Randttne (9 J; ROE tot monks = mt-trne +tm34, comole, wat te ere C" Enten. Stuctent name sD: Comole oarteltre ( “Eqame + “dinanes 1! etme 5 : . 5 canpole fat — ea conpptn + Watteltne C gname aveage 257 +09); Conndas Raadléne ©); j 2) tgenale qq beable nome , daain m0” geamntval . Voth Motnl) © « Waite Line" Enter taain ee Makeg tame = Conreic « Rand Liat; Connote Wits Une C"Entix tacin numbes t" )s gat too = Congetie. ToTnt 32. ( Eonvole. Raadl.tre (9) 5 Comet. Waite ine (“Tain mame. ts: "4 tnamed; Connole attelsnal featr number ty + “aeno Dy Como. Raadtine () + 4 le. Enter tain nome t- ] Aimoraveth? Enter trate nembeas RGU Train nome t¢¢ Amaxavath? Trotr nomber, (3 tdtey Note ssa mote Cussor. do Mert Loe we have to wre * vn", Al tt thoutd be Yn ‘deuble, cole “VTo putnt the tab space we can ose “\E", oiler 20) Write a Comoe grein to accept & nor & Pengor the addttlon gclinplay. “the additlon swrult [ses balero. : 2le a Enter the first nom: wW int a. = Covert, ToHt3) (conrale, Read Line (0); for be axa; Convols » Wat te Ure Gy & Square te: "é 6); Connot» Readline ( ); j 82) carole. prgm to gind “the wshe ole Enter the numben ; aC 2 a fier ro; Q Cube t415 & 1? Void Maint) Connole. Warte Une" Enter tha nurnber s 2 i ROE = Converts To Gat 32(comote, Read linet); Yat be OK AKay Connrele, Wattetine (Zacube- ts: “4b Compote. Reactline C) 5 + Dataispes Spectgied type a the data and Stye cata fn cats Net chtatypes ave clas tp fed toto Shires beved on | Wype oy the dala ond Se a the dita. % the + Nurresiteat daite types a Fla eg Point data types 3. Chosater Pelcited dota typos 4: togiteat’ deta type General clita Types - [, Numerical ckita typo —> A numben ushtch %& not having ony fractional payt Lottl come under Numestaad data Type - 24; 1,20 ae Agate nurcent col datarlyper are clamtyied nto & Bypér te Signed dectertype Run highned dlotatype te Signed nomesical clita type 2 - Hy There datatypes will atlow poattye and ragotive values = Reconding +o “tae Atgned Numeteat data fypes ase clart’gied fo to a Cypeg. non L sbyte > tbyf ae Bi Shoske aes 7 Bi Tot vival fe a) ws dong 5 by | festa | > Hee °S” stands ~for Aigned. Ty Predefined Size of Sbyte te Abyhe ter Akg = SI Oo Hgnedd totrgos | fr can bold marpimoen: > soy te bate type tn cts x § Ly Sytem « SByte | ~ Syston « SP Qs Short > precleginedt siye & boyten te-) 6 bila (axe = 16) | Bone type of Showte wy System « Int 16 Belok s | 2 predestined Mig ig Gbyte ey Uxe = 32 BH | 7 Swe Bape gg Pot te > System Dnt 3D Ye tong f > predegined Stye eg § by leo ie, Bxe = bo bg > Sle type 04 Long ty —y, Syptero. Ink by % ey O¥rigned _Womertcal clatatiyes:- > There data types will allow only Porstttve value | 7 Recording to the ged ,treoe datatype aaa Chantyted top | types. 1 byte a. ushose 2° 3.uink 410 ue crtong > [7 Pradegtoed typ ts Atyte antes ixes pub of nec : tote : -_ sane pe 18 —¥ Syoteem « Byte aoshort pul thands for vngned « : i ~d Abytes —y exe = te bib q Unsigned tategeas | 7 goove type te_—> Sipser. VInk 16 aun, oy a byfe Y Une = 326m qf -unatgned tnkegeu wy Bane type ta + Systems Ofek 32 A ullong « i Royle exge 6Y bits % vnrigned tatages wy Rave type rg % Sppleeo Seong ey. Sythe. Vt 6y : date Dypen : Hating point alata. £4! 5, 30.5 > Floating Point data types will fave onky Agned which will nok Support — unsigned: data ty pes > There ave 2 type As Float 2. Double 3, Decimal 1+ Float: > re degined Sige ig & bytes Ley, 4x bite Aigned floating Voluos > Bose. type ie Syptero « Stogle 2 Double + > pre degined Size ty Gbyfe Ger SKS = 64 bib | Aigned floating Values y Rare Kspe ts System, Double 3. Decimal -y Predepined 332 f8 Yb byte bey loxge tag hile, atgned fleottng volutes > Gane type 2 Syntem, Decimal 43) Example tor ffoat Vartaiole # $4 Void = Mata ) i Float a 44; a comole , warte Line CE a) 5 Connole. ReadLine C); j > Mn “tho above. pgin itl qenre® OO Compile. tym error becoy fey chyault Cae Net compiler soit treat fivating value oy double. FP Whenever we wont 4o astign oto value, tato float Veriable we Shoutd pootpen with “f” Azer bel ° Q ow leat = tt; On Float as YSES 24) Caarple. for Aouole vorio He - } Sy Void mato ( ) ¢ i” double gg = G53 Conddles Watteline ly Conmole+ Rand ine (2, 4 35) Gprple. for decimal ae Void rate (> i dectenah a = tes} i Conpole. Waite Line (a); I Conpole » Readline 25 4 |B. Chonacter Related dotta types 2 Achat | —¥ Pre degined “B30 w a Pale jer, AXG=16 BIA Of .Unteade Chovo.cters- > Bare Tyee 5 Syaoe Char 25) Example dor chav Void Matnc 9 £ cher as= “b's I vata ehConncle «atteline (95 choy afs ‘ab’ s /f tavalid chav a8 2's Pyted Char ot *@!s HI vabtd ae Logi cat Datatype : | Oboe Y Bre Bool variable can Contain’ ctthey Taue x) fale yabeeo —> Toure ott be Sapresenting a4 4 and Cole wil be Seprercrding a > Rane Type (6 Syntern + Boolean ef) Example. for bool variable Ye Noid Maine) t bol bt -twes Ml valid | ~* Povwcteginesd Hye of bod é 4-bit- | Conneler wWeiteline Cb) + bool ba: “ bowe'S// tavaltd | bool 63 = 15 / trualid Connrle« Read Line C) 3) Gen dota typos > BA general data types we ave & Rype2 1) Sts ©) object 4 Skoting To axepreoent™ CollacKon chasactes we will 4 tov Seve Naghatl e Eq. Stedng ¢ 2” Sokya”s > Vhore ts m0 pie degtaed je —y Bare type 4 Sy aero. String —y Bane type ES Systew . Orject ; Note The above 5 datatype ave called prernitive cote Bipes +9 Fn thene premitive dete types 48,364 are Soppo-ting Predegined Bix but 5 cokagtey “fe, qual dota, tyou WON wok Support Predegined Sten. MinValue and MoxValue > eseecicmaoatioasees epic rthene two are Comptanty “7 MerValue %% coaitthentrg the given’ data type Starting mange “y MoxValue 4 Waitlentng she. ending mange of gree dkatyre 88) Example or Mintebuc ¢, NanValae a bye Sbyte titi, 4%) old Main) t : " Conde. Waite Line Ckyts rnin Value 1% "byte MinValue) » Conds Waite line ("bye Max Valun 162" byte, MaVadue); Gano ole Waiteline("Sbyte min value “tgs! zabyte. MinValued ’ Comdes Write Line C“sogi Man Yolut "4 Sbefe «Mon Values Convicts Radlinet ry : Min volue 2 Oo mor vabere 8 1 255, min Volue if + 42 mMoX value Ul $40 fo pemitive ditatyee 2,3 4 dita types are providing oy the micwnye a predestined Shuctuser. — And gone datatypes te» Staing and object an provid by the _ on predegived clades with fra lave clans bsony called Sy atern Bane clam Ubounus i Caer below. Skeleton of Syot \ —— Narrespace Syptero wedté tne) 4 cr Road ine ) t y i j 4 Clam Convert L VoI%t3r0) z j Skauck long h 4 Strvck double ” Stuck wool { y clan stata : d 4 Clam Object i Awe B'tgpeap) ond grzeat C) s “ypeatc) myths wit seture the hore type op given data tipo | Buea —y This wil turn the Sie ey. the gee Soto, ype to bytes. 28) ex of peop) g tpete) PO Motd tot) i Eoragle. WatteLine btspe-2 Cink) donnole. watteline Ctype op Cptoott)s" Comple. Wartteline Cpe of Cont Sy Connelas Vastalae (rye g tong) Connie. Paod Line L) 5 What ty local Variable 2 >A vastable which te declared wtthin & method tf Calted to Local writable ~y load Vootate dhould be tnitaltacd with fome value boey ove, Accoming » Gthercoine Cormeen votil generate om evvor- A) ew Noid Magn) £ | | | | | | | ink OS Condale, Waiteling (a); ee teas Os we enor > niehiome akove enoy we can spaite the ande (eke below | NOid Matec ) | 4 eto Conrete. Waiteline(Q@);, Conndit, Reoalinel) } a wy fot 5 UY declaratton A=, 4 anatgntog comele bhiteline (a); // acceatng Conmoles Readlinel); B® Cx to dectaw, multiple variables to 2 Airgte. Line. fot & = 10,6: 804 (} valid int as 19, Staing s Poatya” 3 MN Anvabiel the ax tos Sting $2" satya"; HU volta tert Wped Vaxia bles i— > Uring Vox Keyword we can dectae tnpltctle Byged Vasiobles (ye Sinplierte typed Vartobles Concept war tatvodueed by with Net cftarmework 34.0 vesion > Tnpiit typed Vortable datafiype wt tl be lectding bared on the wolue whieh we are aunigntng 2D Ex 1 Srpltctk typed vartaboles. ; vee WIO( D Vor a = 10 Var lo =*\varna'’y Var t= taney ComnotewWattehine. (0+ Gat Type 6); Conndlas hagtaLine Clo- Get Typet>); Convsle Wasteline Cc .Gektypet) ); Connole» Read. tine )5 y eae Sy Atero “Int 32 Systems Slsseg Stim. Boolean Uring types? We can get the bare tape of Gen cota type . BI) Eq for frnplictt Byped Vowinble.” Maine) Vor 6 > 65 5, Ver os G5f) Vox cx 6.51, tok d= 105 Comoe, WaiteLine (a Gaktyped)) Convdle Wasteline ChGet per); Connde, wWaxteLine Cc Gettygec); Cornea, Daikelane Cd-GetType 6) > Conndas Read tine CY, Syptiror Double Syptere : Stogle Syatero + Decimal Syrlere- Dots). (hen wit! we une Gmpltcth Vortableo We ttl one ‘Implicit typed vasteble ak the Lime Tenpltmenting Hing, Concept 7 Aceording +o dala storage focott on Cat- Net datatypes one, claniitedt tho trwatypes . ty Value Capes 2 Ragowres pes oN As ‘ Value typer s . > Tn vale Bypes data eottl be ahoatng Foto Stack memory 4 due to thot sreoren value Cyper ov Called as Stack fared data tiger. > Stack ty a dofagtauctuse Which can contort Cottectt on gy eterrants > Stack wit support ony one ent key Toperd chueto hak earn, emeviion eoulriewl we can perform on ‘Tapond y Stack 4 following &n approach called LLCO [Last Tn Feist Oot’) thod rsa lank tanented element we can “etateve, 260 cltagrarn 4 stack sonep HEED (EXPO) jptiev) % Ragerence Typer: => Regororce Eype data wil be Atorfng foto heap maimory + Due do -that srearon , Suyevernce Beyper ars. cated Reap loved data typer. heap pase. } > Heap | elernents - \\ be soprenen ting tn binas a dota Maucture hich can contatn collection 4 tree Stauctiye format y Heap wt <* Hoap a catlactten ef nodes, ushich ans Boo fjpe, i 1 @ounk node. Achitd mode + Beno D not following ang opP%och cated LIC GY ATFO, which 4 following aby own approach collad Pander opproach | ot means — wltiitn the heap we. can 2uach the cu element srandorag« erence b[w Value fypa & Regevence RG parr, Value Types Pycrnce Tou 1 |. Dota 4 Mortog fm to Stack Lopate Aoring tn wo une A. Nalue Fyre Yaxdable vtt contato the actual data Oke beloco | 3p a. Regovence type Vazable oti Contain ‘the addiens Of the alata, Be belo &: fol eg Jparvatiable vot Ss adie (Bleue type wer BByerence Bypes one | Le Structure £sclam. | Alo pemmitive datatypes following are 2+ TM premittve datatypes dullastng, | Value types - ane Pyeverce Sipe | 0) mummerteat chta types 8) Genera! datatypes | 8 Footing point data tape { Doraactar selahed cota type EX: Staing 4 chject: DD) Logicak data tapes Ea: Ink Float ,do uble, chav, kool. - - / 3) Goums(Enurerator ) 3) Sntergnce 2 4) dlelagalen Con we _omign Nott value toto .Nodue. bype wowlable:? ~yNo EA Soto > mutts I] tavetid Con we AMign null value Unto Sagernce type voaiob le? YY Yed Sq: String S- moll $ [] atta “STL aNek Ad we cannd& arttgn not Value eo to value fiypes. Naxfable - F< From Nek 2.0 we Con arign Avil vale fnto value “type Natale with tre 4ale of nollole Valse Epes. Nollabla value ty pen: Ly This Was faknoduced With Neb 2:0 veswPon. —¥ Ontong nollable -wobie: tiypes we can anign’ a notl valve, fnto vale Fype vartable. Example for nvllade Value types fat oid Maio & Jak? ae Oully Slat? b = oults Y : , don ad) when we will go for nullable value typer? Sr uthenever the foput && optfonal we ysttt GP tev dectare ee Varkoble co nollalle value tiype. LDEpenple to petfarm detvinion- Noid Maile) — § int Os YF int & 7 A dit f= olb; Console .watteline C EMker fivok no: "Ss Gomoles Cu Commole. wofiteLtne ( Enten Aecond no"); } toro. Wnitelioel Diyimon tre Vey Conta, Wartte tne ‘ Noid torn C) | t { Conmole watte Une (“Ente fiat 902" 35 | Ink a = converts Tinrgz( Conrols Read trot )) 3 Comoe Waiteline ("Enter recond noi"): TOE bx Convert ToSnt3 2 Cearnote + Read ine C)) ; div ce afb tonrde waiteline C"divinton Par ac); Conndes Read Line C) 3 y WwyTn the above pagan when ney enter recond no ar toro We 18 Ahsowirg sronttne eraon | 7 We con bendle. these murme erry th -hwo warigs { \. Onin Lage i 3 Equerting handling mechantom | “To sole the aun fie earners by oning lopte we Shoot Je for Conkrk Ataternenta- Contact Staternant :— I Te CH Net Contiol Atatement an 3 Weypes. L Conditional Atatemenb 2+ loop 3. Jump atatements (Condi Hone) — sfatermente 1 4, condett on 4 &. Susltch Condition } Dshen we will 4° for condignal statements « ee —SSCS—SC—C—s__Cs=—sCN Woe of Stabbmenk bayed on Conditten we wtil ge 8 condition Chatimenl. Ap condition ee We can tnpliment Yy condition Xo 4 wary I. 4, Girnple i) i d. Y eve 3. mol 4 eke Th Ceoltiple ip i te. nested i, Syntan: + ye Condition >) i StmAs stm 23 4 > Eqarpte to handle the oloove divtmon pro envot by using | Simple. g- | “ | a Entes fix} no | ele # | Entey Second mo b | fo] & 1 Pleaye entea othevthan dex: | b fal <; Gre Praline) P78" Bede): 4 Connpte.. waite line (* ites Second nof!") ; tat oz Convent To UntBrl conte: @ Linet 1) 5 atv cz ale conrfa waiteLiog CL" divinton newt in tte); + come Readline(); yo ws Whenever We howe a Aingle opifon, which we dant => when we will v for Simple to exicate bared m condiifon we can go fat Staple ty Syrtan : 44 Cecond tion > > Sta5 @ Bis 3 else : tra; & 34) vite a Comole prqin Core shoo ngs by Urs tebe. ele Enter frat 004 z 40 a to greaten stron 5 re Noid Kain) L Connole, Waitaline ("Entir ftyak no 2”): 2 r Ik Ts Converts Tota C* conoles Read tine OY! Comole» Wattétine(" Entor® Setond nd :’)s Tot Je Convert sofint 39-( Comrote ead ine t )),; i. Cirid t . Conndle worrteLine(" 1 in greatea than aoe 4 elne. Conrote aitebne ("| ia guetta thant"), Connole. Read line () ; q 5 % Mele iy Syria . 1, Keondtttor) L $tds else 4 ( ) Stas ele. ay, C= b) t. 4 Ca>b) Coangte + titel ine (am fa greats anor 6"), ehe lo yt i. ComalesWiattline Ua in aqual’ to 99 y ele, q MMe ® when 2 epln bared on easenitten tonclion iv Chote ta hehe Conte .Writeline C“ a is bnthan e): eonnds» Road Line C) 5 4 —> In -the ue wlth go for coshd | 40 whenever we have multiple opkon which we want to emocute | | Choise ts nenbd 4: | BE) implement the hove prgm pigs Ueing Umple ty Conditions | 29° Yord watnl ) ‘ Coole, Wartoline CEMA fick sno! +, Bak = Corwerk Jo Snt32( Comrets Reod line 0)! Conds» (itelne (“Ents decond no,!'): Sak be Convert ToSpdt 32 ( eoracte, Raod Linet)): 4 Corb) Corvrnts sWarteline ( * 0 dr cpeatarthan bb"); rE (@ , Covndte ‘React Une Cy j above eyarnple we fave tmpementid neted 4 Awd Settch s- @) when ttl we go for Switch? de. Uhenewa we wont 4D execaite ingle cane among muttiple . Carer we can ge for switch, Syntor: gotteh Ce Expteatton > . 2 portabel cone ¥: sts bieaK ; cone 2+ Shas break case 3t StB5 break 5 dyautt Sty break 5 % BP) Fyample. for Switch Conditten $0 dinplay month rome , ared on mommth ap - oe Enter your erent nemba: rol: fe Tan ge Void Mato) i Connole. Write Lind Eater your Ceansle, tat a2 Gonvwt «To Grt32(conoole Read Line €)); Suattch (worthy) month ovaber:"): SSS ASRASRSRSSSRORAERASROS 1 Con 4: Conmole, Wattel ine C"Tanuary ")3 breates Cane 2+ Connole . a.tteline C" Feborscoyy "J; break « 3 Care 35 Conpole. «Watte Une (“Monch”): baeak + Cove Us Connole.wWaiteLine C fort") » break ¢ Cane 54, Connole, Wastetane C“ way"); byeat<; Care 6+ Conmole, Waite tre C" Fone"), boveods + Care 44 i Convoles woatteline C" Toly") reals + a Cane &% Comole, Wadtaling (“Augant” ) 7 loveak ; Cave 4 Concle . Writeléine C''teplamber” J: Weak, Cone 10! ' . Console Watleltoa C" Opfobe 13) 1 brea. Case uy i Connde, Waite ine C" November") 5 breaks, egoutl: : Cornole. waite Line (* Snvalta toput ")5 brea 5 Cowale» Read Lene C) % | B) wate % Conwole pgm to Compare. nda by cuatry Suiteh PH Voted Mato) { Connole WaeteLine C” Grit frat nos") tor Convert «Fo Sint 33.( Consoles Read tne c)); Convole-odatteline L" Erte second nos"); AOE fy Convert Fo Int 32CConnoles RoadLene L)) Switch Carb) 2 (are Tae + Conmle..tdsitetine (“a t grealen than "J; bseots + Core Falro; Convole, toate Line C* & th gasatn sao") bok, i i ¢ tk 4 awe bath ove eqexal) in break 5 4 4 Connote, Read Line C It Note > Suktdry enprenton cain Bore a Condétten end fe can hae ‘wool, chat, string » Sntogral » enum Cary contenponting “Type “values 1 bat st cannot contain fteating type value. fool value , enarn value and tt cannot be floating value => Switch core laked connot heave condition. ) — Yold madinc ) tonmbe, WasteLine ( ¥ Ertin fivst noi?! )- | PH he Convert Tot 39-C expel. Load Lire) 5 Connale wate ine C “Enbie -aecond roy") 5 & oe be Const Fo Int 32( console Peadlene0) , Switch Lab) j 4 tome tweet, j Consestasstaline Co edquates than 63 beak + tore foe 5 Sesttch C bead 4 cone tues Nyy Groole. Wastaline (" b to ge Han om 5 ! breate . Cone. fobse + Congole-aitatioet™ io equal 4p »” break; % MW sntorroh Suttch clave. bie 3 : YY Merternat aviech Clare consoles faad Lene C) +, %, 7 Oeitch Cane Soret can be Tntegen value String value, had value, | y eH Comparinn (Dt ele and tat tch Condi flan - DRM ase erecating one option among multiple optione " —y Bxecuon whe guitch in faster fron y ahne ty becamoe Swett tr deveck branching and ye alee a i tackle, cote — branchin ~y Botich ty execution wine faster than ig che t4,buk which to having, Aone. Urottatens Lika hele L. @apiedion eg “witch tannob be o floating volue & Seaitch label cannot be adleating value ¢ Cand? Hon. D> coheren, we want to execute seulllgle pions among smaltiple oplfons ferst evtorily ty fo switch then neat prot ww & obe. 40) atte (mde prgm 40 Compan “too nda with the Combinadton, oy Switch & ty che ae Votd Maine f 1 Conoales vantteline (Enter pink oo.") TOE Ax Comurt so Int32( Canola» Read Ene 69) 5 Conrde woxiteLing C' tntir second no2"); fot he Convert To Sct 32(Connole Read line) 5 Stoitch (a7b) a tone true * Co nrlee wattelinel “Bb great Han b'); break 5 Cone -foloe t : 4g CbROD , ; Conngle. vorstatine Cb 1 greaterttona): i + iq be Comrole -aiteline (eq-both ore equcd") > x 41) Waite 0 Conode prgmm to accept a (etter ard clinply Ssthor asst th vows 490 Void Hain) Conde, 622848 Line (" beter your'sters"); connples Read Line C) 5 & rot ole Ente your letters Wet Th bs a vowel Chan ch = PonverksToChan(Comrolerteailinet)); — Switch (en) t vit COAL A + Conroe. Wath Line Cte ta vowel"); break ; ' Care ey Console toaste Line (1th Go a Nowek” 22 beeoue s Cone t's Conndly tarteline (ik ds a vowel"); breates, Cane ~0' + Conrete tons tine O° Voveale 5 Care Ds Conndle Kaiteting (if & 0 Wood 7: oreo 5 agar \ Cemnole. Waite ne ("Ab is nok Vowwed "9; breaks ik bee Vowel); 4 Loops ° ==" @) When we ill fe for Loops t ctw Whenever ese. Want fo execute a single dtatemenh of block of Akailuments rutti ple ffmes we cst! Go efor logps. 42) Er: wl a Comele pgm fo print fakya Technologie 5 #rmes hae, Votd maint) Connate, Wat fe Line C Satya Technologies”) 5 Comole. waite line C” Satya Tacknologien!’) Console s wate Line (” Sadyer Tecknotogsen” Connetescdnite Gre ("Sabya Technotogien'\) Conroe anrite ine C° Satya fechnotogie ")*, Comoole RandlineC ) 5 J Tn “he above pygm we have Witten oGRLne Stolenunk 5 fermen y by watng loop we Gan onthe tb ay % Aiede Abetisment . . a Benepe e loops: ~ : We Car sedate the numler a4 Peres uf Cotes, OM ~the help oy Soop, : a ~7 Tn CHE WNeF we can tmpement foops fp, D for oop ® hile loop 3) do whee loop & dor each boop : Sor boop : . gtr t — for(einitfaltgatton > 5 ) 4 } 45 | Sr25 ¥ US) watle 0 Comole gage “b print 4 40 10 "0's rind loop N peo Void tan C) : ele Comole , WaiteLing (" Number aves’), [ tok 8. Carver Fonts» CCowale od Lire) 3 : Gays) § i Sor(eets Ran; ter) ¢ Q : & } Upmoles cate Une CREE Syn") 5 2 Conca floadLine ©) 5 a ig) tortte a pry fo pring oly Lites bel by wiring efor loop 1098 14,8, Mbit} ‘ke ee aa te & Comoe te. udtiteline CM Rovenboeu Oe) a | SF —————_«— Jor( tow! tHe 2 fret . (renote, fala wrtteling CT oI A Connole Read ine (9°, j Note s for beg debogging fto oR EN 4u) Date prqin fo print nals Lixe below ol Pe’ Vord arn 6) este Jor late 15 2 ) L #4; Ha; 4 4a G9 waite a prgin ty prind 4 fo 10 nay Line below BGP ord Mako) Sle = eee j fant tels 1234569 F71- while (fat PR 15) | t | Conpole wabte C RISE)» . Loe? tar So ‘ y Console RaadLtne () 5 { Connole. Warte 5— \ — a sned. 4h, Connole clay | => Wate ey a precegined method of | 5 thks method uf pitat the ee vole om output window,apter - Printing the value $f cofll Kerp the Cul tthe dase Une OL next characten . 4 ° a ax j Beetle tee: oe yntat Do . at | uy 43 j Hay fat GU f= 5 i 4 | théle Cecondition +) 5 1 GO waile a Condle big fe print 41 fo 0 nda Like below 1,5, 10/1820... 100, Noid = Main() | i | Consde stonttelaine Numbers ares"): Conoole, write (Pa, », 9? Bee while (1<'s30) ; Eyceeen Cnvole. waite Ci); tots Waa K-ORT 5 Comoe watts (a); 4 Connde adlinel) 5 y 4a) pm fo print 2 0 ole ee \ tg Vota weaken 9 4 got BN; Bo o oh oY coe ee: ” Blo (1< 10) XT connole eorbteC ths". ”) ety 4 Compote fleadline () % ¥ noo Uke belew uring Do while (ie nN Nota Wal C) Connhes Waite ta" "Js ta4 4 cobile CP <>) Comote waite (t+ “ "D5 Comole, Keadline 6), + 1 Cl gr fox hile boop and cohen we wit go for dor bop $ fms Ulhen reno. y Antesrattons ane {tree A dectded we will | | = | & tov Bor Boop. [TY When the noo tntieattons oss nok fixed we will go foy whtle } love. | axtongy 48) Eqarnple dor chile floop - Aivinton by Ho pg toy wring while i Conrole . coriteLine (“fiat no 4"), fat 2 = ComurtToIn3y Conroe flucdlinet d) 3 Comnate Watleline (* second no -")- IEF Convert T0132 CCenraleReadLinel 9): while (J-=0) Conndle wacteting (* Enter joie thar veo)’ / 4 | tare Void Hater | > 1 : a = Tenet fo Int 32. (Contote ead Une (9): tek oliv . tly, fommle write ine Catv), tonmles foadlinet) 5 "t1q7 Trnplerrent the obove prgm by using for loop y Noid Main (> y disat tp Unwow tame ar above pyr * dor she=g, 9 “Conse. wortteline C" plu enke other than zero") 3 to= Conus To Ent 32.CComole» RaadLine oy); 4 tne div aly y Comme fortteline ("Part ont adiv y - Cormole end tne 09.1, e 3 we can’ implement a for Oaop mithour Tnttiokigatton & thevorent WW decrement - By degault wo aan core ontey ust Condon abrg. $0 , 4 Void aie () ee ae ee do Pym conta} AD the ctoageted Surtch care 9b) Earnple te “Pannfey My Ustag go te Noid alot ) § Gonpole »t0r8te ine C "Estey gour chetce. 4 or De Ink? Comverts"Fo Int 32C Conrate, Read Line C))5 Sattch CX) 4 Coe ts Conngle, Wate Line (thus tadfivat case “Ys, breaks Core & Comnate tonite Line Chin (4 decond Care’): Yoxectt ; ° gre care 15 depautt : . Connsle. WatteLine Chin bs ctegault cave"), Barak, i 4 - (mmole Raod Line C); 4 Geter —_—— 7 Uming rdlew, Stofrent we can véliio the pegtn combvel Value. —Y Whenever We ode degtalg a wen detined function to outer ® Nolue. We Con une sreburn sbmenk- Once retain Stodment iy amcrited Contaal wilt Bonnfe s the our og the method block. throw an excepttos expttertly uring Tho Keyword We can Wo as | xe 5A Comole pigr +o More 5 employer, o's hey are 1127 : 822, 933, Ath , SEF >To frplierent’ above pry we Pave t go For Feve variables > Wherever We want to Bove multple alements which axe Sarne. yee we w7ll ” dox a Concept called conay acu fe) wy fovay fo collection og slementk eohich ore Armtlan data tyre Ty ewey element yoill be suapiessnting with ont Sndex value. Fit clement ine vatue will be ‘O and 2&7 alement index Value 1 © A and % on bY CH Net will Aupport 8 types ae Gene Atmenmonal asray _ A. Mult dimenstora ray pry) 3s Jagged. array « 1. One dérensional Hr Reoranging. Catlaction Oi ebernents em « Aingk ow 4) comted ar eae ome: a 589 ee wot ren sin > Spin: pe oe Sone a 0 5; t cepayrome? ane" Syofax to dectore. an array with initial gations — t 7 | 4 -- - 4; my Sysitax to accens array element: Orvay name []. 5 (39> Yo afei> 5a) Conrole pgm to creak Or dimensional covay Like obove and Aiaplay tne coviay otementh Cite below } w2 Noid tate cd be L Aunt to 20 380 4o sp — fok (Ja qnew MEL I$ ,09,30,440,50 4, A Comole. tonite LOCI "ard “ater” Conndte + Lead Line)», 4 [> Fev tne above pram iy ge Rave mote elements to ve ; q° dev Loops 58) Vota maine) § te Ene C Jos = nw HE LT fte,.29 80 40,50 bs a ats} “a cea)s Jor (4:0 5 Raat 5 feed 4 yo te le so | Conte waite COLT +" "D5 connate Real i000)'5 4 i a A MSS , Length : — length & % predagined member pro perty oy array Clas. > bength Property will otek ~the no % element with in Ho 1 no 4 stemenb With Yo the Gen one Atmensional Poy. “nq Tinelesent above grgrn sing votile & do while Loops 0) Comoe. prym co pr covate abiing one dementtonal copay Malle Dimon onal > Mott? te cea Representing Cole ction of elarnents Ya mathew format ia Cath d ar Mastel dimersfaroh eed. ; ne . | —Y Mall climenstonal Se ——————C | ef coloummns « TF every row ahold hove the dame. no ef elements. \e > Sgalex 4D declare rertlt démenstonak ede aed {, 1 Jeevan s- rouxclatatype> [tye Mize} 5 Yolourins : a : | 69 Sxample By coe dimonmtonal omy 10 ides fea [a afo,c] —y to a {PEP 55 3) af, 2 —> 30 \ a acy 27 3 @ Void Maint) a } 4 a foe US, _ ttl Janmw METH 3I SF wr0204, to da 30 Luorsosop} Up 59 $0 SorCiz2.s ewe te aul ” Console « atte MEF aD 9, connote « waste line C) > - ol Comde s Ceadtine() 5 % . PF now A.Get Length C0] 5— || VTE Wl metuan no -ef aos seth tn ult dimensional corayy « YT wel seh 90-5 cotoumns with tn enatth dimenstonak oovay. | GB) Trnpnment above pram boy using cohtle @ witle Loop | 63) above. prgm using uorile £& dor | 64) for ~crht le ' 7) ng) tnkile-so worle | 66) dowktle —whtle ox) dor —do while 68) dovatile -fo¥ (7°59) uing_setile 1. fle | to 80 30 ko BO = | 29° ord Mato i i | ur fey Tat (Ja anew dnt (57 $10, 24,40, 50} 5 while (£25) | £ peoole veontlec acer" "); | tet 5 4 Conrele « Read Line: t 4 Use t do tle Noid Moda) L tt feo, BoE LJ O = mmo MELT {10,20,30,40,50 do L Conrole. warteCatisa”™ "D5 tats t vidle (<5); Connole. Readlinel 5 y @) —Yotd sazne 3 ah £ roma Stko Sting int t Stating (Ja. = new string I Lrara’, Srea’ A Satya for(t=0 Be ica. “gth _ pe Conroe, warts (arti+" "Ds y : connie, Readline C); ‘i a) Mota Hein ? tabteestee— BELT acaae Potty aff 20,304 + $50,50099.5 Suis Lior ouutfeay FS \ connole atte Ot3) eo"y p44; ei comple. Wsitelinel )5 tats console. Rradline () 3 a 63) tek Motd Maine tok L Jaz new int LJ {'610,20,304 , fyo,50, 6035" | while (£<) | Seer tangtitod 1 forlf20 5 5<3 sf+4) alkerbengtntsd { “Conople. Waite carssj4" "D5 y Connole. » Woiteline ¢ ) } tats 4 + compote Readlinel ) 5 | 5 GH) void Main (> ; | cat fos i i tae C jo anew fteEsT {fa 20,208,, $40. 50.6088 for (i205 P< 2TLHI yaw 4 while (F< 3) col Cortole atte Calne re” “); fats 4 cornolte Waiteline Cd 5 y Cow oe» Read Line C5 4 Vord Mainl) { tak teosdewy WELT As mew MEL ILS 020,20 » $40, 52, 605% 5 oshile Ce ga) Fae ses : ip C3<2) Cornel. Waite late gat Jats y » votile (j23)2 a Connols WAtbLne C) tats a Comoter Readtine (2% 4 64) void. Matnc) & : Roth, Jar now tbl, IPS 20,204, $40, 59, 039; Forltnt tor ter pitt) Oo + ae L 10/90. 5 amc . + he 58 60 do- L ip (j42? Coto (uu = ape dary - coile C5 <2)4, Compote write Lined, ¥ Crmmole- Ceoel Une. y 68) tht koa F4* do 4 int fr04, cobile (ea gfedength co) Conmle. waite Caciyst* Frey u Conrle worrte nec) + De barry, 4 tabile (12 0: GetLangth 6) ) 4 © Connole. teadline (3, ¥ ink LJ A= new tokL, If 400,20, 0}, $e, 5016094; tak fo ao { Sorin feo: 4a. gbyehergth (vs 54+) Conte. ste CAC §74" . "D5 Chithe Chet. Get Langit) Commke, wortteline (15 t+; & whtleC sca réetleng inl 0)s Corrole> ReadLinel ) 4 a Poth, TAs neo tol, If t,20,304; laos tore SST YO RE SEPT a RES RTH @® How to get the umber of elements wrth % Mult dimendtomt| array § | | Re :Uaing Length Ty we ng Leng Property we can at A Neo ckements unigg mult — emensional aon.ay _ 6a) wstke a come prgm ty Croke MalHelimenstenad ornoy Like below - é [ro | as | ao fas | ‘| a0 | 35 | uo Jes Ond print thin oraz 2 (50 | 55 Joo [6s | elements Bike Anbow Void Maint ) we fneL, Jornao tnt 17 ut (018) 20,25 4 {30,35 uous J 260,55, 60,45}}- i Is nell ® 10 WS ge as @ 30 de vb us fo 20 a5 j 50 (55 60 65 +. +30 3S 2 4o 4S x 50 55 160 OS 59 oe © ' eo “ay (0 1 20 Bs 0 a : 30 36 tO YS iS . i 7 20 i i 50 55 as z 60 30 35 to 15 6S 50 55 60° 05 0. op ©) 10 el ce BB ao a6 ag 30 Ro 35 40 He 35 50 46 a HS GO Go 55 bo 65 65 Zeoplement akove 5 olp with diy Loop Combinations 3. Tagged Svag : > Jagged oervay we % wollecHen y sw which may nek Contain Sore, nog elements. a > tht meand fn fogged array every stow Wray contain igerent No-, elements - ae Fenatty woe can Aay Jagged array to a callecHon of pre dimensional aS hays Alvontage 5 —Y we ton save the mernavg « La | | > Syntae for jagged anay : i Catge 3 [5 | Zo - { No- Rows | 0) Erample jor jagged array, : * A{03 LoI-> 10 a | ° n oE1IL) — 30 4 Ofs} [2] > bo t { wae a Hain ateler te ole TEC I Jasreo PE (370 7; forint t=0 <0 edath engi 0) 3 t4-+) { on dor (tor fe0, Seodtetbength(s) J++) Comnole tonite Carey Csye "9; Comes writeLine C Coroole + Read Line ¢ yy Noid Maint > . PTTL Jos nme toeL2IL Is Note 2 MLSE sow SY ASEL ALG] = new int CD SOG; 1614 Ys U4 pow Ate) z new Unt C7 [20,5035 1 3% aww aes PRYOS We ACAI sneer treo IP 4,50, 6055 “2 #* (Pink t= HQ 1 PKA Gaek bargin yy, tet) | t La) fat foo, sale] Length 4 f44 LO . ot dag, Seale] Largth 454+) i tomoterootte COCOPI4" "VF gga 4 Compote ortke Line ©) i og te | 4 Conde Reding i CEE 4 ees DHee & b jogged aararp sth mm tha jagged wy. ST will sehen 10-9 amor arith to dade “4 acty, : 4 Bano St ALO]. hergth —>4 Ly tak ok dicrunsional osmos Ly 303 oye diranstonal xy FH) Srnplernent the okove prgra by wakeg digg loups cemmbircdton ff 7B) Wrih oo jogged — amray to hone Customers acto % tanplement Su eating wning Site [04 Combinadion i inptay Customer oeblacyr which in ovetllble tA Joggee ervey with digg ol? jonnak: Se ——__CO Yotd waka) conwle waite C"\t Satyaso")s a fi oly lomo. orth CHEW; Satya. cemvole Read ne C), he 4 AQ) Waite a Comole piqin AD accept elernanty vom the user and Bore Inty Crrdenintimal array ard dingy to wer Enter your Clemant 3 10 Enter your. Bement 3 20. t[a0f3e) “o]se Enlix your” Clnart$ 30 refs te Enix yow Flume 540 Ente Your eleurent s 50 Arnoy eleven are? 7 lo 20 30 to 50 By, Nota Matned 4 fattTas Mee EC , £ pee Ur, Wet £0] = ConientToSnks?Ccom ote fad Lene C.), Compote. Wake Line ("EAfer your atements \n') 7 OLN) = Conveur No tris? CConnole. teadltne 6) 5 Conoole + WktteLine C' Eater your ebimant sw") 5 \ I ates lonvert «Toipt32Ctonrots »Feadlinet)); hecho lane C® Ender univ clement e will t< For Gtc0 P< arteng A 5 i i Connole wate (aCe) +" Wi BLED = (nvert inter (lonole LeadléneC))5 Conrole JtdatteLtne. | Pg Notd Main C ) \Ss fokl Ja ene “ent (ss dorlint t<0; tearlensth s t+) Conoole. toate (""Entid Yoor elsraanch's”'), ALI] = Comet To Ent 22 (conrotes Ceadloee))- Comrote + wart O(n"); 48 Comagle torttelined, “Away element aw: ")5 cea S54 Oshength seer) 4 Coen Cape ys “towels + Readline 0)! ; 4 ‘ J i (4s) waite a cool. prgm to crea two aeroug OH narnes @Oages Accepl Wea rare, wea oge Hove into (oncean Osraup ', Accept the Vasey rare clinplay errdk omg: 2b ae Eator.. or BGO 2, Fra Enter uvage i £0 Enew ur came: Sita Ente ur age, Entix ur ame ¢ venkat Narre. and clenplay the Concern sew age fy vser eritered Inverted 4 7. | ob ur! age. # Ao . eee Enter Ent Entiy Enter Ente opi Ur noune ! bop vr oge + 26 vr rere: Yarnwh ur ager er tind cont 7 PFE teaaching user ramet age in796 Notd Mato C) Wdkep t. declaring aan Staiegl Jnamer = N07 Stating (I 3 tot Cag %&y dogeual t CakeNet will aupport rome. of the ype converntoy Lokich ome Called a wapliett type cmoting. 40 wnplrment any arpctal Syntax except aitgnment operation, Following table Aéeert bog the parsioe. inlet @ype convertiiong tn cake Nee From To | dbyte Shorts, Ent, Lorg, Floak, Double, Decimal voyte Shot, Valor Tat) VEak y Long WorgsPoat, double, decéonat Short Gnk , Lorg , Ploak, Double, clecirnal - Hi wphorle EAE, Vine, Long, Vlong., Float, Double, Dectmal - | Tae 00g; Plouk, powlle ,Pectowl { URat borg , Vlog , Float, Double, cdecemal . i hong, Float, double, destinas t vlerg Plank, dove 1 decimal i Plat Doubs | | { | stow | nal, chat vathant, tne, Vint, long, floak, olorg, double, dectmal . Stodog obseck- sae) Baomple for snelvctt — kype caattey fooro at to Long Notd Rake connote woattelinet J wolue. 104747) + Comme Reading)”, 4 AD Cromple. qos tenplick & “type casting de Convent rem chan 40 tar gdouble, Notd Koin¢ ) i chon & = tre tee, Console. woitaline Mint t vadua 04D: . dovble d ses Comate Watkelare(“dookhe A value (0/7 24>) chon & d fot Sz05 Comme write Une(“Snk f value io P4505 Compote: Roadlinet ) 3 5 “te Yat wade tnt ay dovipts 6 Vole is 2 44. ny Oe F vadue & 2&6 4. ig) Serpement atove al pomtble. Hrpiictt type convenstone te type Gasktong * - 2 1 g) then we go for explictt type coating Wes whnwer we ate aritgntng one Cpe value inky another, type Vartalle which @ not poattile. toy wnpltctt Fipe casting ron ne hove. 40 FO fot expltert ype casting —eBhile Uplenenting eapltctt Lype cading — progvamwnes hay > dollow ayme apectol Ape Comouston. Synkon.. 1 fn cakeNek enplictt ‘type casing ce con tomplement by nig: 3B feckniques Rak ct + Safe op type Casting technique a Posing Technique 3: Convaattng He chatqgue. SCOT Site op type tng “gels ~y Syrtae To cotta ty pe > =< Tedatatyre)s + Exompe for CH + ide of type casting frown eomverting Ayan int to byl AY ant Pet005 byte be Coyle) ty Conpole. waateLine Ubute b volue ia +by; Connole Roadline 695 > Fosatcg-. — To Implement Poovsting, we wit wre ce pre doping d method called Yeouse. () Porwse ©) 2 Th a predopined member method oF oon -promitive cablyze — Shxac how Y Paxne rrethod value into gken Catling datatype and that conunted value gt wit) es acca Skate valan -and,{Fwill Convent Gaing return. 49) Eyeeaple for paring Noid Magne ) Conwole, eoaitaline(“tméer vr iets"): METS = ints PooreC conde. PeadLine ¢ n-, Console . Waite! Une (" Enter ur weigh") 5 ( ‘ght Sleak weight = float. Pooe Cermnte Read ine ¢)); Comolewretelton (OL Fh tas Conrds Oritaline Cun wot ght | Comole ssid Line ( )-, | % | 0) Emomple +2 Jor forutng. Noid Mako () i "gaat ); bs" 4 uetghe) , String Siz os" fre ils tate Pave C61); [vat Satng 0-2 v0 | the Te = tat. ParreC52); [Lpormat eaccaptton Staing @ ey 5"y Float 4\ = float. Pawe 53); Mvabia a a Fosse 3); MYosmat excep Hon Salng S4=" (2 34 serg esq BaD Wnt te = Ot, trove (843s If org iow) String SS saul . 2 te 2) ink 25 = ink pose (65); M Aaqument ,encapBor. BD mplement mmulttple pragma fot client —garvings 3. Comentiog 3- - =» feplemant Comentiy swe fous to wie a predagined clays 7 Comet ; Convert + —_— 4 , ~Yconvent is a predegined cats Caw which be pork q Aagtten ase clam (Cibrary. 7 “Y with to convert clay we have. all the dodo type. coavension. methods Difference. between Poovsing and convening =~ - - Cowenting - } Barring, — | » Poomtng. will Convent 4xom A) Convenking will Convent Prom Sleing to ony otfun datatype any dota type do ary olten dota type Dipuence dw tok Rowe & Convent. ToGnt 32.4- ok - Beane Connon TeBet 3? YER WEN conmnt senting 4 Te A) Be eI convent any “type. to ties fat. i Y) when Mortog vordable Contatas’ 8) when aoing Nartalde Contains ‘ MULL Value, fot. Rove wii) DNL Nou Convent. To Ints2 Will not . hetow Argument nol excaplon » thro ony exception €, will comet the. nil value into deo. 7 Boring a proce a converting from volue Type +0 Peferance fy po EX" Converting drm tt to object - 7 WRoting toa poten of Converting from Rogerence type 40 vollue type | E+ Comenting fran object to toe Note Go de Boung and Unboxing we can une Ctr Styk of type casitag | Symten. wi) Frample for Goring and onBoxing. Noid Matec) tk f= 004 I] value. Ogee object -obf =Cohject) t4 /f boat Covale Wouteline lob} value ts 2" 403 )+ fok I =Utot) wey u unboxing Comoles weuleline lj vatue ta 345); Console» RoadLine( )* y BR) Wote a Comole prgin to accept a wange ard display the nunkers ep 1 Ahab sarge + tq ae MAI | Conve waiteline (Enix ur Tonge.) ). int 9 Tok, Fore Cemmsote, RoodLeine (9) | For ink begs tesBb rine) 7 Conde waniteLine CF Convole RaadLine Cs pgm fe prod fam gin sange. ce a PO Eales ut range: voy Bl ee wm te] E— Som hp 1 ius Noid Maing ) lovwle, watteline (" Enter ur Barge .") an +Foove (comote Deadline 6)):, St Sum D0; rGing Peps teetes teed Sum = gumet? 4 : Connate waiteline (sum toi "+6um); Envole Raadline 0) 5 3 &) Conde pigmr fo acept a Sarge & Spay Iulipliation of ange Noid Mota) Comole. Waitebina 6" Ender ua sange 3); vlong n= vbong-farne Ceomutes ReadLine (3); Viong mol soi) 5 , dor (dog ta 45 Kany har) oe & Lal = mula ts : : 4 + Arg? Comnole »Waitetine (anultylicatten 4 1" mal); Conrole » Read Lene () \ DO) Conndle prqrn to Lind Jackonial of given mo y Noid Main) ’ as \ foc | <\ iC uF Conde + waite ine C"Enlen tne sange! ); | Vlong °0 = tory, Rowe (Cemote toodline 015 w y : | Conte tyacteLine (Hacktal 4 Coynaols Ranitine (); y £6) Comnle gegen 10 dtaploy ave, for given no. ole “4 Pae) + Rigen Void Kain ¢) | Comoles Watt ling C" Enten the numbers): WH 1G Oe ee Cemmstes Read Liner J; i 7 2 oe fomrde. wattehine (ES Vat =P nat); Commo Lead Line €) > y . BX) Cormole prgrr 40 dioplay nea Qike below. 1 a2 333 | uuu i ss 5 58 _— Yoid Maint) t wr & Compote. fordters tc ess fer) dow Gorlgely Featrirt ) CE Condes Waitelinel ) 5 en, Conblt Rondline):, ee te 3 2. L001 ombination,, 85) Sraplerrent above pag by IMG digg Woes © #4) Console. prqm eto print no's (ike belous with in given range. ee FET Enkea A Range « t- 1 : 2 aes aw ead alia Void Haina) q Connolessdattaline ("ember Ba sarge s”) "y, Bae N= tat. Parse Comme Roadline C3)! L for Cint Sot Vest j dee) Conackerort (Pa "5 4 Connote wont Goe )5, Courke ReadLiner) 5 40) Conte pigrr to prie& the n'y Vike below within given Aonge ' tt ' -) Eatin or warge: ' = FO (= : : 1 v2 . 12 3us eg? Void maint) q How (tok 3245 He fants §44) Conncle soaiteLing ("Enbia Ur Sarge") > nes ok 9 = ink Marre (Comole Reodline (Ds, a 8 Sorlinete5 teces ¢ roe : V5 Tecoy eee) ie & ba See 5 1 Comal vanttetye” ”); 3 Comnle. waite net 13 oynole - Eaadtine 15 emma esc ESE HRSA SESE RRA SR 1) Comole. prgrn to print no's Lite Bolow within given range oe : Ein on range: [al<— 55555 a a3 2 as Noid Katnc > 4 Connrte svanitelinal® Entla Ur vange:”); for nz Tot Rone Ceonrole Readline c));, dor (at ei t- Aone Sets 3 ach yj44) L corodendathe 1): Compote Warteling () “> 4 Comnole -oadline C) 5 4 92) Connale prgn 4D Ataploy non (TEL below etthin given mange Enter vr range 6 123B us er 123 12 1 Void Hoin( ) ConroleoL (“Enter vr range:") 5 toe ne tntepooue ( Connote: Mead Line oy * for tat te ny Cet st) 4FC&nk Jooyf sts H+ © console unite fot" "); % tonne. WtELEne C) 3 covalss Readltne U2 Fy Conk. prqm 40 dinplay tha no's Utle below } main ©) hae ole ‘ Ant Seas : 2 ' He Au tet) ee a7 to Lyoetime tery | an pita eal L Gonnole «Wirt K+" ") Kets Conpole .WrttalBne (5 4 Conmole + ReadLinet 7 y roomate progam ty dinglay tha no's Lita bolas oi thin the. range. maine) . “ys } connlas WrittLine C enter qos range" 1 a uukong » Rer9e (Cconnole. Rradlene Ci)? fe KEN Alatong a1 5 Teeny 44d 4 (along fe) gs20, ew ty Cxe=m , eG CR y kt ty OS A SERA RES SEER ARR SERN Como . Wve Ly Compote Roadline c) + y i ee ee i { Po. ep me 5 ' } ce ag AR OR 3 3 3 YOR G4 Hou 4 x Ss 5 56 5 SF A tonmmote prgT fo actepk Student nome and aceept 3 Sub manks they os, mi,™2),™MB and cotcufote the total and avg , ya Sebo fist claw «Ty avg 40 behoeen Go te < 60 ip ay > 235 and<50 Wind claw Tg Srrdent tn geting Ia ony on. @ the Sab <3¢ then Teaute ty fet\. maint) Connole.. Watteline Center Student rome”): Sting foarne. > Gemol RL) Connie WL “enter mi monks s “J: Gre 1 = ole, Rove (consol « Readline L))3 Console WLC" enter ane-mosics: Gok m2 = Ink. Pose Ceonote - RLU) tonnate OL Center m3 marcs,"): tat 8 a ink- Bove Coonsole . eadneC))? PoE total = mito +35 4 floak avg: total “37 dpe as Cm) 22:85 1), m2-235)) m3225) ‘ Compote wl CSrome¢’ tenuate to got"): % ebce if Lavg > = 60) tomete «tot ( Snare, +" vexatt ts 13 clan’); ql abe C50 >zavg ) 4 Compote» WL Csmamet result 34 2nd clans") y abe Counts. WL (Snare +” yenuile ts aed clay’ 4 Comte » BLO) Y j oe enter Studank Nou ? Sra enter rm rrons! #0 + enter mr monks » 9 enter HN MONKS 7 i Ato sha venttt tictam. BN tamale pene chy awtde omala Lice hollow untth?n aiven Yanee compete. prg fo accept Wer age & dirpiouy User Stating > write a concn mqram f& accep 2, Cs his wer SALE i OB nd li tony age >= SE seniow Citirer O89 25-63 3 wor ing OE 16-24 > Lg COrdeuk 3-16 2D ccdool bey 1-3 ug kes oo > plaeying tei Console -vosteting C"enley uvage”), Pat sab. Parte (contou.Peadliinel)), ty (ages =se) Comtou writeline (“tenor Citizen") ele tp (ages =21) £ conwou. write tive (! Woneing Citnen'), F i eUrts Cage> =H). | Contole. umittline (“ety atent 4), % | elie ig (age> +3) Leonsol. witriine ("scwol staat”); suey (age> =!) concole. write Nive (“plug tid"): i ee Cedheou watetine( Raat age): 2 b 3D WST a coud program & ALEpECUrtome” neme ound cUMIOMmLY | cong — its Why attepi cuwTemen Type aud Maati Ue | euathiay eI one auspitly be UE ster? | i 1 pag Tuatucery o Cask pew wit ub = FRC) ee ena wean ames Ruxidontia) Sele Thoner ww wait Ud = 6 Re] — Cus entity custimen wu: | ee aT antes One). en cxtomen Age’ Peext for nde bay Peed 2 for Lexidenwiiay wort pew WAT OO = PRE Fowl) bri) = WWUAF = rox? -(€x0] CType Pres S fey agua: Gl ete Than ews bay ee Zao one eor 8 Sedu ay (OF Pas uate = + & ic A Antal bil) ZoBo | Reokdanttal Codd pu uatts 6 Ra Fgtadhare cost fwat = free. “oka “bill = eumi be Ghgpe, Warn Nord Kaine) 7 { Bho Londes tnt tiling ("Enix Carstomer names Dy Searing Crame. = Console Neadlinec) ; Compote eonitebine CEntia customer untth’s")5 Yok eunih © Tnb.feove ( Convales Loadtine C)): i VeAtore Sk " Connee waiteLine’ Enter customer Byes 4" yn" y pred 4 for Soduntay Am" spre & for wridunce “en "A Pew 3for eyriculture"); Chon clgpe = chaReovre (Conrtetteadtine oS: Ret fel Battech Cetyre) 1 Care Nt Gommottoatte Une Casha fetal Bil” choexs)) eas Cape ‘a's cramet,. . . (orvaes tanttzline (bho total Bilt. 5” Chute 6)5 reaks Case. 8': “on rr———C—C=—“=‘=EE fovea 5 Conte conte line Ciwatid input"), Yorenteg qoty restarts ! 5 ! } Covmle. Reading 0) 03) Seplerrent. “ne hove prgin WIIh dik wegutemunt tite bela, ' ator today - uP to 100 cost |i 4 B Tf C100) -y coo pst —€ Bs Aor wenidential vp tp 100 cook [ that —6 & 7ECy Wo) tast[unte — + Re dov agrtcaltus? —cont[utt —— o}- ~e Y above Liner one same Switch Cckype) g 7 ¢ § e Gms ty Ceuntt, >100) t Nconpole wonrtke ramet" tora bf) 2 "Cunt te )s | rs —s decanote words (Cramet’to4ad bill i 2” Gentle 4) y Yoreak : cone a Z > a ‘¢ cde nae otal bi ths "anibr 35 bcamotertontb ‘ eho “ Cowoles WALle (Crame+” Fo: fovea 5, Cone 84, Ny barttaco} . _ menos, D5 fonnske. worite (cove "toes atl fo + Teaneh « breaks, Asal 4 Connde conste C eramet malta type’) > Goro restonts cg ds "Genie #6) mee 4 fomide. ReadLine() + 5 pelos letee amore pages wi Amal changes ‘Toda sty cb ¢ to % Gy VP ORR Hin ay eGo . do nB Gy Rertdentor - a Yowk upto oo®& : Ce go AO fe Agricalhne bil & oO 105) Gen plement — exbove Adan mants prg™M Uving Switth case 106) Smplament @beve’ wer sake prgen by using Sutkch ene: 104) Qmplement above olectricily Gi pge toy using y Ole ig "©8) Gmnglement abl above 3 pig by using nested 1 10f) torvole Erg to sump Q no's. oe : 4 4 & fnten FP valee+ Tol ew 3 Enten J value: fs & value wo 2 5 J value iss 0 Ya Wotd. ata) Lonnole »waiteline (“ Entea t values ‘Os fot @ =fnts Move (Comoe: Readline @5 } Console s rite bine (“Enter f vate) ! tot j= Bob tore (Consote.Readline ())7 ink Remp ats in pate ted, Je temp: cowale waitehine (Seveue 10 "4 4); Comole Waite Lire ("5 veckua “en “ads Comoe» Peadline a re mira A Tc sr REC AA REDNESS wthowl _ M10): Genplenent above rst” wring temp variable ae Maint) Cowole s wuitetine Center t value 4%)’, Tr te tre, pasre C Comole « leodLine 05: Cove. waiteline Centin j watues "J; — Foe d= tnt. poovse ( Connele Read ine Os tas 2 co Bs as Comote Waite tine mt vadue “os "4 2)) Come wortline C" J-vadue 42 45); Connde Meadline C5 y . : 1D Conrale pgm 49 find btgguie among 3 nd» ¢ Yoid = Maint) Comoe Waite “Ende y first noi): | ME A> Yak eparre Ceomole Leadline ); Comole wate “Enter Aecond mo:"') 5 Tot be ints pouel Como» Pact lined) J) Cowole wate C' Entew ahtrd nov")s fat cz tat. feue (Comme: Raadline o))5 fCa>bad ase) } i { Bade vwaife Ca by btgqert 9 evei{e >c) . Compe WAHTE EC" & is biggeot I ee . comple. wale Ce wv geiggnt Dd Console, Peadlinec ); Noles- Above pgm is giving wrong 0] whey Urer entered Same no's b ie 12) waite the py to this py problem . using rosted Tf and aby Switch, N3) dep ploment alcove pgm wang Amp ty 1) Comole pgm to dinplay Arallese na among. 3. nes, | Noid Maint) | 4 Connole Wala ( “Entar. isnt ro 2); tot a = tas forve (conrole. Reading ))5 O-BS & Cont Orit ("Enter 4econd no")- be 5 es Zor be tbs Paswe (Comole Read Une 1): cB 5 6 Connole, Write Enter anird 001"); ce gat C= tok. Pore ( Comole - Cead (ine od); 4 (amb 4 are) ‘ t 4, Ys CO> 4) 4 toro. Waaitaline ("et bpiggent D2 ; Comole warrteltne (“og b ia equal "> i | ebe (a>e) a | 25) Emplement glove ‘rmalleat mo pagin uring nested op (08 fonda. grag fo prick biggest among ree 7" i "t Srrallear 10's : a 1K) second vtegent we Uune's a bees i V9) Aecond rernallest among Ynols Saaltth vite ipebe rad) Biggest no cmong 5 no's QD Smallest no among 5d f (22) (Sigg Setond biggest & Second tmalluk no . a 2g) Wd biggnt oo pe scum smear ea cane Na | 14) Comole prgm i een or odd Eyample for even Ruyb- - - Brample dor ald se j 1 divide | —% Modulan speatoy 2 © 2)4 (2 Que diet a. bina [ —> dwinion operats. +, datatndar —y with the halle of medulan oparatil hire gap weminden WT wlth the help a dtyinion opratd(/) we geh Quotent- | Ex: Void Hagn( ) : Gest fot tt. Ute: olp Connle aiteline CF) + am ok Pe le: Conndle wartteltne CI) y \ 0 Comnole Rundtine () 5 14) op x Enter ux no. 2 (ikX— 4 ' De even nOMben + : ‘ } : i Pron fe Void meine) § i Tomales Watteline (“Entor youy aos’) ; i at ne Tots Parme(Conrole. Cea Line ()): 4 Py whose 9) | Conde. @ute Line (" oy yp even nomen”): eloe Comnole » Waite ine (" Tt 2% add number") 5 fonnde: Read); i 145) Connole. prgm to dénglay the War of ever role waite in given “ange dirplay the Aum of ewer rele & me nomber of. given Ny within that sange. olp Enter the range; 0 | je) co Sum ety ft Lint of gv Even non with in 10 6 ae [ be eo # ; BF 6 i Io Me 3B £ a Pa a) ; € , 8 wre lo 40 {eo} < Sam og ever cumbary 4 120 cet 10 of even numbers ams 5 ca Void Mainc ¢ y | Conncle wi nrfeLine (“ Eoten ur vange!'), Fok P< tote Rowe (Combe: Readitnge); Connole. waite line C tank oy exe no with ta" 40) 5 Tok Sum=0; ctr 05 ‘ . for(int tas tien; titeg) ¢ Comoe. aiteline ( 8); 10 Oe s { tet Suto = Sune Cte te hee ey Comoole. coat Tele urn of ewer numbers axctesum) 5 tonal BENE (8 fy. eran numbers ane!” ote} i forsale, Readlinec}, oc ae . Modul eat yy (26) Smplement obo ve. pram wring hag au operat Noid Mein) A Connole Warteline (“Enters yout ranges’); fat nz tots Rene (Comole. Read Line O)); Connolerwarteline ("Liat of eueo nota ares”): int Sumo, ctazoy, Forltnt t285 teen fabs i Comacle WatleLine-€?)-, 1, (9% @=20) cowmle tort tiLine CE) + Surn > Sum + ‘3 ona Bttattne(" sum of eu nds oe "oy Sum Ds Comole. Radtine()5 ale Enter of varge: 'o Liat of oven rola ates 2 & é ¢ 10 , Bum of even no's asset 30> £24) Conndle prgm to dinplay the odd rola q with and dtnglay the Aum & Link ef old no's with in vange tn given wange S)with out wing vradulan operatot — 2) By uring modulan, operah £25) Connole pgm 10 chack the given NO io a prime 0 dL nok. Prime 90; Number which So divintele | by 4 and Ph sed ere eee Noid Maint) i Lonpole soaitiline "Enter Gr umber =”): tok n= tote Paswe. (Conndle, Read tine (9) 1Pfv0 Conale. Ortle Line(* prime no) 5 > “Ss i A, ee conole, oritsLing ( not oc prime no"): I Conpola, RaadLine ©) 5 | % | } 129) Comok. ergm to dinploy Stor of prime nolo, Sum 4 Prtene nol, 0 -of Kime, noly with jn given range ae eo Void Maint ) gus te | 4 et | tonnole anttelinet” Enter ur Yange:”): { Tot 1 = fo. parse (Connvle ReadLine 3) 7 fate Sum=oy cka = forthe; fe =a 5 tet) | 4 Yonge =o) L peters line P), / lowens 5 es sacl 120) Conole pigm to revere the given no cane 5 Eotea uv nos _ Tajens Tree no ty 5 32} 7 . Noid. Matal ) Conde, tyaiteline ("Enter your 0; Ji i ink n = Fok, pase (Comole. RLCII5 Tob yam, yeveds ' while (n }=0) Yen = of 105 WY = vevek 10 +e 5 | 9= oho, Commole WL" Reverse numba ist !+Neu)s comole RUC), t | Ak totection ee eee 193t=0 eT \2hoo 3T AY cor ’ com = 123 -le 10 Se SED re El EA ev 2 OR D+ vem FEVER KID Tem eve SERIF IEM Os OKIO43 L 8=3089 423 e123) Beve 224 Be | | 32 <32xI04 ] | 13) tdunole prgeo ty check eohether given nots & polindiome not f Void = Moint ) 4 townle .taxrtiline CM Enter your no:")5 oto, Pome (cowake 000)); wrk on Te vem Nev=Dy tempo ohile (nl 0) Yam enti s fev yey O-IEM » nerlos 4 , " Comole WL Revers number it "tev J: "betemp = 2 sev) Cowole wl ("se & palyndvome ae abe connole tL C™TR ip oF polprctsome 2) console . ALC), astele(ny <0) Teen Yev= 6 tems act /o FEV eV KID On Ye nf po em A EE SES MA 122) Conde: prgre to wvovie the given Stoing ce ntaze 0) si (omole WLU Ente aname:")" Enter gnome! Braing = gpmole Read linei qama : Jaweme name im, amar | Staing en | ge La ai cagth: A =O | i CR Po | ‘ = ys i ? be bere i Commecrantirtine Cost bd). I Line orarea; ‘y connole WLC b) 5 Conrole. Readline()s fl 5 33) Comole prger to chock given atring, iy & polyndaome 8 not. | Votd Modot) ‘ warn i L | (onmole. wh ("Enla a names") 5 i Ge rare I Ekaing a = comole ec Os be | Staing b= aell s Tus izeoten | SG Coote ae pe ee | 3 wor | t aan | b= brary. | 5 oot i b (a= =b)" i Comore. ritetine (Fr % podynclvome') » ehe Comple LE" not & pokyndrome") Grrole RUC): Zi pig 70 genres jablnoc s3U) connote npotd Main c) 4 inbaso, bel,c20! ohile (a X= (00) q ve omole. waite (at" ") Cz at; aebs b= cy 4 Console + Rand linet) 5 4 ale wed Me BS ep ar ah FE AT A TAS ai SUB AER we c SRaee ys : ° BARE TE oy Object oriented frogramnming _Syalee :—-(00%s) @ What w Object Orientod approach! BB Object ohiented approach to a methodology to develop computey Programs boy wating clomes and objec . D aniestd ® thar do you mean by Oe programming lorguoge? Aw A programentog Language hich will follous object Arented Spproach ey cabled cr object oat ented! PIG Yar Longuoge ENE C4) CHL Neb, VE Nek. & tohot do you mmaan by thject diented popramming Princes? Aws=7 0A PReciples ose y L Excapaulation he Abstackion © 3s Tn hoattence . { Foli morphishn « | ~ Sve sy Object giented Programming fonguoge hos 0 follow the | above princioles - > To achive the 0074 principles every Object Rented Programming | language. sci ue “too cont t. claw 2. Objeck {clove s— clam i wedlectton of data members and menten functors. 7 Dalla rember con be called as Sale (8) Variable WY field Q)arot “we stole 7 AM stcite win oepterent some value 7 Memior function Con be Called a method (8) fonction. wd be havigur - Q whot i behovour! SP Behottour uy rowing bal tunchinality (01) logic - wy Fisally we can hay clan is a. tallectron Stal ard hohauionrs “To dazine a clan wWe ave to ure clan Kay word —y KSyntak to depine clam 74- Sy ¥ veyor Kawemmodizier> clan f Ul stolen ° Ul vaxtobles 1 behovious (} methods 4 clam #5 a logical swprerentatian 4 ahin we depine cla no memory will be allocctid for clam members = 8D Lirt out the state, q bebavtow of huwan being: Skater, > name age, oy hatght weigh methods: eating : > Speaking a untting “es Lint out the state ¢ behaves 07 employee % shadlentg Customer ersiplogbe Student: custornen, Statin Stabe atin > valley Mars, > Yombion elon’ a) ethody cenptod, “+ foe. paryinent t ws ottenden ce cate - Ce eer @) when ux will 92 For States YP lohenever woe wort fo Suprerent ome value we will go for gabe Ex: empno, arnp narce, mpage - Types | Vaxtables s— 7 CHENG will Auppost 3 pen ef Voodables 1, Local voodable,, Li Tnntance vooiale @) Non otakte variable 3. Sbatic vasioble. |. Lock Vasvioble ; - | -y A vatioble which w dechned within a method (4 Colted ag hocal Vario He > Focak Variable should be ‘tmittaliged with some volus bafore accems othenwine compiday will geen an eroa. 2-Tookance asiatle (a) Non-staMe vantable t — yA variable which i datlard jnstde clans and Okide the method without sae Kayuand a called inshonce anal! | 5 u | 3 Static Variable ¢— He waite | > WN vorwable which A cectaned eaatder clam. and oubride -the method by uaing Motic Kay uooy a 14 Called ay State wootable: Duwhen we will go for method CH) behawiey 1 2 BP whanewer we want to implement some fonctonalily we will go for method 6 tahavtown. EX! caleulosing pollery , Cloulating og@ GV coleulading manta = — . —F Syntan to cage: a method: Kyte ¢ <0792.5 > Noles > Argument ard parades pot ade Sane - Recording 4 porameters ginethods ove claitied tote a ype, 1 Qootarreten les melbod 2. Poromelerigiasaed rrathod \Froreter ler _enathod ° q —> while daginirg a meld th we dint declons any Panametens whe Wh called a» Paseuneten tend method i Q) when we will go-for Parareter lam method So 3 Kecordng 4D method jonctt orally ithe method doeint ote Gang Value. “then we whit x Sov — Parametes ‘ers method clan Mrograr> U sotal , Duley ) K Comngle sWarttaline (“Welcome to CH Nef") ex: Cove, coartaline (“Welcome to ASPNet" J gia Maint) Feredbod + + thile dagintng a rrathod & we fave declaned ‘pararnedey which 0 called an pebaretentjed meted A Q) When We will e dor Paxameterized Katha ? yo Aatoreling ty Sicquivemant whenen a mathod is suguived ome value, JPG functionality “A8oy ‘tae : flan Progtiam Ex: Vota ocd Ginta, tat b) © tok wy cot ', tonne tors teLine CRerule ds 2 "be): For parameterized method y = Plecovding to method return “Lypes methods oe lard tied fn to & byper : 1. Void Method a. Non-votd Method « tvotd Method ; <> A mathod which bs not vetuining ony Volue accolding t th functionality Ud called a2 oid method DS Vetd Methol vehi Hype should be void- ® when we will go dor void Method! fm Accatcteg 0 the Suquttemanh “yy Yhe mashed chemk sequbre 40 Yen any value we ssl go dor Void Method. . As Non-Void Method + 47 A method which B aching dome value is, called Yop-Vosd Method. om : Q)rhen we will go for non -Votd Nethad 2 ‘ i we Ty Mecording 40 wethod Puncttonallty ~4 vt raged“ 49 chan n Some volus Wwe will go for non-Wid ana” “> TRE saturn type of methad wit be depending on ype % the volue which Is ouknning by the ‘mathod, > Ty the method at vequives to mahen Nempotent vl shan’ hood” suhan “type con be any om gf tte samentoat doko type atic, nk, long) >” snort Ts the wethod Ly returning Volue tr 4toating value tren oid, wouthod rehon type Con be Host, double dectmat Sy bt fond Cnt a.) Teturn of 1 ; con ‘ ee y a char fond (char a) i yehun ot 4 Agate — Method cow ctamiied into & bypy ( Tnntance Method GR) Nom-atole Method AL Skate Hethod Tvrtonce Mathnod » > While dapintng a mathod 34 we dent ure Atatic layweld ohich * catted a» taotance mathod. 7 Fy oe wank to oxcers Tevtonce wethody we have to. acces with the hale of otjece En ‘cool 4un3 [kool a) aeturn ay i 2 Static Methed ect dogging oO methed ty we ane wring Atolt « Kagevord which ip tala op shoe muhod — YL we want 40 accom Sokic tmasthod we fave” tp” atten with the hele ie clam name. Memory allocation No memory soil be allocated for clans — No wremovy wil be allocatid for mattods ~~ Mecriony will be altedalad for variables, Memory allocattor dor trutance _vatfol > When the object isereatid for a claw Concern clam instance Nowiables -will be. atlocatteg manor. . 5 y When -on object. “4, destroyed — Concern claw, instance: vartable, memory will be cloacal prams. & 790 aambes an Pony. sok .-q% 0, Rapes eer mvopin, 10f Rrourmn Or OVO - ay, Pambes +4 Cpaweus po oo» Rung" 2ne70 mm ay ya am 5 a 450 OPP rep, urge 7. Dooney ee §=r——————C e$_ q woh — yoyo -& ee ee “V"AWriCon PQey OAT Buyro 24 ne ADU LEYG <~ i AN £ ayer TK] fqpos woe 404, 7 Reg gf en ce ’ Sy20 a > f f eAay anced 3 | (PA 34) PPO PiOK, | : pours PUNE f can Sinoe : | a woth = omen « pohoeywap O23] pogo MTA, “SqORER Dua uy WO» PR PHO PIQOPGON FOI] Payrdwor yy UoRMIM poyynu Wy YOY < aj 700) 0) 20) Puxymayy oa yn Prowour wom poy fo goed vy C 720) 20f Ua-mo}0 hrowe yy rraurorborg Ra appojien rbeqaod Aa G rom & vy poRoyop 79 4219 ane op QO i Puxpone objeck + > > allocate wamow — dor Frstonte, vortiables. that % an objects - —y Ale Objeck ts & Prstance of a clo ughich ay fend rep vesentacti on s i 2 e Of a clan. “Y¥fov example - human being ty aclom , Kivi da object of Turan being clos. 4 > when we crea on ect for a claw wera | will be allocate Dr cortenn clas tantance Voodalces, tL comtatn : what _ Object > AN object ton contain Conte clan fnghance variable and Contery Clos tetonce -muthods aferencens. > Syntax to cwali _a_object i < clo Nome > Syston FP Frvote__ Fratance methods Kobjectname >e 5 Programming ta oops !- Structure of Phe mL clans cltogsarn- ¥ clan nome} jeceaang | Yosiables | g & ee D write a Comole, program to dasine a clam wilh two Smo+onle metho da. D Yotd Wethod without ponametins 4) void Method woth ganamdiy . ole welcome to OOPS = Addition versal ips Void Gueetos Hed ot vere P. oe mares pate, claw Grample.t t Clam tMiyclare « L ae Internal Noid Greet) § y fntaret Void add Liat a, tot bp tet a5; woe, i { i i tonvole. wattebine (“Welconne 4o 000s") 2 i } Ink ren = Ot by” Commole, woritiline.(” Renutt dunes); Clow proyrarn : i _ Void tain g) 4 Mydove obf = neo Myclom (5 16 OB}. Greate) on obj « Rad (10,5) Poh | - Conoole- Loadtine t ): t Y fain Jy Ml com 4H roynesqote. object D YD Conmole proqrar Srample > qloove. Program by pawing a,b Vodus + es by WD + ole — Addittoe Fesullto + st a x Enter fier no: _________— (ao Je— tod es AAA Cinta, taro) Enter second no: Q fel god Oddi on aowetk ds 5 30 TOP clay Myc t Internal Wid Add Cinka,int b)” Tak Yess Orb Conole. Waittlinec’ Addition posulb dos "bves) > i aa clay grog ras q Noid Maint ) t toredle Caitalane “tater fit no~ "): Tat k= tak. farre (Console Read Linecy)? Conpole varialine (“Entin tecond not"): Tot y = toh. Pare (Comole s Readlire (F, Syclom obf = mw Nyclom0) 5 Obj. Add (4, ¥); Conodle, Readline 6) 5 3) Teplement the Above Pdd method ao & ‘Ton-void method - Clay -Higclan Fhternal tat add (nto, tnt b) £ or fink wen = Oth; ! Yeharn wer! 5 4 Void Rain c) Conaole writeline (Enter 48k noi): Pat We int Porred(conrole. Leactlinel ))* Commole waitiLine ("Enter ‘econd no:")% ink ys ink, Pavel conte. Rand ine 09)2 tat b= Waplyctan obj = mew Nyetow 05 ne 7 = Ob}. AdUCx,4) 5 : Conrole waaktine COgdition cont at "4 Di Comole . Read line C5 wt t ©) Conpate rq #0, cabeatate Fe fotousing 400, Veatoubating use ol oe’ GED eater your mumben: * Void Sqthaselint-a’) Mota eale Cint a) Vorenpbe(e. ConaleSaample ge ~elam — cabeulate { Adhere Void S47 Cink a) int be aways Conroe. waitiline (“Say ws "4b), y Twlenok VoTd Cube (ink 0 ink Cp ORAKO! Conaole. tonttiline Cube ia tee) > a 4 Clam prograre i Void Main C ) 7 Conmmle oritiline C* Entix or nurnber:")s fat on = Ink Pasve (Clormple. Rooting (335 Cobelli obj =neo caleutalit), Obj» ser Cn) 5 obj. Cube(m) 5 Comole- Roadtine () 5 ad BD) Tmplemant above # mttheds as Tom Void Kethods marespace, Examples t cote Yrhrwet clos colculate £ Tnteanal tat qr Cit a) £ tnt tyr axa; Yehor bs 7 Whearal tat cube (tnt a) { tik c= QkaKaS Yeu C5 4 e clam prograren Noid Main( ) 4 tometesaritiline (“Enta vy no: "): fab one ebfearse [tome Read linet) 5 Cahculoti. off. new colcrlatil) 5 fat & obj .cqrtn)s totwole sranitiline (“tquore Reswh sy fat f= obj. cube(n); Ape Comole « taaieline (Cube Rerullis! +e): Conde: Coodtinet)*, 4 fram 4 perjorm qollowing speintfons 5) Connvle. ls addition 2. Supbraction ole 3 & devin Enter frvak 90 4 Us Mut plication we &10 Ent accond 00; w 5 | Bddikion Teault ts 15 Void Ada (inte lat b): Sues tepult bs 5 | Void Sub (fata, fntb) ye raute te Void av Cinta, tok b) coud emlt a5 0 Void mutCtnta, fat b) P92 — romosgnce Samples t Ghentelto clam coleutatons { Toternal Moid Add Lata, int b) 1 tat es = ats lonolesWaitkline (addition seutt tn sam y “ete mol void. Sub( tata int }) tok sep eI Cormole. Waiting (Sue aaaalt ee 14197 % Yerearal void dtu ( intainth? Le iat wae alb ; Connole. wai nel” dev asoulk iy even) ; Tokeanal wid Mull nta,iatb)* 4 fae wes Oko Conde wnt bine (Rak Reratk dee te)s 5 clam progyrore & Vad votnl) i » ” tonndle Wrataline (Enta fara nor”) 5 nt po Whe forre (Comes facelli ne O); Conmole, Wnt Line( * trtin acond not) 4 Tok Y= rb. forse (Covnole » Reodtine (1) + Colcutntions dbf > new caloulafional ) 5, Obj. add LLY) Obj. Sublx,4) 5 obj div (as, obj. Mal OLY) Cengole Bead Une C1 5 % y 5 6) ferplerent abore pram to dagine \ mithobs op non-vold method a branples clam callcutodtons a Zetewral Yak odd (Zot a, int b) at nwsaab: akin ters 5 jo kewatl int Sublidr a, tof b> L job ten = 0b; rehome; 4 Antanal Tat dey (tat 0, So 6) q “ Tink y= albe, Balan Te; rs Fofearal Bak teed Cinko sot 6) f fot w= aK bE rohuin 5 y Clo progam \ 1 Now d tainC) Cone writting” Enbir frat non"), iE A= fot. hase Leowole. RaadLine 0); Groole Weatkling CY Ente geornd no.")> Tat = inkifaowe CComrole. feadtinec)); Cobeubatonn obj aad calcstation() 7 tok top = odj.add uy), Come ratatine Addon v4 3 "he ted) ABP wor = Ob} Sublx4)> Comole Waitlire Cgub ia "¢ Bok)? For vers dbp .anCwd) > (oerole Write Line (“ats do + "WO, Yer wre obj tw Ud), Connole tdatine Uru ds” aren) 5, Comdle: faced Lire O) 4 5 y 5 Diimpleenert lowe gram vy dagining div wethed ov vobilating ime, Heol number should not be xo . : a raromce aarplet Clap Calculations { tntearoh fat dev (tata, Tabb) e while (b= = 0) 4 Conde. Witeline(“Enla oth than dana") 5 t Yo = tnt. parse (Lomale RLOIIS hip Yoho Alb: 5 co prograrn a Noid raind) t Connole WLC" Erbe sivat no:")y tne 4 = To. Porne (Consale: RLOD Comole tL“ entia axcond hor" fot ys tot fase, Ceamole RL CI) > ab caleulal ony obj = ned colcubationtc); fatre> Obsediv (x,y) o>” Comoles waitsline (Naty ould ts 100) 5 Cowl. QLEY', h 2) Degine elo cated Ahudint with’ two behautors 1. Dinplay rhuclenk tayo . 1 A. Coleulotting peudant yell. adit got” soa, Sieg Stas) Nord gab eratt (iat mi, int mz, totera) ele.” clom Atuclank q Goteanah Vora StudentSifo( tok tea , String Sree) 4 come. OLE Bhagat 1a toe! + TADS Coneles ol (" Skudant rams iss" 4 gnamé): y Rokermah ot) student Yerults Cat mt Toh ma.iet ms) A Contole. Waiteline( Mt piarter to. "emt)? Comole tiling’ wi Mawes Conde. writting ("tg mantcn ine "4103 : kok = am HreLams: tL Cm <35 tm, " ne ie 1m2.£B5 !mng<35) tava = tot {3} tomnole swe (* Fat"), che (4 Cong >=b0) Conmole oC “eivat clave")? che +4 (avg » 250) Coole, WLC" Second lan’)? ele - Compote. DL (Third clam") 2 q 3 clan pwyram vord Maine ) paw Sridert OF Student obj = : eee ee conrole » wl (eatin 3 int sid = tabs Pasoe, (eomeles ROD! Conoole BL C"Enlin ghrctak nonce 7 GrirG frame = Conroe, REC j Obj. Student Pa (sid Saoree) Uf Entining mt, miym3” mauica by wer Obs. shadentrenlle Crit minym3 J; ConsoleR el)! i 4) Dyptne a claws called amuplaye- wsith two fer’ bahautowrr . 1. accepting empid, eruprare , emp Soll a Pioplaying emp Id, emprare, empsal - Byioher +3 ot Empl 7 og Empire 5 choutle fabs void Aceapttmplyo 0° eo Reap ay Eruping ol) FHP pamuspate —fastarte 2 4 Clan employes t ine Spf j oS | fring Eraprawe ; double Sal; | Folewmal Void Recep enpingo ( ) | ¢ Conrole, LC” Enlix Emphoyee £0: Bei Epil = inks eae Bead line os Conmole tol" Entr euprane:")i | Epnprare. = Conds RU)! Conwle, WLC Eatin empsat: "J; 7 | docble = deb. Pare Ceonnale, RUD): t Ynterral wad clinplayemptagord cowole- WL“ Ewplagee. 24 iy + "4 emetd); Conade. woL C" Eployes. carne ist ? 4 emprane); poe (dap: “psu dines 40 Void - Haine) . employer obj = nau employ ex-C) 5 Of Acceptmmetago ( I; obj dlaplagénaping C) ; employes obj = raw employ eet): obj2 + Acceptemp?ntoc ):, Obf 9 . deploy empingol ); tonnole Read Line 0); y 4S 3 Tp te above example we hae 1. Benptd —&.Empravra 3. mp Sol - wil be setotad to frotante object ¥ Thebans mamdly allocation and memoly deallecatton esii! bo at the tym q creofing object and eleallocation dh dd 10a bina declared 8 trrtonte Vvortables thre + Protance variable O dostroying object - 7 > Stentlan Pastance. vosiable should be Tntkaltped as part 4 Go object Citation. , > Bub on the above gxample. trrtonce vartabler aus’ iP Haleging agra caratng the object becawe we have ued A mre chantiny Callid mathod 10 niHolime taskance vartables, “o BE the Lime gq casating object to, tnitialige instante vaitable, We Rave a Aeporak mechanivm Called Construcéh. 4 Constouckor: > Conructor Ls a member of a claro which gy a apectal type 2p fonclton . > ComtauctOte will Tawks axtomattalty when on objeck és Created D> forohructh ott nok xehorn any value $0 tt will nor have Nehura Type : ' . ” ec TT > tow rare and Comuchk nome should be Dome > Contour con Centatn porametns —y Syntax to degine forotructot 3— Zaccommoderien > $ Lats | I] toHalezation Code - J Exarople to unduutand lombnuch® execertion . | snomerpate Contbudd ea aw wean oe L Dean ef) A * Clan Myla ahi hiaae . { Wietance VaPables . coe eae fat os : : _ fot bs : 7 . fateanat My dlon-C) ; cas “oy h i . ‘ . Ree ley tay Comole .Wartline 'emstanctth t4 eatling”) 5 | O toy brdoy Potties in ad ed Utotona. Kethod thterral votd esplery oO lowele-WatElire. (So volue Use), Connole, wataLine, ("b volus dst 4b); y “ ee y - Claw pyran oo oe Void Maia) Conte. Witting (‘" Bayse object to Crealss '); pore st daw C)+ Comole. Lo. ia line C“ Aytew object cBeatton $s Ob}. Denplay ds Comole »Raadline 0)*, y Step + y mia Bepare object la created + St calling abjeck creation Conran t Neer pie Myclan cbt Spew Nyclan ) top Stop Steps tr & stips . will execeati The above Ata tarnant Steps creating mgerenee variable SG2° “Cranking object [antonk q thin mamaly ip allocatteg of fntarce vubablen Shep Eovoking Conobucth g sill execute covstaucta (do pat of Comtnact execution tt il) intHabige default valuer ty Seats: 4 ti Fi : => footarce vortaloles & aytertrat tt ail vrittalize the. Giver Voluos to tastance variables]. Aavigniog object addvew tnln Neforente Varlable . 4 Types of. Conobructors :— > Combourctors one motoly 2 Lype 1 Pratance Com buctt (hy non-dtabie Connacht, RQ. State Combouchh & Tnotarce Contactor —y whéle degining a Combureto % we clint me stale Keyword | Ths cabled a Pastante Constousch, > Purpre 4 frakance Comskrnctos 2 4p inttabipe fortante variables —> Wrtktn Snotance Combouctst , oe can Rnthalige Fhtonce g tate Voufabley.| > But % we will tial?se state ib Rain Te eA A EE TANG Ae veinbles within ingfante Gyhuddt hot Skokie Vettables will loose. he Atotte rake, >) Butane towtruck Con conto peoornelins. sty Gratence Constourcks ot clamtged tnfo UY types. I. Depaul tonntowelsh (8) parameter tes domtiucla 2 | 2. Rerometartrd combourctot 3. Copy Cons tauetot Ys Potvels Combouchh - v Fb Constousctss ¢ Bee Se utes Arh A cankowrctr Fy" nok howthg! “ang Parameter: tOhtch Za Cated 9 panometin lewd Combouctot, “OR elev con contain only one. degauitl Comstock. | + —% Poroutk tanotmisctats art two types Le Oren degined “dogauilt Combructat | %s Siskorn ckaginad dagautt Constouscttt- \ Usen” dayined deyautt Goratruster ; , > fea Progreunmer degines a Comotnus cto wich fa nob towing any panameiag 1A Coed os OMA dened degouth Com trurehi len cs Nn) Example Jos Unerdetingd dopant Constaure Fn Tama 1pe.ce Ure Ragta 3 Degauslt Constasectos { Clim Employes 4 fake eno: Shing enarres double eat ; Fotemnal Employes. ) eros A; rome. = For0d + Cfol = 1000), “foternal Votd Dirgloyt ? Conato.waztsUine ("Emplayee 0 in: "“eeno) 5 Conole WOnttiline (Grare, 14 2"--ename) ;: Comole tate line(" Grol ens," 4 erat), 4 . 4 Clam Pregtarn £ Votg Hain ( ) \ A Employee obj = new Empoy
    In Beallme we osfil not we Aegan” Constructo tp iattiol Anntonce Varzablea . y we us| use depautt Combruactst +5 chstane! the conection Noung ancl Soon : B Seam dyed _dayuutt Conta 7 when we Compile the program within a clas t rit Prog vamroen egine ony aston ce. Comotousctt then. Carnet las oitt gponale one dogauslt tomstoucto whith g) cabled a Ayton ahegine.d dojaurtt Contract « Enteanal vold Déoplag CJ Condles0L(" Emp NO &s”beno)i, Cowole wll“ Ename: ing |"+ename) ; Cooke woll® Carol We: esas); y daw ¢ og ra t Void Mata) { Employer emp! = raw Emploifea (33 emp Dinpay Coundles Readlinel) , 4 y 4 . Emp no {a4 © Emnorca ~ > %, Beet Esa ba o Prarpore of dyplin dapined depantt tondaucter: Fo Gutta ege — cegasslt volue, #0 the tnsfance~ variables Specs am > tile depfatng & Comabunckch Tp ve hove declaud “ podarieters kc ip called! 0 pomrornchoncged Conatmuctor PAR clowd can Contant nulttele frametertzed Contracts bub PE Ghowld Aippewnkate, with moe, foramehrs (3) Belorop, tyre o Rrameters 8) order of pomamsleu & nothing but diyg —> bor exomple Signature L2ke batow Clan empoyec tht eno5 Sining erornes double: e408 puiamelantyed Combuchs.” ¥nteana Sa Eno) ap i w 1 enoctno, | 4 : ge internal Employer ( String § ename.. Frame! 4 : Saterrat Emplryee (douse &0!) 1 estat = etal} 4 1 Vepresent 2 mo. of PRamatens , type of PLamctes, ® wha atgnatwre B- Stonatuve OH pepesent Adan. of Rooretens: kat to comtnuctd overloading mathele comiucts — eotth Ar ppesent Comfoucty yy Deptning Ut Apgevernt Aigeoture fo Mingle clam &% callud ay Constoune FA owarloading Puryone of. Porarnetentged Lamakoaicht wy wher we wilt eee co Contacts» = > Te. PtH lize diygoren values y Objet to object wa wth go Fooametertied towknuct\ . 7 Example fox gamamelartyad » Comatrasc teh . HOMADPOLe — Pararmbbentzect Conot much goo : Yow » goromekereoant fat enos oe String erames double eaal ves Entexnah earn fol eno, Ueving ename double eal) ame ealserals hema onts see ral Wid PA?! Sata & Pe RO et non 7 Connles WUE" Gah name 2 Cer ey wo Soplayer Comvle. WL" ath oy: sada Poul) + 4 J Clow Progam yora Main cy Gindloyes emmys = need Employ exCd5#, ame’, 1000); empl Biaplag ( > Conrole. tinct: ind C® object addvew tas" empte, Get HishCode C3) » seis empr =m Empey. 222, “atta ; 2000) ; ear Dino) + : ena ear added to” + empr.Gurttosh code ()) 5 Lowole. @LC), Ennployee no + \L} Employer rama nen Employer talary*, 1000 How to get He addwr ‘of objec - Am, By using — brettashCode), CoM > Get tashCode to 0 packpintd rember imithod gf objec clans ~D The muthod will outuwn the gtver obfect- addres @) whok ts the Super ctam for al snet clames+ Oe — Obsect Clary objeck { i * : Be Gettlash Code) | ; u . x . 4 Clams Employers obfeck e ‘ t oe _ Clan Program + object a £ 5 3. Copy Conntowsct dt og, On construct ue Or COP values” free © one object to Onother object > Example for Copytmnotwotkss. rrormengace — Copy Contour cht Xa Koplyee t Ente ono, String eram 5 double eral : Inreanal Gerployer tok Eno , String Bnarne , dow ele Eas)’ ¢ ‘Leno = Eno-, M copy Gorokauctor Yteanol Endoyer(Gnployee, ob) eno = ob} eno j enor. -obj,ename *, chal = obj.esal + 4 Intornar Void Dinplay () 1 BPaantng volaee 4 Clow) program Noid Hainc) { Ermployee. empl = Na Employee ("11S ®ama", 1000) », Oinpl «Dinplayt ) 5 Employee ernpr = new? temployee Comet’) 5 empl Duplay C)j Comole »2LO", ii y 1 J © then we whl go for Copy cubuact?, fw whanewoy we wont to copy the volues dyom ne object to Another * dbfec= wow MN go for Copy Conatruret ot Us Porivate Constructo ;- ——_ = > while * degintng & Comtanchh iy we Bove used private 1 Actes radifien tha Constructo 2 called Privat tombourc tel YT a con b Dawing Private constourchs.. we canno Cake on objeck Pov toncem claw - > Grampa 407 Prhoke Conrad. 4 Nornespate — PrivedtiCommbru cto t cto Employes Privabi Employer ) t ow 4 Clans Prararn void Mafnc’) t Empoyer, empl = noid Employee) Connole, ead Line C): y a y Note + The above Coote cannot create on object because. toe have an private towkruchh. So it coil! tow om Quntime errot- a ee Gkaotte Constructor 2- a Contac ey we youve used Static Boke Constourct® > hile defining Keyword Which We called 0% —y Matic Cowtnuchh purpose ib to Fottialtge Rtatic Veurtables twahen the rramory will be allocated for State Vartakles :- > when the clom is load?ng memory wil be attecatid for static Varia Blea. : > Memory wit be deallocatasl for static vadatles when qe claw 4 Wloodedl > When the claw te Sending fir Fremory sot be allocated 0% Slate variable thes static Combructt witl exccute > To can 2 Gautng ons. tale Cowbaccttt and one tutance Contaucth » fror tonbrd «Av excel “Afatic Constauctat then will eneeabe makance Comotrurctot becog, clom will food firth fhan object” wil create, Skakte Cowkautks Cannot contol . pasarralne udhich ts -by dlagoule Parameter ted Conrbruct’ . A Com can contain maximum one atalte Consbou ch 1 Ubsle dapintng rahe Conotructy modipten ; With the Atakte Construct We con inteahive only stoic Variotes we cannot tnittaltye faatance Vortoties. becag, Bate Combauct) oil entwutt boop ote creoking tHe eject We Ahould not wre atced \ Grompe Aor Stake Grtnacht Namespace — StatteConatauct t CLO Employee 4 Ror €n0r States Ename } doute bat ; Starte Statag Conmpany Name 5 Store « Employee > companyNama =" Micsqr"> intemal Emplo'yee CINE Enpway String lane , doutl e Emptat); “ Ero emp ; . to name > Empromes (hal = Empsaty 1 penne void Deoplay () a ‘ Connole «ALC Employ ex M0 fait” + Eno Ss Convo lel Employee Vane ios” + Erne); ConolesWLl" mnployer totow ei” + Exal); ty Commles OU" Company name & 1" + Comgany Alone) ; Chery Preyrarr g Void tata () 5 Employer ernpl = Neo Employer (11) “Sohn”, 1000): erngl « Dingtay (5, Pyenl 292-/“auts", 2000): empr.-Dioplay () 5 Conrole. Raadtine C) 5 Employee nebo ttt) Empoyar nome & + Tohn , Employer Satdny Zo, 00d Company name to; Mucor pte Gmpbyee number try Ee player novo ss Dani Employes. Sahony iat 2000 Company mame is + Ricorops x en wenn} Porn able [tompanatane = SBF | Objeck oon __ Object CI Oh LP Pexes toto =} When ween go for aaite viable? <> blnen een & Value ly Common 4A all tho objects Han we Can daclone. pankiulon Vostable as latte vanioble. = hat y the Odvantage 4 ffatic Vartable 1 WE Con Sove the mamoy

Вам также может понравиться