Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
13 views

OOPS C++ LAB List of Experiments

Uploaded by

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

OOPS C++ LAB List of Experiments

Uploaded by

anubnetiran0
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ANNAMALAI UNIVERSITY

UNIVERSITY PRACTICAL EXAMINATION NOV/DEC 2024


DEPARTMENT OF COMPUTER SCIENCE

College name : St. Charles College of Arts and Science, Eraiyur Center code : 311
Subject: Object Oriented Programming with C++ Lab Subject code : 22UCSCP34
Date & Session: 22.10.2024/ AN (11.30 AM to 02.30 PM) Semester : III

LIST OF EXPERIMENTS
1. Write a class to represent a complex number which has member functions to do the following
a. Set and show the value of the complex number
b. Add, subtract and multiply two complex numbers
c. Multiplying the complex number with a scalar value
2. Write a Point class that represents a 2-d point in a plane. Write member functions to
a. Set and show the value of a point
b. Find the distance between two points
c. Check whether two points are equal or not
3. Design and implement a class that represents a Harmonic Progression (HP). Implement functions to do the
following:
a. Generate the HP up to a specified number of terms
b. Calculate the sum of the HP to n terms and to infinity
c. Generate the nth term of the HP
d. Generate the corresponding Arithmetic Progression. (Design and implement a class that encapsulates an AP,
and allow the HP class to use its facilities by implementing friend functions.)
4. Design and implement a class to represent a Solid object.
a. Apart from data members to represent dimensions, use a data member to specify the type of solid.
b. Use functions to calculate volume and surface area for different solids.
5. Design a class representing time in hh:mm:ss. Write functions to
a. Set and show the time
b. Find the difference between two time objects
c. Adding a given duration to a time
d. Conversion of the time object to seconds
6. Design a 3x3 matrix class and demonstrate the following:
a. Addition and multiplication of two matrices using operator overloading
b. Maintaining a count of the number of matrix object created
7. Design a class called cString to represent a string data type. Create a data member in the class to represent a string
using an array of size 100. Write the following functionality as member functions:
a. Copy Constructor
b. Concatenate two strings
c. Find the length of the string
d. Reversing a string
e. Comparing two strings
8. Design a class called cString to represent a string data type. Create a data member in the class to represent a string
whose size is dynamically allocated. Write the following as member functions:
a. Copy Constructor
b. Destructor
c. Concatenate two strings
d. Find the length of the string
e. Reversing a string
f. Comparing two strings
9. Create a class to represent a 2-d shape and derive classes to represent a triangle, rectangle and circle. Write a
program using run-time polymorphism to compute the area of the figures.
10. Define a class template representing a single-dimensional array. Implement a function to sort the array elements.
Include a mechanism to detect and throw an exception for array-bound violations.
11. Demonstrate the use of the vector STL container.
Implement a telephone directory using files

INTERNAL EXAMINER EXTERNAL EXAMINER

You might also like