Вы находитесь на странице: 1из 4

Exercises:

1. Program with functions


o Some simple C++ programs.
o Create a C++ program to have a function to calculate the simple
interest for a customer with default arguments.
o Create a C++ program to swap 2 integer numbers using functions and
call by value, call by address and call by reference methods.
o Create a C++ program to swap 2 Student structures using functions
and call by value, call by address and call by reference methods.
2. Some Simple C++ Programs with class, objects, constructors and destructors.
o

o
o

Create a C++ program to have a Class named set with 2 numbers and
perform the various operations to find Max, Min, Add, Sub using
methods.
Create a C++ program to have a Class employee with name, age,
designation. Write a function to get & display n number of employees.
Create a C++ program to have a Class State with its name and capital
and perform the operations of getinfo(), displayinfo(), search(name),
search(capital) using methods.
Constructors, Destructors
Create a C++ program to have a class named add_nos and get the
values for the number variables through constructor and perform the
addition of them. Check whether they are deleted at the time of
destructor. Perform Copy Constructor of one object into other object.
Create a C++ program to have an Shopping list with itemcode[10],
itemprice[10], count and with operations like add item to my shopping
bag, remove item from bag, display content of bag, calculate total,
count items, order items and quit.

3. Function & Operator Overloading


o Create a C++ program to overload the function Volume to perform
Volume calculation of various shapes.
o Create a C++ program to overload unary minus operator to a class
with 3 data members.
o Create a C++ program to overload the + operator to perform the
addition of two strings.
o Create a C++ program to overload the + operator to perform the
addition of 2 complex numbers.
o Write a C++ program to overload the > operator on a string class to

check whether the given first string is greater than the second string. s1,s2
are string class objects.
if (s1>s2)
cout<<First string is greater than second string;
else

cout<< First string is not greater than second string;


4. Inheritance
o

Create a C++ program to have a class named student and inherit a


class named Test from it which contains mark details for each student
and derive a class named result to put grade for each student. Perform
Single and Multilevel inheritances.
Create a C++ program to show the Hybrid inheritance and virtual base
class.

STUDENT

TEST

SPORTS

GRADE

Create a C++ program using virtual function get the information about
N no of persons and find whether they are outstanding or not.

PERSON

PROFESSOR

Outstanding() Virtual function

STUDENT

Create a C++ program to have a class named Media with a virtual


function Display. Inherit the classes Book and Tape from Media class.
Using the Virtual function Display, show the details of Book and Tape.
5. Template and file handling
o

Create a C++ program using template to swap any two datatypes and
to find the maximum of any two datatypes.

Create a C++ program using template to store any type of data in a


Link List.

Write a C++ program using files to store the information of n number


of student information and make search on it.
Write a C++ program using files to store the information of n number
of employee information and make copy operation using filters.
Write a C++ program to show the various functionalities of Exception
Handling model.

o
o

Plan of Exercises:
S.No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Topics
Program with functions
class, objects, constructors and
destructors
Friend Functions
Function & Operator
Overloading
Inheritance
File Handling
Exception Handling
Evaluatory Test - I
Simple Java programs
Packages
Interfaces
Inheritance
Multithreading
Exception Handling
Evaluatory Test II
Total Hours

Internal Assessment :
Record
Continuous Assessment
Evalutory & Model Exam
Attendance

:
:
:
:

5 marks
5 marks
5 marks
5 marks

Total

: 20 marks

No. of Hours
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
45

Remarks

Вам также может понравиться