Object Oriented Concepts
ITM · Midterm · Summer 25
shared by MD. SOUROV HASAN
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 Information Technology & Management
Mid-term Examination, Summer 2025
Course Code: ITM213; Course Title: Object Oriented Concepts
Sections & Teachers: MA
Time: 1: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) Define class and object with an example. Suppose you are given a scenario of a super shop management system. Your task is to figure out 2 classes for your system with necessary components (attributes and methods). | [Marks-5] | CO-2 Level-2
1. b) What is inheritance? Identify two different scenarios where you should use default constructor and parameterized constructor? | [Marks-5] | CO-2 Level-3
2. a) Implement the given scenario in python: Suppose you are given a string of length 10. Now you want to create two strings from the given string, string1 will contain the characters of 1-3 positions of the given string, string2 will contain the characters of 4-7 positions. Finally concatenate string 1 and string 2 and output the resulting string. | [Marks-5] | CO-1 Level-3
2. b) You are given a list of words and a given keyword. Your task is to implement a python solution to determine whether the keyword is present in the list or not. If present, append a new word "Yes" at the last position of the list, if the keyword is not present in the list, calculate the size of the list and check whether the size is greater than 5 or not. If greater than 5: print "Large list", else print "Small list". | [Marks-5] | CO-1 Level-3
The object-oriented structure consists of a base class named Employee, which encapsulates four key attributes: name, emp_id, salary, and working_hours. The class also provides two essential methods: calculate_bonus(percentage): which takes a numeric input representing the bonus percentage and returns the calculated bonus based on the employee's salary, and update_working_hours(additional_hours): which updates the total working hours by adding the provided numeric value. Building upon this structure, a derived class named Manager is created using single inheritance. The Manager class inherits all the attributes and methods of the Employee class. Additionally, the Manager class introduces a new attribute, department, which specifies the area or team the manager is responsible for overseeing.
3. a) Now construct a python solution to implement the above scenario. Use inheritance and constructor where needed. | [Marks-5] | CO-3 Level-3