CS-16 Object Oriented System June -2003
Question Paper of CS-16 Object Oriented System June -2003
Qusl(a) Define the follofing terms with examples:
a. Class
b. Inheritance
c. Polymorphism
d. Overloading
Qusl(b) Imagine a toll booth at a bridge. Cars passing by the booth are expected to pay a toll of five rupees. Mostly they do but sometimes a can goes by without paying. The toll both keeps track of the total number of cars that have gone by and the total amount of money collected.
Model this tollbooth with a class called TOLLBOOTH. The two data items are of a type unsigned into to hold the total number of cars, and of a type double to hold the total amount of money collected. A constructor initializes both these to zero. A member function called PAYINGC AT () increments the car total and adds 5 to the cash total. Another function, called NO_PAY_CAR() increments the car total but ads nothing to the cash total. Finally a member function called DISPLAY ( ) displays the two totals.
Qus l© Design a template class for sorting a list of elements.

