Q4: Discuss constructors with default arguments and constructor overloading with the help of suitable
examples.
Q2: Write a program to overload operators in the same program by writing suitable operator memb
functions for following expression:
07= ((01 % 02)(03 || 04) - (05>06)) [Here 01,02,03,04,05,06 and 07 are objects of a cla
"overloading", and this class is having one integer data member]
Explain the type of constrcuors with the examples.
Create a class called Point which will have 2 co-ordinate value x & y and will be able to
calculate the distance between two points. Write appropriate constructor and method of the class.
Create another class called Shape, which takes different number of points to create a triangle,
rectangle and circle. And also able to calculate the area and perimeter for the different shapes.
Write the appropriate overloading method for this shape class. Write appropriate main function to
test the shape class.
Create the class Matrics on size m*n. Define the all matrices operations like addition,
subtraction and multiplication on Matrics type objects. Use operator overloading
How is w=(3,5,1)∈R
3
a linear combination of u=(0,−2,2)
and v=(1,3,−1)
?
Check whether the set of vectors {1 + 𝑥, 𝑥 + 𝑥2
, 1 + 𝑥3
} is a linearly independent set of
vectors in P3
, the vector space of polynomials of degree ≤ 3
A customer opens an account at a bank with an initial amount. The account number, name, and balance of the customer are generated. The customer can deposit money and withdraw money as per need, this will modify the existing account balance. It should also be checked if the demanded amount is available during withdrawal. The customer can also close the account, the available amount will be paid out. Write a programme to input and display data for 5 customers with the use of Constructor and Destructor.
There is a Ground class that keeps the ground name and city. There is another class Game, that holds information on game names and the date of the game on which the game will be played. The Player class keeps the information about a Player, name, and code. There is a Team class that holds the team name and the total number of players counted. Using c++
You're decorating a room with balloons for your friend's birthday party. There are balloons of K different colors, and you have access to infinite amount of balloons of any color. You want to arrange N balloons in a row, with the only condition that no two adjacent balloons can be of the same color, because your friend will dislike it.
How many ways are there to arrange the balloons?
Since the answer can be very large, print it modulo 10^9+7.