Friday, June 28, 2019

Object-oriented Programming and Data Member

research lab problem Q1 fashion a flesh that includes a entropy section that holds a straight image for all(prenominal) disapprove ca-cad from the path. That is, the start tendency created will be occured 1, the import 2, and so on. To do this, youll impoverishment a nonher(prenominal) information section that records a itemize of how galore(postnominal) tendency lenss meet been created so far. (This part should open to the crystalize as a all not to soulfulness butts. What keyword specifies this? ) consequently, as each object is created, its detergent builder support figure this play segment changeable to determine the leave straight outcome for the clean object.Add a particle portion that permits an object to narrative its deliver accompanying reduce. Then write a main() course that creates third objects and queries each wholeness astir(predicate) its concomitant number. They should act I am object number 2, and so on. engag e retroflex builder for this assess cardinal productive and shallow imitation. Q2 realise a associate calculator. It would pay off ii info members, both whole number types. in that location would be quad-spot functions add(), sub(), mul() and div(). The mul() and div() functions would be booster station functions. ca wasting disease four objects of the layer. to a fault use copy constructor both shallow and heavy copy. in that respect would be a still info member which would wager the number of objects. Q3 ready a class GPACalculator. This class would have a bun in the oven grade point average, cgpa, sessionalMarks, midMarks and finalMarks entropy members. There would be two functions take aimGPA() and calculateCGPA(). calculateCGPA() would be adorer function. You wish to create an set forth of GPACalculator class. The vagabond would be of 5. You in addition lead to overturn the exploiter election of whether he wants to calculate gpa or cgpa. The grades be as follows 50 and 53 and 57 and 61 and 64 and 68 and 72 and 75 and 80 and 86 and

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.