18CSC202J-QP
18CSC202J-QP
26. a. Design a class for an EB bill consist of unit consumed, consumer name as 10 2 1 1
data members, read and bill calculation are the member function. The
following are the changes of unit consumed
(i) For first 100 units: 40 P/unit
(ii) Next 200 units: 50 P/unit
(iii) Beyond 300 units: 60 P/unit
Write a C++ programming for the implementation of above scenario.
(OR)
b.i. Distinguish between aggregation and composition. 4 3 1 3
27. a. Explain the binary operator overloading and implement the same for 10 2 2 1
(OR)
b. Explain different types of inheritance with suitable diagram and make a 10 2 2 4
class named fruit with a data member to calculate the number of fruits in a
basket. Create two more class called Orange and Mangoes to calculate the
number of Orange and Mangoes in a basket and print the same.
(OR)
b. Draw and explain state chart and activity diagram for E-store checkout. 10 6 3 1
Page 1 of 2 07DF3/18AIC203J/18CSC202J
29. a. Write a C++ program for user defined exception that checks the internal 10 2 4 4
and external marks, if the internal is greater than 30 and if external marks
is greater than 70. It raises the exception “MARKS EXCEEDED”. Create
the above exception and test the exceptions.
(OR)
b. Explain the class and function template with suitable program. 10 1 4 2
*****
Page 2 of 2 07DF3/18AIC203J/18CSC202J