1 | Complex Class Overload | WAP to Overload Arithmetic operator (+,/,*,-, or %) for complex class
object which has x and y as data member(Member and Friend Function). |
Complex Class Overload.cpp
|
2 | String Class Overload | Define String class use Overload = = operator to compare two string.
use + operator to concate two string.
use = operator to copy one string to another string. |
String Class Overload.cpp
|
3 | Polar To Rect Conversion | Design a class polar which describes a point in the plane using polar co-ordinates radius and angel.
A point in polar co-ordinates is show:
X=r*cos(a)
Y=r*sin(a)
A=atan(X/Y)
R=sqrt(X*X+Y*Y) |
Polar To Rect Conversion.cpp
|
4 | Time To Min Conversion | Create one class time which has hour, minute and second as data member.
Now write input function to input class values and using class to basic type conversion,
find time in the form of minute. |
Time To Min Conversion.cpp
|
5 | week_day_number to week_day_str | Create a class week_day_number which has day of type integer as data member.
Create another class week_day_str which has day of type character as data member.
Now write proper input function in both the classes.
Demonstrate class to class type conversion using above two class. |
week_day_number to week_day_str.cpp
|
6 | Distance feet Overload | Create a class "Distance" that stores that feet and inches
overload the (+=) operator and the two values convert inches into feet. |
Distance feet Overload.cpp
|
7 | DATE To DMY Conversion | Write a program to create two classes: DATE and DMY and both classes are building to handled dates.
The difference between them DATE class handles it in string.
Where as the DMY class handles it has three integers representing day, month and year.
Provide conversion function(make use of casting operator function) to carry out conversion from object of one type to another. |
DATE To DMY Conversion.cpp
|
8 | Sum upto 200 Overload | Write a program to find sum of 1 to 200 using ++ operator overloading. |
Sum upto 200 Overload.cpp
|
9 | Vehicle Wheeler Inheritance | Create a class called "Vehicle" which contains data members registration number and fuel type
Make getdata() function to input data value.
Create class "two-Wheeler" from vehicle which contains data member’s distance and mileage
Make getdata() function to input data.
Use overloading techniques for getdata() function and display the information with fuel used. |
Vehicle Wheeler Inheritance.cpp
|
10 | Matrix Largest and 2nd largest | Create the R(row) and N(column) matrix using NEW operator and find the highest number from upper triangle matrix.
Also DELETE operator to be allocated the memory take appropriate member function to display the result in proper format.
And find the largest and second largest element from matrix.
And display even numbers from matrix. |
Matrix Largest and 2nd largest.cpp
|
11 | Time24 To Time12 Conversion | Write a program that consist of two classes Time12 and Time24.
The first one maintains time on 12 hour basis, whereas the other one maintains it on 24-hour basis.
Provide conversion function from object of one type to another. |
Time24 To Time12 Conversion.cpp
|
12 | Rupees To Pound Conversion | Design classes such that they support the followings:
Rupee R1,R2 and Pound P1,P2
P1=R1; Converts Rupee to Pound
P2=R2; Converts Rupee to Pound
Write a complete program which carry out conversion operation. |
Rupees To Pound Conversion.cpp
|
13 | DB DM Class | Create two classes DM and DB which store the values of distance.
DM stores distance in meters and centimeters.
DB stores distances in feet and inches.
Write a program that can read values for the class object and add one object of DM with another object of DB.
Use a friend function to carry out the addition operation and this function will display answer in meter and centimeters. |
DB DM Class.cpp
|
14 | Telephone Directory | Write a program to maintain a telephone directory
use add() and Show() methods to add new entries and
display the telephone numbers of a person when the name of the person is given(No need to use data files). |
Telephone Directory.cpp
|
15 | person, account, admin, master Inheritance | Consider a class network of above figure.
The class master derives information from both account and admin classes which in turn derive information from the class person.
Define all the four classes (which in turn derive information from) x and
write a program to create, update and display the information contain in master objects. |
person, account, admin, master Inheritance.cpp
|
16 | shape, triangle and rectangle Inheritance | Create a base class shape use the class two store double type value that could be used to compare the area.
A drive to specific classes called triangle and rectangle.
From the base shape and a member in get data to the base class to initialize base data member and another function display area. |
shape, triangle and rectangle Inheritance.cpp
|
17 | Employee read, write function file | Create a class EMP which contains a data members Name of employees, EmpNo and Basic Salary
Take appropriate member function and getdata into class then after write data into data file.
All EMP INFO display the information of all employees of a file.
Use read and write function for a file. |
Employee read, write function file.cpp
|
18 | Manipulator | Design a single manipulator to provide a following output specification for printing float value.
1) 12 column width
2) Rightjustified
3) Twoprecision
4) Filling unused place with sign
5) Trailing zeros shown are display + sign as first position. |
Manipulator.cpp
|