Skip to content

Object Oriented Programming

CSE · Midterm · Summer 26

Batch 68

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Faculty of Science & Information Technology Department of Computer Science & Engineering Midterm Examination, Summer 2026 Course Code: CSE221, Course Title: Object Oriented Programming Level: 2 Term: 1 Batch: 68 Time: 01:30 Hrs Marks: 25 Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.] 1. a) Differentiate between a class and an object with suitable example. | 2.5 | CO1 1. b) Summarize four pillars of Object-Oriented Programming (Encapsulation, Inheritance, Polymorphism, and Abstraction) with real-world examples for each. | 2.5 | CO1 2. A hospital wants to store information about its employees. Every employee has an employeeId and a name. A Doctor additionally has a specialization and designation. The hospital also has a payment system for bills. Patients can pay using: CreditCard -> "Processing Credit Card Payment" MobileBanking -> "Processing Mobile Banking Payment" Cash -> "Processing Cash Payment" The hospital maintains a BankAccount to manage funds. | CO2 2. a) Implement payBill() and refund() methods in relation to patients and the hospital's BankAccount. Create object(s) with java program to pay bill 5000, refund 2000, and print the final balance. | 3 | CO2 2. b) Write a Java program using the hospital scenario above. Create a superclass Employee and two subclasses Doctor and DoctorAssistant where both inherit from Employee. DoctorAssistant additionally has a department attribute. Apply encapsulation for all attributes, use constructor to initialize them, and override displayInfo() method in both subclasses to demonstrate polymorphism. Create objects of both subclasses and display their information. | 7 | CO2 3. A Library Management System maintains records of books and members. A Book is a type of Item. Each Item has an itemId and title. Each Book additionally has an author. A Member has a memberId and name and can borrow multiple books. A Library has a libraryName, maintains a list of books, and has addBook() and issueBook() methods. | CO3 3. a) Suppose that you are working as a UML Class Diagram analyst, illustrate all classes, attributes, methods for the required system. | 10 | CO3