Questions: 9 913

Answers by our Experts: 9 913

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Q2: Write a program to overload operators in the same program by writing suitable operator member

functions for following expression:

07= ((01 % 02)>(03 || 04) - (05>06)) [Here 01,02,03,04,05,06 and 07 are objects of a class

"overloading", and this class is having one integer data member]


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


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++


:  Default constructor with default parameters for hours, minutes, and seconds, all set to zero.  Overloaded extraction operator that prompts a user to enter the values for hours, minutes, and seconds for the Time. Continuously prompt the user if the entered value is not valid for a 24-hour clock.  Overloaded insertion operator to display the Time in the form hr:min: sec. If hours, minutes, and/or seconds is a single digit, the time should be shown as 0x: where x is hours, minutes, or seconds. Example: 02:33:45, 13:05:66, 23:17:09  Overloaded prefix increment and postfix increment operators to increment the Time by one second.  Overloaded subtraction operator that returns a Time object that indicates the difference between two Times.  Overloaded == operator that returns true or false indicating that two Times are the same or not, respectively. Two Times are the same if they have equal values for hours, minutes, and seconds.


The principal of a school wants to speak with some of the students to assess their over all development including studies,most of the teachers were selecting the toppers of their classes but Mr,sam thought of an idea to select the bunch of students who did not have much difference in their marks so that he gains the reputation of a teacher who teaches well to the whole class and not just to a bunch of brilliant students.

Your are required to help mr,sam in selecting K students that can speak with principle from his class .you need to return an integer array representing the marks of the selected students sorted in ascending order.

Example1:

Input1:10

Innput2:{950,477,55,602,881,302,859,438,551,382}

Input3:1

Output:{950}


LATEST TUTORIALS
APPROVED BY CLIENTS