You are on page 1of 2

Course: Core Skills Module: Problem Solving Topic: Object Oriented Contexts Associate Supporting Materials Lab -1:

For the problem statements given below, identify objects and responsibilities. Lab -2: Develop the classes corresponding to the objects identified in Lab 1 Practice Set 1. Silver Blooms is a hostel in Scholars Hub University campus. Under graduate students of
university is given accommodation in this hostel. Each room in hostel can accommodate 3 students. When a student joins the hostel a room is allotted to the student. Students preference is looked into while allotting a room. If the preferred room is not available, then the hostel allots any available room. The monthly rent is calculated on the basis of total expenses incurred in a month. The total expense is divided by the number of inmates to find the share of rent each person should pay. In addition to this an inmate has to pay mess fee also for the number of days food was availed from the mess. Since the number of inmates is increasing, Silver Blooms is finding it difficult to manage various activities. Write a program to manage: a. Room allocation b. Room de-allocation c. Calculation of monthly rent 2. Keep Talking is a leading mobile communication service provider in the country. They offer post-paid mobile connection services across cities. There are various tariff plans they offer to customers. Customers calls are charged based on the plan they have opted for. Write a program to: a. Calculate bill of a customer b. Find number of customer who have opted for a particular tariff plan c. Find the connection with the highest bill 3. All Smarts university has a library with extensive collection of books. A student can rent up to 5 books at a time. Write a program to manage: a. Issuing books b. Returning books c. Searching for book using title 4. Monopoly bank offers various fixed deposit schemes. Customers of the bank can choose to deposit money under various schemes. For every scheme there is a minimum amount of money that should be deposited. An interest is paid for the deposit amount as mentioned in the scheme under which deposit is made. Every scheme states a time period for which the money is deposited. A penalty amount as specified by the scheme needs to be paid if the money needs to be withdrawn before the mentioned period. In this case interest will be paid only for the time period for which money was deposited. Write a program to: a. Add a new scheme b. Add a new customer c. Open a deposit for a customer d. Calculate amount payable for a deposit, at the end of deposit period e. Calculate amount payable for a deposit, if the money is withdrawn before specified period 5. Care Well Hospital is a leading super specialty hospital in the city. They have various departments such as ENT, Cardiology etc. In every department doctors are available for OP consultation. Patients need to take appointment for consulting any doctor. First time a patient visits the hospital patient details will be recorded and an OP ID will be provided. For taking an appointment patient needs to provide OP ID to the clerk. Write a program to

a. Register new patient details b. Book an appointment for a specific doctor c. Book an appointment for any available doctor in a department 6. Sell Now manages an online advertisement site, where users can advertise about various products they want to sell. Users can post advertisements to sell various products. Users need to provide the category of the product (e.g Electronics, Books, Textiles, and Vehicle etc), brand of the product (e.g Nokia, Reebok, etc.). User can anytime remover the advertisement. Write a program to a. Register a user b. Post an advertisement c. Remove an advertisement.

References: Books: 1. Head First Java, Second Edition 2. Applying UML and Patterns, Craig Larman Links 1. http://download.oracle.com/javase/tutorial/java/concepts/ 2. http://www.ipipan.gda.pl/~marek/objects/TOA/oobasics/oobasics.h tml 3. http://articles.sitepoint.com/article/oriented-concepts-java-1 4. http://www.codeproject.com/KB/architecture/OOP_Concepts_and_ manymore.aspx#Generalization

You might also like