CS3003-2022
CS3003-2022
Q.2(a.) Describe the four major elements of the Object Model with the help of example.
(b.) What do you understand by Typing and Concurrency in the context of object
modeling. Also describe different types of typing observed in object modeling.
[2+2=4 Marks]
Q.3(a.) What is the difference between method overloading and method overriding?
How can we distinguish between two overloaded methods and two overridden methods?
(b) What do you understand by Abstract class. Write a C++/Java program using pure
virtual function/interfaces for implementing Number System of different bases that will
be printed in the output.
[2+2=4 Marks]
Q.4 Explain the different types of inheritance with suitable diagram. Suppose you are
asked to build a web application which has four components: System, FrontEnd,
MiddleEnd, and BackEnd. Application derives the FrontEnd, MiddleEnd, and
BackEnd classes while System is derived from FrontEnd, MiddleEnd, and BackEnd
using multiple inheritance. You can assume at least one data member and one method
in every class. Write a program in C++/Java to implement this inheritance relationship.
[4 Marks]
Page 1 of 2
Q.5 Describe the different types of overloading used in object-oriented programming.
Write a program in C++/Java to implement the following using constructor
overloading: Students from a certain class are to create an account and provide
information such as Name, Contact No., and Address (consider only string). Such an
account for each student is associated with an object of a student class that can store the
aforementioned attributes. In this context, we confirm that account creation for any
student is successful if the associated object is initialized at least one of the
aforementioned information such as Name, Contact No, and Address using constructor.
Additionally, blank submission is not accepted during the account creation. The
associated object can modify that information (Name, Contact No., Address) using
getData(..) method using method overriding when the account would have been created
for any student. However, this method can override at least one of the information or all
the information.
[4 Marks]
Q.6 (a.) What is exception handling? What are the different types of exception used in
programming? Write a C++/Java program to implement multiple catch statements by
throwing an exception from a function. Also use one default catch statement when it
does not match with any exception.
[2+2=4 Marks]
Page 2 of 2