Program Name

Program Definition

getline.cpp

This program uses getline function to input a string.

strimp.cpp

This program uses cin and cout functions for inputting and outputting.

unary.cpp

This program uses unary scope resolution operator.

salary.cpp

This program computes the salary of an employee using static data members

enum.cpp

This program shows the usage of enumarated types

constmem.cpp

This program uses a constant member function

emp.cpp

This program displays the total amount of wages of five employees using static data member

static.cpp

This program keeps the count of the number of initializations of the class using static data member

point0.cpp

This program displays the x coordinate of a point given its coordinates and uses a constructor

point.cpp

This program displays the x coordinate of a point given its coordinates and uses a default constructor

point2.cpp

This program displays the x coordinate of a point and for three different objects and uses a default constructor

pointini.cpp

This program displays the x coordinate of a point for three different objects and uses a constructor initializer

pcprice.cpp

This program displays the price of a PC according to the type of purchase and uses a constructor

pcprices.cpp

This program calculates the price of PC's for three customers

emp.h

This header file contains employee class's definition

destruct1.cpp

This program defines an employee object using constructor and destructor

destruct2.cpp

This program defines an employee array using constructor and destructor

dynamic1.cpp

This program defines a class with a member using dynamic memory allocation by a constructor and a destructor

memcopy.cpp

This program simulates memberwise copy.

copyconco.cpp

This program uses copy constructor for the function parameter and the return type of a value object.

cat.cpp

This program simulates copy constructor.

ex6_2.cpp

This simulates the string class with assign and concatination methods.

complex.cpp

This program adds two complex numbers by using a friend function

grades1.cpp

This program displays the GPA and CGPA of a student by using a friend class

grades2.cpp

This program displays the ID, Name, GPA and CGPA of a student by using two friend classes

Matrix.cpp

This program multiplies a matrix with a vector by using a friend multiply function

overcom3.cpp

This program uses operator overloading for += function of complex numbers

overcom4.cpp

This program uses operator overloading for + function of complex numbers

string.cpp

This program assigns a string to another string by using operator overloading for =

opover1.cpp

This program illustrates a non-member operator overloading

opover2.cpp

This program illustrates a friend operator overloading

opover3.cpp

This program illustrates a member operator overloading

overcomp.cpp

This program sums up and finds the difference of two complex numbers by using operator overloading for + and -

overcom2.cpp

This program sums up and finds the difference of two complex numbers by using operator overloading for + , - and +=

prefix.cpp

The overloading of prefix ++ and postfix ++ is implemented

prefix2.cpp

The overloading of prefix ++ and postfix ++ is implemented

multiple.cpp

The overloading of =, + and [] are implemented for an array of integers and multiple assignment is shown

date.cpp

This program shows operator overloading for input and output for a given date object

iocomp.cpp

This program shows operator overloading for output for a given complex number

rectangl.cpp

Compute the area of the rectangle and a box

location.cpp

This program declares a point which inherits from location

inh1.cpp

The execution order of the constructors and destructors in inheritance is shown

inh2.cpp

The execution order of constructors for "is a" and "has a" relations is shown 

circle.cpp

The execution orderof constructors and destructors for the circle class which is inherited from point class is shown

employee.cpp

This program calculates the salary of an hourly worker employee which inherits from employee class

student.cpp

This program displays the information of a graduate student which inherits from student class

student2.cpp

This program declares 5 graduate students using an array which inherits from student class

clock.cpp

This program shows multiple inheritance for a clock radio class

watch.cpp

This program shows ambiguity resolution in multiple inheritance

animal.cpp

This program shows polymorphism

file1.cpp

This program reads 10 integers from the keyboard and output the positive ingeters in a file

file2.cpp

This program reads the number and names of the students from a file and outputs them on the screen

file3.cpp

This program inputs the account number, name and balance of the customers from the keyboard and writes them to a file

file5.cpp

This program copies the contents of a file into another file

templt1.cpp

A template sum function.

templt2.cpp

A template maximum function

templt3.cpp

A stack template

templt4.cpp

A stack template

templt5.cpp

A sample class template

templ6.cpp

An array template