How To Exam?

a knowledge trading engine...


Birla Institute of Technology (BIT Mesra) 2007 OBJECT ORIENTED PROGRAMMING - Question Paper

Saturday, 19 January 2013 12:25Web

Birla Institute of Technology & Science, Pilani

Distance Learning Programmes Division

Second Semester 2006-2007

Mid-Semester Test (EC-1 Regular)



Course No. : BITS ZC411

Course Title : OBJECT ORIENTED PROGRAMMING

No. of Pages = 1

No. of ques. = three
Nature of examination : Closed Book

Weightage : 40%

Duration : two Hours

Date of examination : 03/02/2007 (FN)

Note:

1. Please follow all the Instructions to Candidates provided on the cover page of the ans book.

2. All parts of a ques. should be answered consecutively. every ans should begin from a fresh page.

3. Mobile phones and computers of any type should not be brought inside the exam hall.

4. Use of any unfair means will outcome in severe disciplinary action.



Q.1. We need to calculate the Course Grade for a learner in a course. For the course, there will be 3 tests (20 marks each) and 1 Final test (40 marks). There can be only 2 grades possible (i.e. A and B). For an Undergraduate student, average+20 is ‘A’ grade (else ‘B’) and for a Graduate student, avg. + 30 is ‘A’ grade (else ‘B’). every learner is identified by Name and Idno. Write proper get and set methods. Write the Driver Class (Test Class with main method) to calculate grades for both types of students. presume avg. for the Course is 55.

[Hint: Use Inheritance, Abstract Class and Method Overriding] [10]



Q.2. Consider a Bill class that is a part of larger Billing System for say a grocery store. A Bill has a Bill Number (unique across the system), a customer name, bill date and a list of items (with their prices and quantities).

For simplicity assume, a maximum of ten items are there per Bill.

Write the Bill class along with subsequent methods.



(a). Constructor (String customerName, String date)

(b). Void addItem(String itemName, int price,int qty)

(c). int getTotal()

(d). void printToScreen() [10]



Q.3. You have to give an OO design for airplane reservation system. presume that every airplane has 20 seats in 1st class (5 rows of four seats each, separated by an aisle) and 180 seats in economy class (30 rows of six seats each, separated by an aisle). A person can book a ticket for 1 or more passengers, and cancel the trip for a particular passenger (If the ticket contains more passengers a new ticket will be issued with the identical ticket number, but without the name of this particular passenger). At the time of reservation the person who is booking the ticket has to give the subsequent information: the names of the passengers, address, phone number, boarding point and to which city they are fling to, flight number , the date of journey and the seating preference (aisle or window in 1st class; aisle, center or window in economy). If the seats are available, but the available preferences are not matching with the preferences that are demanded by the passengers, an improper message is appeared on the screen. At this stage either ticket can be booked with the available preferences or ticket may not be booked, according to the wish of the booker. If seats are not available and if the booker is ready to book the ticket in waiting list, the system provides a waiting list number for every passenger. As the seats are cancelled, the system allots the seats to the waiting list passengers in first-come-first-serve-manner. Preferences can not be provided for the waiting list passengers.



(a). obtain out all the relevant classes. Write statement of purpose for every class.

(b). Write down all the use cases.

(c). Draw a UML class diagram.

(d). Draw Sequence and State diagram for the above systems. [5 x four = 20]






( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Birla Institute of Technology (BIT Mesra) 2007 OBJECT ORIENTED PROGRAMMING - Question Paper