0% found this document useful (0 votes)
3 views

C++ Program (1)

The document is a practical record book for the Object Oriented Programming using C++ course for the Masters of Computer Application program. It includes a certification section, a detailed table of contents with various programming topics, and sample C++ programs illustrating concepts like enumeration and function overloading. The record book is intended for students to document their practical work and is dated for examination on August 27, 2024.

Uploaded by

Prasanth C
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

C++ Program (1)

The document is a practical record book for the Object Oriented Programming using C++ course for the Masters of Computer Application program. It includes a certification section, a detailed table of contents with various programming topics, and sample C++ programs illustrating concepts like enumeration and function overloading. The record book is intended for students to document their practical work and is dated for examination on August 27, 2024.

Uploaded by

Prasanth C
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

DIRECTORATE OF DISTANCE EDUCATION

(University with Potential for Excellence)

Masters of Computer Application


I YEAR

Object Oriented Programming using C++

(MCABC1P)
RECORD BOOK

NAME :
REGISTER NO:
DIRECTORATE OF DISTANCE EDUCATION

(University with Potential for Excellence) Bonafide

Certificate

This is to certify that bonafide that record of Object Oriented


Programming using C++ – MCABC1P practical record done by
Mr/Mrs/Ms __________________ Register Number_______________
for that Masters of Computer Application I year.

Subject & Code: Object Oriented Programming using C++– MCABC1P Date

of Examination: 27-08-2024

Internal Examiner External Examiner


Section – A
S.no. Contents
Page No.

1 Enumeration and Function Overloading 1

2 Scope and Storage Classes 3

3 Constructors and Destructors 5

4 Call-by-Value and Call-by-Reference 7

5 Static Members and Methods 9

6 Bit Fields 11

7 Operator Overloading (Binary, Friend, Member) 12

8 Unary Operator Overloading (Postfix and Prefix) 14


9 Iterators and Containers 17

10 Function Templates 18

11 Template Classes 19

12 Virtual Functions 21

13 Exception Handling 23

14 File Handling (Read, Write, Update) 24

Section – B

S.no Contents Page No.

1 Point, Shape, Rectangle, Square, Circle, Ellipse, Triangle, Polygon 26


Hierarchy
2 Stack and Queue Classes with Exception Handling 28

3 Bank Account Management using Inheritance 29

4 Matrix Class with Dynamic Memory Allocation and Methods 31


SECTION -A

Program 1 (i)

Write a C++ Program to illustrate Enumeration

Aim

To write a C++ Program to illustrate Enumeration

Program:

#include <iostream>
using namespace std;

enum week {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };


int main()
{
week today;
today = Wednesday;
cout<< "Day" <<today+1;
return 0;
}

Result

The above program is executed successfully.

Program 1 (ii)

Write a C++ Program to illustrate Function Overloading

Aim

To write a C++ Program to illustrate Function Overloading

Program:

#include <iostream>
using namespace std;

1
void display(int);
void display(float);
void display(int, float);
int main() {
int a = 5;
float b= 5.5;
display(a);
display(b);
display(a,b);
return 0;
}
void display(int var) {
cout << "Integer number: " << var << endl;
}

void display(float var){


cout << "Float number: " << var << endl;
}

void display(int var1, float var2){


cout << "Integer number:" <<var1;
cout << "and float number:" << var2;
}

Result

The above program is executed successfully

You might also like