0% found this document useful (0 votes)
4 views2 pages

Object Oriented Programming - Spring 25 - Mid

The document outlines a midterm examination for a course on Object Oriented Programming at Daffodil International University, detailing the structure and requirements for answering questions related to key concepts such as Encapsulation, Inheritance, and Polymorphism. It includes tasks for implementing Java classes based on provided UML diagrams, as well as designing a Library Management System and an Online Shopping Platform. The exam is structured to assess students' understanding of class relationships and their ability to apply programming concepts in practical scenarios.

Uploaded by

hafij2305101119
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Object Oriented Programming - Spring 25 - Mid

The document outlines a midterm examination for a course on Object Oriented Programming at Daffodil International University, detailing the structure and requirements for answering questions related to key concepts such as Encapsulation, Inheritance, and Polymorphism. It includes tasks for implementing Java classes based on provided UML diagrams, as well as designing a Library Management System and an Online Shopping Platform. The exam is structured to assess students' understanding of class relationships and their ability to apply programming concepts in practical scenarios.

Uploaded by

hafij2305101119
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

For more questions: https://diuqbank.

com | Uploader: SUPAN ROY

DaffodilInternational University
Faculty of Science & Information Technology
Departmentof Computer Science and Engineering
Midternm Examination, Spring 2025
Course Code: CSE22 1,Course Title: Object Oriented Programming
Level:2 Term:2 Batch: ALL
Time: 1.5 Hours Marks: 25

Answer ALL Questions


[The figures in the right marginindicate the full marks and corresponding
course outcomes. Al portions of each question must be answered sequentially.]
1. a) Explain how the concepts of Encapsulation, Inheritance, and 3 CO1
Polymorplhism contribute to solving real-world problems.
Provide one real-world example for each concept
demonstrating its application and benefit.
b) Consider the following UML Class Diagram representing a 7 C02
"University System" where:
Department Professor

deptid: int id: int


1.* has m 1..*
+Department(int) +Professor(int)
+display( ): void +display( ): void

1..*

Course Teach
-code: int
-credit: double
1 *
+Course(int, double)
+display( 0: void

A Department has multiple Professors.


Each Professor teaches multiple Courses.
Each Course has a Course Code and Credit Hours.

Task:

Implement the above scenario in Java by:


Defining classes Department, Professor, and Course.
Establishing appropriate association relationships between
the classes.

Implementing methods to:


Add a professor to a department.
Assign courses to aprofessor.
Display department details, including professors
and their assigned courses.
Page I of 2
For more questions: https://diuqbank.com | Uploader: SUPAN ROY

N.B. Java collection class may be used as needed or simple association]

(Pull correct implementation: 7marks, Partial correctness: 4-5 marks, Minor


issues: 2-3 marks)

2.. a) Differentiate between a class and an obËcct in Java. Provide suitable 2 CO1
Java code snippets to illustrate your answer.
8 CO2
b) Design a Library Management System where:
The Library contains multiple Books.
Each Book is associated with one Author.
The Library manages memberships for Members, who can borrow
multiple books.

Task:

Draw a UML Class Diagram covering the association relationships


between the classes Library, Book, Author, and Member.
Include attributes such as bookTitle, ISBN,authorName, and
memberlD. [assume appropriate data type]
Indicate multiplicities for associations. [e.g. 1to many orl to l etc]

(Full correct implementation: 8marks, Partial correctness: 5-6 marks, Minor


issues: 3-4 marks)

3. Problem Solving (Analysis & Synthesis Level) 5 CO2


Problem Scenario:
You are tasked with designing a system for an Online Shopping Platform.
The platforin includes:

A Customer who can place multiple Orders.


Each Order contains multiple Products.
Each Product has a productID, productName, and price.
The Customer has details such as CustomerID, name, and address.

Task:

Analyze the problem specification.


Design a UML Class Diagram to represent the systenm, ensuring
correct association relationships between classes.
Explain the multiplicity in associations and how the Encapsulation
principle can be applied in this context.

Good Luck

You might also like