0% found this document useful (0 votes)
4 views1 page

OOP Part 3

The document outlines the creation of multiple classes in C++ for various geometric shapes and employee management. It includes specifications for calculating volumes and areas using function overloading, implementing inheritance with virtual functions, and managing employee data with protected attributes. Additionally, it describes the creation of account management systems with constructors and methods for displaying information.

Uploaded by

ai6209255
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

OOP Part 3

The document outlines the creation of multiple classes in C++ for various geometric shapes and employee management. It includes specifications for calculating volumes and areas using function overloading, implementing inheritance with virtual functions, and managing employee data with protected attributes. Additionally, it describes the creation of account management systems with constructors and methods for displaying information.

Uploaded by

ai6209255
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Create a class called Volume which contains a method called "find_vol".

write down
appropriate code to create objects named as sphere and cylinder of the above class and
implement function overloading to calculate volume of a sphere and cylinder based
upon user input.

2. Create a class called Area which contains a method called "find_area". Write down
appropriate code to create objects named as circle and rectangle of the above class and
implement function overloading to calculate area of a rectangle and area of a circle
based upon user input.

3. Write a program to create a class shape with functions to find area of the shapes and
display the name of the shape and other essential component of the class. Create derived
classes circle, rectangle and trapezoid each having overridden functions area and
display. Write a suitable program to illustrate virtual functions and virtual destructor.

4. Implement a Circle class. Each object of this class will represent a circle. storing its
radius and the x and y coordinates of its center as floats. Include a default
constructor.access functions, an area() function, and a circumference() function.

5. Create a class called Employee which contains protected attributes such as emp_id,
emp_salary and emp_da. emp_da is 20% of the emp_salary. Provide an appropriate
method to take user input to initialize the attributes and display the details regarding 25
Employee of a class.

6. Write a complete program to create a class called Account with protected attributes
such as account number and balance. The attributes should be initialized through
constructors. The class contains a public method named as show() to display the
initialized attributes. Provide a mechanism to create an array of Account objects for the
30 account.

7. Declare a C++ class "Employee" for following requirement


Private
empno int
name char[20]
salary int
getsalary() to return value of salary
public
getdata() to read the detail
showdata() to display details
showofficer() to display only those who are getting salary above 20000

You might also like