Questions: 11 448

Answers by our Experts: 10 707

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 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 file contains a list of telephone number in following form.(10 Marks)

 Aman 9915336423

 Raj 9915336429

 ….. ……….

 Assume 10 such entries. ( Each students entry should be different)

 Name contains only one word and name and telephone number are separated by 5 white spaces. 

i) Write a program to read the file and output the list in two columns. Name should be left justified 

and number should be right justified.

ii) Write a program that will create the data file containing the list of telephone number given in 

above form. Use a class object to store each set of data.

 iii) Write a interactive menu driven program that will access the file created in first part and implement 

the following task.

a) Determine the telephone number of specific person.

b) Determine the name if a telephone number is known.

c) Update the telephone number when there is a change in telephone number


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.

In a cricket game, a team can have 11 players including 1 captain. The Game will be played between 2 teams on the ground. No player can play the game without a team on the ground. And no game can be played without a ground’s information.

Design it using any possible type of Inheritance. Input information for a game of 2 teams, and display the following:

Ground name City Game Team1 Team2 Captain1 Captain2.


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
New on Blog
APPROVED BY CLIENTS