0% found this document useful (0 votes)
42 views2 pages

Department of Computer Science and Engineering 13.507 Object Oriented Programming Lab Lab Cycle

This document outlines the exercises and questions for a 13-week lab cycle in an object oriented programming course. The lab cycle covers fundamental C++ concepts including dynamic memory allocation, function overloading, classes and objects, static data members, friend functions, operator overloading, inheritance, constructors and destructors, abstract base classes, and templates. Example questions are provided for each topic to be implemented, such as writing programs to swap variable values, create a binary tree, allocate dynamic memory, find volumes of shapes, model bank accounts, read and display student details, count class objects, and add distances stored in different units using friend functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views2 pages

Department of Computer Science and Engineering 13.507 Object Oriented Programming Lab Lab Cycle

This document outlines the exercises and questions for a 13-week lab cycle in an object oriented programming course. The lab cycle covers fundamental C++ concepts including dynamic memory allocation, function overloading, classes and objects, static data members, friend functions, operator overloading, inheritance, constructors and destructors, abstract base classes, and templates. Example questions are provided for each topic to be implemented, such as writing programs to swap variable values, create a binary tree, allocate dynamic memory, find volumes of shapes, model bank accounts, read and display student details, count class objects, and add distances stored in different units using friend functions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

DEPARTMENT OF COMPUTER SCIENCE AND

ENGINEERING
13.507 OBJECT ORIENTED PROGRAMMING LAB
LAB CYCLE
SL NO:
1
2
3
4
5
6
7
8
9
10
11
12
13

EXERCISES
Introduction to C++ programs
Familiarization of dynamic memory allocation
Implementation of function overloading
Implementation of programs using classes and objects
Understanding the concept of static data members
Implementation of programs using friend functions
Implementation of programs using the concept of friend classes
Implementation of operator overloading
Implementation of inheritance in programs
Understanding the concepts of constructors and destructors
Implementation of programs involving abstract base classes
File handling techniques
Template handling

QUESTIONS
1. Introduction to C++ programs
a. Write a C++ program to swap the values of two variables using call by value
and call by reference.
b. Writ a program to create a binary tree to perform inorder, preorder, postorder
traversals.
2. Familiarization of dynamic memory allocation
a. Write a program that uses new and delete operators for dynamic allocation
and deallocation of memory.
3. Implementation of function overloading
a. Write a C++ program to find volume of cone, cube, and sphere using
function overloading.
4. Implementation of programs using classes and objects
a. Design a class to represent a bank account, include the following DATA MEMBERS:
name of depositor, account no, type of account and balance amount in the account &
MEMBER FUNCTIONS: to assign data values, to deposit an amount, to withdraw an

amount after checking balance, and a function to display name and balance. Write a main
program to test the program.
b. Write a program using concept of classes to read details of students with marks of three
subjects and find its total. Also write the functions to insert new details like student
details and display.
5. Understanding the concept of static data members
a. Write a C++ program to count the number of objects created in the class.
6. Implementation of programs using friend functions
a. Create two classes DM and OB to store the value of distances. DM stores distance in
metres and centimeters and DB in feet and inches. Write a program that can read value
for class objects and add one object of DM with other object of DB. Use a friend function
to carry out the addition operation.

You might also like