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

Java Assignment MD Kamil

Uploaded by

Kamil Kd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
183 views

Java Assignment MD Kamil

Uploaded by

Kamil Kd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 13
Ga Ons Class eglue ¢ Privake sink Length 5 0 Private int brepdth} ube Void eidim ¢ i, ind). Lengin 2 tread th 4 Public dint qetAcenc) ; Return tength® oveadth 5 } Public cleat First f° , Public etatic void main Catingl I avy’) thyous LOE eacephion £ Bo fered Reader Input Qupene dReader gyster- 191) 5 Gysrem . oul prirt (" Enter int breeons Len = inteyet gan sel | oyster out. pe psecdth = wssentnt Cing anew int pv ‘nrener > Po oe oe opi 7 new ONE Va obj -2e! Pin (ier bserd!?’ > cep .put+ ogee fo + get aven Os (Hew mput Sream Recids length o veenrgle 24 sect the bye 4. yendlin votinc’ nee OF I S32 cae Ce ——————————— | Qn Pray Cleats ahuten! f . 8bing name } int BOM. no ; > Clos PUBMC Bteue void main Cshingca aw BE Shelent $5 new shudeod C); 8. name =" gobn" 5 9 8. volkno = Vy : / P System . Out. priniln(' name ud - - : te ano) 5 t “Gnd yoll number Gs Hs -vollen 4 Wa Q AMS Class shodent ¢ in sOllAwMbEN 5 int Phone Ajumben 5 Shing Addyers 5 y Public ctosy Cwente Class £ Public grate Void main C grringdl angs) £ Saudent gam s new shdert 0} Shudent Johns new student C5 Sturm. Qoll Number = 205 Sum, Phone Aumber = l23Us6ARyo $ Sam. addyery =U Americal!" : Jobn - Qm\t nomber = 04 ; dohn - Phone Nombers ya6SuISLY y Jon. Radwed = Lomdont! j System. Out. Print in ( gam. Roll Nunbey +! EL sama. Phone numben + |" t Sum, Aadyeus ) 5 ji Way System -Out. Print dy (John: Rolt number # ; bey #1 " F John Addrey ); + fohn. phone number 4 } import Jouve Whl* ; Inport Towns tang .* 5 import Javu.lu.* 5 Clos om Cyprvent £ Pudiic eetic Yoid main ( string args LI) Throws — Exeepion { dovble aug Boefeved-Reader urs Mew Bot fered Qecder Crew InPut Sheam@erer Cyster-!)) 5 System: Out. Printin (" enter Fhe value ob ol) int as integer. paxselnt Cov. sead tine O) 2 : sgstem -ouF Print in Center the voluecb 6°} Into = integer « povselnt ( grr. veadting O); Qgstem -ovF . printin ("Enter fhe valueot¢") 5 Inte = Integer “Pargblat CGT: veud Une Ys aug = Catote)/3 5 tem. Dut. Printin us "+ avg )5 U'the averageot mee number % 4 Outprt: — ntey the value ob ae 4 -H- ——tt- — fia be § Spey fe ae —Ca6 “The average ob three Number [s S$ HF _ Qs Ons5 | S Import Jayu.to.* 5 Pubic tars Emplayee & Priuuke ateing name > Private int yeendtyoing Privake aint aalory 3 Privake atriny Odavess j Pubte Employee ( String name, Seley string added JE ‘This name = Name; This - yet OF doi ning = Yeur ob Joining j This. Salary = salary 3 This addres = uddvess , int een dF. ngoirg 2 "OF Public etring getname Of Wt Name y 5 Bublic int Gretyeay AP yJoiniy O) € TEVTN yeunOFydinign 5 yee Steiny gerade Cf Ferry Cididwess 5 4 public int get Salovy Oe return Sodusy 9 4 public stake Void Joe xcept main C stringed ang 4) trvouss Hulfexed Reader inpul = New ‘buber @d Reudes (new input System Readea C system do) )5 Re a a TR ° >4Bdte . - M-odok Minttn (Enteat Ne employees :") ; : Int “NumEmployees or e Ger. Puxsint Cinput weed line OY; e 4, Mplayee oO employee = new Empleo, 7 Yee Cnum employe d]ae—ree ne Cint i's 0; Tenume J um Empl Pe oa Y8kem Oot.Dsintin (6 nd er RE. itt) Buster, oot ort Empleyee "4 Cit) #2") Sti + 0OF.PXt ot C'evume:") J Syncs > input weadtine ) 5 STEM Ok: Delo oC'yeas ob aoining:") 3 inte yceut a sotnin = Dnieger . Pur selnt Cinput seudlinec)) j gystern . Ouf . print CM eters") 5 Mt salowy = inkegen. paxselrt Cinnut eecdLine?s Syshern toute prion C "panes t””) 5 String addsey = input + TCAdtine C5 employees C13 ~ new Empoyes (names Salary? addsey) 5 yen Joining » ur poloHla C uipvame\ Yeursou JOling \ tsclury \eleextdha/') system 0 yi < bom Employcess Mtg oy Cin! if 05 ut» priotin C empleyee TI.gek Mame Or Joining Ot eet eye \elel dF ern “Vent employ eccizget yer ob employee [d+ get solawy Omploye cid -yet addves OD4 4 j 4 ee ee ‘on | = f\ Ob Gns = Impost Jove 10.45 Pob\e cleus taxcolevlator ¢ Private uns Psivabe string Biume 5 Psivuke double saxobletnome 5 Private deuble tax 3 OUbLIC oid inputdtda CO) the RolheedReater (IEW In put Sreeam Reade 6 System: Out psinten€ way 7 OCxCEPHOD £ syslers.in D3 enter PAN yy pun = integes: casselnt C ven der.seadine 0 9 A System. out orint C" entes Facuble Income * Fuxablememe = Dovble. powse Hovb leC Beeres. vecidine Oy Poblic old Compulenata OL TP Croubleincome < = 60000) C Tax 70 y | % else IF C tarbleincame gt £ 130.000 ) suk 7 C Tawabe income ~ 60000) * 0055 % elie (6 Crurableincom <= 500000 J v EC Taxol Income ($0000 ) ¥ 0.15 Tar = so 4 eset | = ; tux = 49500 ‘FC tareble tncome- 500000 yoies Bublic - A . DUE “void disalay tube OF wn oe enotiae Nume "t+ name) 4 hee -ovk.poinths C" pant" + Pan) § ystem “ok Printin Z rareble fatome ; 1 - t Tarubleincome ) * 4 9, System -oup. printin( trax" + tx J; Pub tie i i Stake “Vald main 1 Si in Coming £ Torys) WS Poexecphon TAX Calcelatow Taxpayer > Dee tercaleutertor C) 5 Taxpayer sinput Data Oj Tuxpayes. compute Data 0) 5 Tepayer. alspleyy Date C d5 Q+ ans. imoorvt Jou lo*s Puriic Clow remprcodore cole ¢ Stoic vod envi (atriye? Pobli Tr0ws poexecPvOr) utercdvers” ccecder = NCW id futoered’ Reade (yew ienou! Ste syster 9] 5 ————_—_—— = ™e< choice 5 dog System -Huroviln ("I convever}’ Fal xenvet to celsius ") 5 stem Out pwittn"2 convert celsius +0 ay Cahgenheit "5 Eytlem oot. EvIMLAC" 3. exe") 5 System Out pstatin’ Enters yor! choire’")} Chowee = Integer. poxselnt (se guoiteh Cenoice€ aders BEANE o)5 omprcare 70 Core 12% c ayptersout erintl Eniee Cahrenhtet aN clovble Latrsenbé ; Opole. PArve fb ple ve peceor sll oi sf: afouole celsius = (Farrer uy ¢elsivs * . gystere- Out Println Ceamrenne't 4 + cleyvee celslus- LP) bceuls 5 Cone 2 ae Bysier Out point (" ‘nity Horpsectuse FO COMsIUs "yi ¥g/5) t 329 double celsius 2° Ccelsivs2 ee ww \ U eyes Byskm.Hul psintin (celsius dt dege ; a) Celstupe a's t fanbenhel t2 # ‘ ww ° legsae * Ruberennelt. "'); bvenk 5 ea. | > ogi Sys em.0uk. print Lo Clenr bing Preegt 1", i yoal"); Sem. DUE. “Pxintin C" thank Y Cos dy break ) Aefavl 4s System: ouk.print in C" tmeuid Choice! Olen “try auyetin « UK 3 System Out Print n yy» j While (Choitete 4) 3 y 7 — dg Cus. 4, poo? Jauel -io. *; Pobtic “cleus Libsany £ Orvivate tn aee-num) Priveure string tHe y Private Rkring Autrey 3 rou LOCKE? von L Pubic vord input OW Bu) 2 Ne . rere Reuder by + Me) raprcemnccder (See!) Ns; Burrered secrlos (nee 4NPU: oO System- out ov!or Cr enter “heessior number") 5 Qutenuins integer. parsint Cov werdling 0O)5 ayglem.oor- ERO ("enies gine: "DS tle +b. veudline OF a Syste ot. ovint Et enies aothots 7 shen OF Rumor = bay. weadline OY 4 puvric void Comoute Clint legs tole JF dnt * fine *% * days babe 9 a . Sysiem OOF psint ‘Cine chasged * Qs," t Ane); 4 public Vol clryeley OF Systern OU prin) ln(); System: OF peintin C" Books nfo Ys \ oe t len bette dystem pub println ( achen? ote! & quires ) 5 bo Public steic Ooid mato Cstriqge? anys ) Tmows Toexcephon £ Libyary ool = NI Cibsarey C) 5 book.input () ol. dh play OU; Poffoned Reurtim Sx = Ne w BokRened—render input strcumpend (2ystern-iNds &ystomoot. psintte O} Syslemoob sink C" Enis ‘umber Obclys tate: ")5 Int deys tote ~ Inkegen. Pav cel? Cov. veel Line OF boo 4. dompure Coles tee) 5 3 y @.3 ans: Pmpov! Joueio -* j Pubic Slows fncometur & Public “stuhi¢ Vord matin Cirevyl Tung: ) Thrdus poExcepronr § Gotforwed Reader = Neuw C iqnut Stveum. render Ceysrer ind) int age = elnt Cov. reeling Ud; Systenoot-print C nantes gerder C mye) ° inrege® Pats Dy , ———— —— Cheus gender = by. weodtined) « chawAt Co) 3 Sys: out. pxink(" enies faxable Income :" Jy Avoble taxable frome = double -parseheuble € 6: seuc lire O) 5 Sqprem-oot point ("Onlay the hel t)} 1 Cope > 6S 11 gendes= ='PUE Sys termourpriniin("arrong category) ; 3 else f : : double Tux = O45 Ie ‘Ctaxableintome <= (60000 DY Tow = Oy 3 else JP Ctaxubldnome <= 80 0000)8 Tax = ( Tercbleincome ~ Soccas) * 0.2 94000 5 4 Else $ tue 7 Ctaxableintome - 800000) * 03 fI¥e04 Syste OF OAT CY intome Fax “Naywd!e Ry. F low yy 4 3

You might also like