Daffodil International University
Department of Computer Science and Engineering
Faculty of Science & Information Technology
Midterm Exam Examination, Summer 2021 @ DIU Blended Learning Center Course Code: CSE233 (Day), Course Title: Object-Oriented Programming II
Level: 2; Term: 2; Section: All Instructor: ALL; Modality: Open Book Exam
Date: Sunday 14 November, 2021; Time: 09:00am-11:30am
Two and half hours (2:30) to support online open/case study based assessment Marks: 25
Directions:
● Students need to go through the CASE STUDY shown in this exam paper.
● Analyze and answer specific sections based on your own thinking and work.
● Do not share as this will be treated as plagiarism by Blended Learning Center.
# Questions(Answer All) Marks
1(a) As you can see the following is a python code. Read the code line by line carefully.
Your first task is to find out if there are any errors in the following code? If yes then correct it, and then write down the problem statement of this code with the output.
[4]
1(b) Section C, D, E and G from 55 batch of CSE dept. are planning to play a cricket match. Section C and E make a plan that they will play as a team and section D and G will make a team together. They have decided that they will make their team with list using python. So create four list containing at least five members at first through mentioning section name and then join two lists as a team mentioned above. After making the team, they have decided that they’ll remove the last player from the team and add another player in a specific index number (Index number must be the last digit of your student ID). Now show these two teams after modifying. Please justify
[4]
your code line by line.
2 (a) Suppose, you are a programmer and you have list of string as following:
Name = Khan, District = Dhaka ID = 201-15-0000, University = DIU,
Construct a list using your Own Name, Own District, Own ID, and Own University.
Write a program to count the number of characters and count vowels from the list of strings you construct.
Sample Input Sample Output
[Khan, Dhaka, 201-15-0000, DIU] Number of Character: 23 Number of Vowel: 4
** Please justify your answer line by line.
[4]
2 (b) Write a Python program which prints the integers from 1 to 50. However, Numbers between 1 and 50 that will be divisible by 3 will print "bang" in those places and which divisible by 5 will print "YooHoo". And numbers which will be divisible by both 3 and 5 will print "BangYooHoo". Please justify your answer line by line.
[3]
2 (c) Suppose you are working in a well-known IT company as a software developer. Since educational institutions are opening and students are coming back to their hall after a long vacation. Your company got a project to develop a ‘Hall Management System’
for a university. You are working with a team on this project, and your task is to develop a Seat distribution and maintenance system
For additional information, every room has four seats but room no 503 has two seats.
You need to define seat no as 503A, 503B, etc. Currently, the available rooms are:
Available_room = {501, 502, 503, 504}
System Requirements:
● The user will assign the seat number according to the student ID and before assigning the seat, the user should check whether this room is available or not.
● The user can change the seat of the students if and only if the seats are available.
● The user can cancel the seat of the students who passed out and make them
[10]
available to others.
● For any emergency purpose, the user will be able to find the student in a particular seat
NB: User means authentic user such as admin.
Now from above situation:
● Develop necessary python code to fulfil all your assigned tasks (by maintaining predefined information and all the requirements).
● Express your understanding of the code.