Sei sulla pagina 1di 6

CS 120: SDOOP LAB

II Sem B.S(Engg.)
(2013)

Prepared by

Approved by

(Ashwath Rao B)

(H.O.D)

DEPT. OF COMPUTER SCIENCE & ENGG.

M.I.T., MANIPAL

INSTRUCTIONS TO STUDENTS

1. Students should be regular and come prepared for the lab practice.
2. In case a student misses a class, it is his/her responsibility to complete that missed
experiment(s).
3. Students should bring the observation book, lab journal and lab manual. Prescribed textbook
and class notes can be kept ready for reference if required.
4. They should implement the given experiment individually.
5. While conducting the experiments students should see that their programs would meet the
following criteria:

Programs should be interactive with appropriate prompt messages, error messages


if any, and descriptive messages for outputs.
Programs should perform input validation (Data type, range error etc.) and give
appropriate error messages and suggest corrective actions.
Comments should be used to give the statement of the problem and every function
should indicate the purpose of the function, inputs and outputs.
Statements within the program should be properly indented.
Use meaningful names for variables and functions.
Make use of constants and type definitions wherever needed.
6. Once the experiment(s) get executed, they should show the program and results to the
instructions and copy the same in their observation book.

Note: - The programs done in the first 4 weeks should aid in the development of the subsequent
mini project.

Week 1, Week 2
Defining functions, invoking functions, passing parameters to functions and returning values from
functions; programs involving integer arrays, character pointers, strings and menus.
Exercise :
i.Design an account for a bank customer. Savings account and Current Account are two types of
accounts. Each account has account type, account holders name(s), address and interest rate. After
determining the principal amount, time and interest rate calculate the interest for the account.
ii. A movie theatre has 200 seats out of which 60 are balcony and 100 are first class and the rest
second class. Design a ticket booking system for a single show. Till the seats are vacant the system
should reserve seats.
iii. Design a dictionary for English to Hindi. The dictionary should have English words and the
corresponding word in Hindi. Create a class for dictionary and store few entries. Design a class called
Word which has a word text, the language of the text. Implement a convert() which will change the
word text and also the language.
Week 3,4
Classes, records, array of records defining student/employee classes, defining array of
student/employee records; performing various operations on these records as well as on the array.
Files opening a file, writing objects/records to a file, reading objects/records from a file, including
the length of a file etc.
Exercises for Week 3 :
1. A college is offering an undergraduate programme and a post-graduate programme. There are
five subjects in undergraduate programme and grade is absolute percentage of marks obtained. In a
post-graduate programme there are five subjects where the grade is calculated on a 10 point scale.
i. Create a set of students of graduate and post-graduate programme.
ii. Read in the details of students namely registration number, name, type of programme, marks in
each subject.
iii. Determine the grade for each student(note: grade depends on the type of programme).
iv. Determine the students who have obtained less than 35 marks in any subject. Display the
registration number, name, name of subject(s).
v. Determine the topper in each type of programme.

2. There are two types of Employees namely,


a. Technical and b. Managerial
Each employee has employee id, name, address, blood group and salary package.
The salary package for technical employee include,
i. Basic Salary
ii. 50% of basic salary as DA
iii. 20% of basic salary as Vehicle allowance
iv. monthly fixed performance incentive
The salary package for Managerial employee include
i. Basic Salary
ii. 40% of basic salary as DA
iii. 20% of basic salary as Vehicle allowance
iv. monthly variable bonus

i. Accept the employee details and create employee records.


ii. Read the salary component of each employee and then determine the total monthly salary for
each employee.
iii. Determine the lowest salary employee(s).

Exercises for Week 4 :


1. Create a file called student.txt for the problem as defined in previous week and store all
records of students in a formatted manner. Define a method called toString() in each class
which is useful in converting to string. Use sprintf() function in toString() method. Also,
define functions to recreate the object from file. If any changes occur to the student record
they should be saved in the file, for the subsequent run of the program.
2. Create and store all employee records in employee.txt file for the problem as defined in
previous week and store all records of employees in a formatted manner. Define a method
called toString() in each class to convert the record to string. Use sprintf() function in
toString() method. Also define functions to recreate the object from file using sscanf()
function. If any changes occur to the Employee record they should be saved in the file, for
the subsequent run of the program.

Week 5, 6, 7, 8
Mini project:- Batches are formed with 2 students in every batch. Sample systems like Library
management system, a university system, banking system etc to be take up.
Front end should have a simple menu and files to be used as backend/storage.(Instead of
databases). Each system should provide a minimum of 4/5 functionalities.
Sample systems for the mini-project
i.

Banking system

ii. Railway Reservation System


iii. Digital Library system
iv. Movie Ticket Reservation System
v. Inventory System
vi. Super-Bazar POS system
vii. Vehicle/Gadget Service Tracking system
viii. Canteen Billing System
ix. Employee Entry/Exit System
x. Airline Ticket Booking System
xi. Tender evaluation system
xii. Bidding System
Note : The system need not be from the above list. For any other system development, please talk to
the faculty in-charge.
Week 9
Mini project evaluation.

Week 10, 11, 12, 13, 14(UML diagrams)


Various systems like Library management system, a university system, a banking system, a hospital
system, a railway reservation system, a bus booking system, an ATM system are to be modeled using
UML diagrams through Rational Rose tool. Emphasis is to be given for use case diagrams, class
diagrams, sequence & collaboration diagrams. Attaching notes, files and comments to various model
elements to be studied. Also generation of skeleton code in C++/Java to be demonstrated.
On the final day, students should submit detailed UML diagrams of their respective mini projects.

Lab References:1. Object oriented programming with C++ Balaguruswamy, McGrawHill publications.
2. Mastering UML with Rational Rose Wendy Boggs, Michael Boggs, BPG, 1999 edition.

Potrebbero piacerti anche