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

C++ Object-Oriented Programming Tasks

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

C++ Object-Oriented Programming Tasks

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Programming Laboratory-I

Assignment No-1
(Basics of object oriented programming)

1. Write a Menu driven CPP Program to perform below operations (use class, object and
separate functions for every operation)
a. Binary to Octal
b. Octal to Binary
c. Binary to Hexadecimal
d. Hexadecimal to Binary
e. Octal to Hexadecimal
f. Hexadecimal to Octal

2. Create an Employee class to enter and display information of employee such as EmpID,
Name, Address, Designation and Salary of last five years and calculate average salary (create
five objects to enter and display data).

3. Write a program using class to accept 5 numbers from user and display largest, second
largest and smallest, second smallest and middle number among five.

4. Student result generation


You need to create a 'Student' class with the following specifications:
Attributes:
rollNumber: an integer to store the roll number of the student.
name: a string to store the name of the student.
marks: an array of doubles to store the marks of the student in three subjects.
Methods:
 Setstudent(): a function that asks roll number, name, and marks from user.
 getRollNumber(): a method to return the roll number of the student.
 getName(): a method to return the name of the student.
 getMarks(): a method to return the marks of the student.
 calculateAverage(): a method to calculate and return the average marks of the
student.
 calculateGrade(): a method to calculate the grade of the student based on the
average marks. You can decide the grading system. For instance, average marks 90+
could be grade A, 80-89 could be grade B, and so on.
You should create a main function that creates a few student objects, calculates, and
displays the average marks and grade of each student.

5. Task: School Management System (To be performed in a group)


In this task, you are required to create a School Management System using classes and
objects in C++.
 Student Management: Create a 'Student' class with attributes like 'name', 'ID', 'class',
and 'grade'. Include methods to add, remove, update, and fetch student details.

 Teacher Management: Create a 'Teacher' class with attributes like 'name', 'ID',
'subject', and 'salary'. Include methods to add, remove, update, and fetch teacher
details.

 Course Management: Create a 'Course' class with attributes like 'name', 'ID',
'assignedTeacherID', and 'studentIDs' (this could be a vector storing the IDs of
students enrolled in the course). Include methods to add, remove, update, and fetch
course details.

After completion of implementation of all classes, create a main function which combines
the functionality of all these classes to simulate a simple School Management System.

Bonus Task:
Create a 'School' class that contains vectors of 'Student', 'Teacher', and 'Course' objects. This
class should provide a unified interface to manage all the school data.

***********************

You might also like