OOP II Final Exam Question
OOP II Final Exam Question
1. Himel automobile is a new recondition auto mobile shop located in Motijheel, Dhaka, offering [15]
a wide range of car and related accessories. Himel, the shop’s owner, has been conducting his
daily business mostly on paper. He has a total of nine branches in different locations of Dhaka.
He records sales on preprinted forms, which contains the invoice number and date of the sale,
the customer and the employee involved in the sale and the product being sold. Employee and
customer information is maintained on sheets of paper. For each employee, this includes
his/her NID number, first and last name, and home phone number. For each customer, HImel
records the first, middle (if any) and last name, as well as at least one phone number and home
address (consisting of street number and postcode). To keep track of the product inventory,
Himel uses a spreadsheet program to record the number, name, price and quantity of the
products in stock. For each product, a range of services is offered. The spreadsheet program
is also used to list the type (e.g., repair, exchange) and charge for each service. Multiple types
of service may be offered to one product (e.g., repair and exchange for cars) and a service
may be offered to multiple products (e.g., repair for cars and accessories) at different prices.
Recently, he has planned to start a promotional event for increasing his sales which was
affected due to Coronavirus.
Himel spends a lot of time maintaining this information. Recently, he has decided to manage
all this data by using a system. Now help him by implementing a system with the help of
Object Oriented Programming concept in Python.
2. Problem solving using Python:
You are to develop a ‘Railway online ticket booking’ system. And you have to implement
scenario of tickets booking from Dhaka to Rajshahi for 1 day, considering the following
situation.
• Everyday 2 trains travels Dhaka to Rajshahi route (‘BANALATA’ and ‘PADMA’)
• There are 4 coach in each train, that is: A, B, C and D
• There are total of 100 tickets available in 1 train. Means 25 tickets for each coach.
• From where only 35% tickets are available for online booking/purchasing.
• No one can buy more than 4 tickets.
• The system is only active during 8am to 11pm. That means, a booking request only be
placed during the active time.
• IF any booking request are placed, when the system is not active or no tickets are
available, then you have to deny the user request with proper message.
• When a ticket booking/purchasing request are fulfilled, you need to display passengers
ticket numbers with the following information:
Train: BANALATA
Coach: A
Seat Range: 1,2,3
Phone No.: 01700-000000
i. Now your task is to implement the whole concept by using Python. [12]
ii. From the above situation consider that all the tickets booking/purchasing information’s [3]
are saved in the main server of the system as well as in the local server. Now if any
passengers want to cancel their booked tickets from the local server, then the canceling
of the tickets need to be reflect the main server also.
As a developer of the system, which concepts of python you want to use here to ensure
the integrity of all the servers? Try to justify your opinion with some proper example.
3. "Python is an interpreted language which makes it faster than other programming languages." [2]
Do you agree? Justify your choice.
4. "__init__ function is called while creating an object" Do you agree? Justify your choice with [2]
example.
5. While creating class, we use the self-keyword. But can we create a class without self- [2]
keyword? If can, then how? Explain with an example.
6. NumPy array has lot of advantages over list. If you agreed, then try to justify this with [4]
one coding example from each.
Thank You!