0% found this document useful (0 votes)
53 views2 pages

The File Name Should Be - .PDF: Please Read The Assignments Carefully

The document contains 5 assignments for an Object Oriented Programming course. The assignments involve: 1) Developing a Hostel Management System with classes for students, hostels, and mess; 2) Defining a Point class in C++ with operators like +, -, =, >, ==, <<; 3) Writing Java programs to add matrices and find prime numbers in a range; 4) Developing abstract GeometricObject and subclass classes Triangle and Circle in Java; 5) Developing classes for an HR management system in Java with functions like attendance, leave requests, transport requests, and reporting.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views2 pages

The File Name Should Be - .PDF: Please Read The Assignments Carefully

The document contains 5 assignments for an Object Oriented Programming course. The assignments involve: 1) Developing a Hostel Management System with classes for students, hostels, and mess; 2) Defining a Point class in C++ with operators like +, -, =, >, ==, <<; 3) Writing Java programs to add matrices and find prime numbers in a range; 4) Developing abstract GeometricObject and subclass classes Triangle and Circle in Java; 5) Developing classes for an HR management system in Java with functions like attendance, leave requests, transport requests, and reporting.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

M.

Tech IT (Courseware Engineering), 2021


And
Master in Multimedia Development, 2021

Object Oriented Programming


Total Marks: 50 Time: 24 hours

Answer all assignments


(All assignments carry equal marks)
Please read the assignments carefully

(Please write your name, class roll no., registration no. with year, subject name and page no. on
every page.

Please send the scanned copy (.pdf file) of the answer-script through e-mail. The file name
should be <yourname>_<class roll no>.pdf)

1. Each admitted student in a residential institute will register in a Hostel Management System
with information like First name, Last name, Contact address, mobile number, email address,
Department, Course, PG/UG, Contact’s name and mobile number in case of emergency etc.
Each student will be provided with a unique id and the system will keep track of each student
with this unique id. Each hostel is equipped with MESS department. Students have to pay
extra charge for food bills in the MESS. A student can perform the following tasks in a
Hostel Management System –

a. Display list of vacant rooms in a hostel


b. Find total rooms in a hostel and student details residing in a particular room in a
hostel
c. Request for room change provided that room is vacant
d. Inform whether taking food or not. Otherwise, charges for food will be added into
MESS charge for that student.
e. Request for monthly MESS charge
Identify all the classes and implement them using C++.

2. Define a class Point in C++ that has three members indicating its x, y and z coordinates. The
class Point must have appropriate constructors. Also, write appropriate methods to overload
the following operators:
(i) “+” operator
(ii) “-” operator
(iii) “=” operator
(iv) “>” operator to check if P1(x1, y1, z1) is greater than P2(x2, y2, z2) in a
Cartesian coordinate system
(v) “==” operator for equality comparison
(vi) “<<” operator for displaying point object in “(x, y, z)” form where ‘x’, ‘y’, ‘z’
represent x, y and z coordinates of the point respectively.
Write a main() function to test the above mentioned operators.

3. (a)Write a Java program to add two 3x2 matrices (“a” and “b”) of integers and print the
matrix, which is the sum of “a” and “b”. Initialize the elements of the matrix “a” by the
following formula: a[i][j] = i + j; Initialize the elements of the matrix “b” by the formula
b[i][j] = i*j;
(b) Write a Java program to display prime numbers between lower range and upper range.
Lower range and upper range are supplied by user as command-line arguments.

4. Develop an abstract class “GeometricObject” which has two variables “colour” and
“weight”; it would have a constructor function for setting the “colour” as “white” and the
“weight” as 1.0 as default values. The class should have methods getColour() and
getWeight() to return the colour and weight values to the caller. The class should have two
abstract methods findArea() and findCircumference().
Write subclasses of “GeometricObject” called “Triangle”, “Circle”. Rewrite the methods for
calculating area and circumference of a “traiangle” or a “circle”.

5. An employee in an organization can perform the following functionalities in the Human


Resource Management system.
a. Enter Daily attendance i.e., in time and out time
b. Request for leave ( leave has significance with salary)
c. Request for transport if working after office hours (a car with registration no. will be
made available to an employee by the HR Manager, who is also an employee)
d. Resign from the post using employee id. HR Manager will send notification to the
employee.
e. Display list of employees working under a Manager
f. Print yearly leave report
Identify the classes and the relationship among them. Write separately all the classes with
their attributes and member functions. Implement (i.e., write code for) all the classes
using Java.

You might also like