Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
OBJECT ORIENTED
PROGRAMMING WITH
C++
(2140705)
2017-18
List of Experiments
Exper
CO
iment
Name of the Experiment mappi
No:
ng
1. Write a Program to display WELCOME TO MEFGI and elaborate CO1
all the Statements.
2. Write a program to perform the following:
- Accept three numbers
- Calculate average
a. Addition
1. b. Subtraction
c. Multiplication
d. Division
e. Modulo
4. Write an appropriate control structure that will examine the value of
a following point variable called temp and print one of the following
messages, depending on the value assigned to temp.
(a) ICE, if the value of temp is less than 0.
(b) WATER, if the value of temp lies between 0 and 100,
(c) STEAM, if the value of temp exceeds 100.
5. Write a program to reverse a string.
MARWADI EDUCATION FOUNDATION’S GROUP OF INSTITUTIONS
FACULTY OF ENGINEERING, GAURIDAD CAMPUS.
DEPARTMENT OF COMPUTER ENGINEERING
1. Write a CPP Program to swap two values (using call by value CO1
and call by reference).
2. Write a Function called zeroSmaller() that is passed two int
argument by reference and then set the smaller of the two
numbers to 0. Write a main () to call this function.
V = P(1+r)n
and print the tables which would give the value of V for various
a. The Function takes double value for m and int value for
n, and returns the result correctly.
1. Create a class that imitates part of the functionality of the base CO1,
data CO2,
type int. Call the class Int. The only data in this class is an int CO3
variable. Include member functions to initialize an int to 0, to
initialize it to an int value, to display it, and to add two Int values.
Write a program that exercises this class by creating two
initialized
Int values, adding these two initialized values, adding these two
initialized value and placing the respond in the un-initialized
value,
and then display this result.
Data members :
2. Account number
4.
3. Type of account
Member functions :
2. To deposit an amount
1. Implement following class relationship and test with main class. CO1,
CO2,
CO3
Staff(code,name)
6.
MARWADI EDUCATION FOUNDATION’S GROUP OF INSTITUTIONS
FACULTY OF ENGINEERING, GAURIDAD CAMPUS.
DEPARTMENT OF COMPUTER ENGINEERING
a. Shape
i. Two Dimensional
1. Triangle
2. Rectangle
3. Circle
1. Box
2. Cone
3. Cylinder
4. Sphere
1. Write a program that reads a text file and create another file CO1,
that is identical except that every sequence of consecutive CO3
8.
blank spaces is replaced by a single space.
MARWADI EDUCATION FOUNDATION’S GROUP OF INSTITUTIONS
FACULTY OF ENGINEERING, GAURIDAD CAMPUS.
DEPARTMENT OF COMPUTER ENGINEERING
2. Write a program that reads data from one file and copy it to
other file.
a. To create a vector
3. A table gives a list of car models and the number of units sold in
each type in a specified period. Write a program to store this
table in suitable container and to display interactively the total
9. value of a particular model sold, given the unit-cost of that
model.
CO1,
CO2,
10. Open ended project in group of 2 or 3 students. CO3,
CO4,
CO5