This document contains an assignment on object oriented programming in C++ for a deadline of March 24th, 2023. It includes 7 questions about classes and objects, drawbacks of public data members, function overloading, creating classes to represent complex numbers and bank accounts, differences between call by value and reference and structures vs classes, and using constructor overloading to display cubes of integers.
This document contains an assignment on object oriented programming in C++ for a deadline of March 24th, 2023. It includes 7 questions about classes and objects, drawbacks of public data members, function overloading, creating classes to represent complex numbers and bank accounts, differences between call by value and reference and structures vs classes, and using constructor overloading to display cubes of integers.
This document contains an assignment on object oriented programming in C++ for a deadline of March 24th, 2023. It includes 7 questions about classes and objects, drawbacks of public data members, function overloading, creating classes to represent complex numbers and bank accounts, differences between call by value and reference and structures vs classes, and using constructor overloading to display cubes of integers.
This document contains an assignment on object oriented programming in C++ for a deadline of March 24th, 2023. It includes 7 questions about classes and objects, drawbacks of public data members, function overloading, creating classes to represent complex numbers and bank accounts, differences between call by value and reference and structures vs classes, and using constructor overloading to display cubes of integers.
Q 2: List the drawbacks of classes with all public data members.
Q 3: What is meant by function overloading?
Q 4: Write a c++ program to find the area of a circle, rectangle, and triangle using function overloading. Assume the function name is “AREA”.
Q 5: Write a c++ program to add two complex numbers by passing objects as
arguments into the functions and returning object. Explain the concept in short.
Q 6: Create a class to represent a bank account, including the following members:
1. Data members: i. Name of the depositor ii. Account number 2. Member functions i. Deposit an amount ii. Withdraw an amount iii. Display name and balance
Q 7: List the difference between
1. Call by value & call by reference 2. Structure and class Q#8: Write C++ Program to display the cube of the number up to a given integer using constructor overloading