October 4, 2022

LINCOLN UNIVERSITY COLLEGE

EXAMINATION PAPER

FACULTY: COMPUTER SCIENCE AND MULTIMEDIA

COURSE: MASTER OF COMPUTER SCIENCE

YEAR/ SEMESTER:FIRST YEAR/SEMESTER ONE

MODULE TITLE: OBJECT ORIENTED PROGRAMMING

CODE: MCS 111

TIME ALLOWED:3 HOURS

Instruction to candidates

1. This question paper has THREE (3) Sections.

2. Answer ALL questions in Section A, VSAQ

3. Answer 7 questions out of 9 in Section B, SAQ

4. Answer 2 questions out of 3 in Section C, LAQ

5. No scripts or answer sheets are to be taken out of the Examination Hall.

Do not open this question paper until instructed

(Candidates are required to give their answers in their own words as far as practicable)

SECTION A

Very Short Answer Questions Attempt all questions:

[7×2-14]

1. Which classes are used to read and write data to file? Write a simple code to write a word to a file.

2. How can you use the concept of interface to achieve multiple inheritances?

3. Differentiate between Procedural Oriented Programming and Object

Oriented Programming.

4. Why do we need wrapper class? 

5. What is the purpose of keyword new?

6. What are the design patterns available in Java?

 7. State the advantage of Chain of Responsibilities Pattern and when it is used.

SECTION B

 Short Answer Questions

Attempt any seven (7) questions out of nine (9) questions [7×8-56]

1. Demonstrate the three ways to initialize the object.

2. Describe Java Collections Framework and list out some benefits of Collections framework.

3. State about IO stream in Java. Write the input stream and output stream class hierarchy. Explain with suitable program. [2+6]

4. Explain the uses of abstract methods.

5. Define Singleton, factory, abstract factory with suitable example.

6. Discuss the purpose of using Buffered Input Stream and Buffered Output Stream classes. Give example of its use.

7. Explain OOP with its four pillars.

8. Write a simple Java program that reads data from one file and writes the data to another file.

9. Show the difference between Polymorphism and Inheritance in Java.

SECTION C

Long Answer Questions

Attempt any two (2) questions out of three (3)questions [2×15=30] 

1. Provide a brief description on exception handling. Discuss the use of each keyword (try, catch, throw, throws and finally) with suitable Java program. [3+12]

2. Explain encapsulation. Demonstrate the use of the getter and setter methods. [5+10]

3. Draw an inheritance hierarchy for students at a university. Student as the superclass of the hierarchy, then extend Student with classes Under-graduate Student and Graduate Student. Continue to extend the hierarchy as deep (i.e., as many lev-els) as possible. Demonstrate this with example. [7+8]

****BEST OF LUCK****

Facebook Comments