You are on page 1of 7
) Varendra eotace University Dept. of Computer Science & Engineering _ Assignment CSE-133 (Object Oriented Programming) | Submitted By : | Submitted To : | Mahmudul Hasan | A.S.M Delwar Hossain ID : 192311047 | Lecturer, 3rd Semester | Department Of CSE, | Section - A | Varendra University . | | Department Of CSE, | Varendra University . Submitted Date : 05-06-2020 7) Bvestion-4 How can you vndeastond the operator is HNoey" OM "Bimoney" 2 Anewent: (renevally openalon is osymbbol on special euoraealer tolueh is used fo pevfoom a speeihe task. the openatrmr Which Openale on single &penomd 4rose ome Unany operators, Some of vnomy operators one * | Cnewement Opewaten) aS (peenement Openater) & (Madness Of Opewator) . (unary minvs Operators) ~ Cown Complement) \ (Logieal wot) “These operators lich operate on Awo Speronds known aS Rinomy Operators , gomeot—tne ond we dan undtwsiand when id takes too Operands. ey 4ome et the vmony operators ome! + Binary Plus Operaten - Binowy Minus Operaton == Equal te epepatsr 2 Les tren operator. @ Restion-2 Write a C++ Program having a elss named Resuh ond tence svenloaded fonctions named show~ pesuld Unt a, nt & inde), show-nesult Gita, mt b, dovvle @) ond show pesulttind aL). In these overloaded | finclions 45+ Pmetion aalavlotes he overage et ines ‘numvens and rnd -fnehon finds the prodvet oftmmee numbers and 3nd Dmeton find the summation of Ine onray elements omd Finally display tne ovtovt, Answen; tT ginelude ciostneam using nomespare stay alass Resol{ Porte! vid Show-re sult Cit a, ini b, ind “4 devble avewoge =la+n+e)/35 Ql 22" Average aco, ewage geend ts void show. vesuttlint a, dovvie produet= at b¥e 5 Goot ce Prodvad 1 “LPmoevet ceend 45 ‘mt b, dovvle of 3 Void Show.nesult (nt oD) ‘wt nesult = 04 wet 1s for (iso 51235 wand eswlt = pesvld+ OL 5 t Govt Le'summahion:"2c ness} Le endl : c ant main) 2 Resvld wesold : wesult, show_nesvlt (40,20,30) 5 nesult, Show. wesvlt (40,20, 30.5) 5 im ome aN a0,.20,30h5 pesult Shore vesult(ann) 5 Return 07% 3 Outpet :~ Average: 20 Produet | 6100 Suvmmahven', 60 © Bvestion Bt Wnile a 44 Progwarn to add +120 Qomplex numben vsing operator bvevloading . ceo finswen [- . . trinelvde < ostream vsing namespace std 5 Glass add— ComplexA ‘mt 0,03 Povlie: add-tomplexCint i, mt Jd anls = 5 % VOId SHO pA 4 got 2eacdsi"devy 3 a8d-Gomplex openaton +(add_eompler Ay add—complex termp 5 FEM. O = oerete| At ALO 4 temp = b+ ALY petomn Gemp) 4 Yet anain 0) 4 ovtpet | a addcomplex Aal 0,20)1 Ar(g,40) > As 4 eovtec First Compler pe 64. Show) 5 anol LE"Seeend\n Setond Complex t"s Ay. new) > Az= Ar +A Govt GEN\H um of Complent" Ay. 500) 5 metven 05 “Elnsl Complex. 46+ 120 Seannd Complen, H+ io Sum ot eomplens 29+ 130

You might also like