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

Write a user-defined program to declare a class which stores a complex number. Demonstrate the use of constant objects , constant member function and constant arguments, using this class.


Write a program to take input for two integer variables. Assign the value -1 to the variable with higher value using a function.

[Use return by reference ]


Write a program in which there is a global variable, a local variable for main function and a variable in a nested scope inside main, with the same name. Print all the three variables.


Write a menu-driven program to create a class ‘num’ which stores an integer number. Derive three classes from ‘num’ class namely ‘binary’, ‘octal’ and ‘hexa’ which store the binary, octal and hexadecimal equivalent of the number in ‘num’ class. Input an integer value at run-time and display its binary, octal and hexadecimal equivalent.


Create the classes as per the hierarchy given below. The data members are mentioned along with class name. Include parameterized constructor in all the classes. Input data at run-time for a student, calculate the total marks and percentage and display them.


Student: Name, Roll Number

|

V

Marks: marks in 5 subjects

|

V

Result: total marks, percentage


Create a class employee which stores is name, ID and salary of an employee by user input. The ID should be generated upon the creation of object, starting from 1. Include all the constructors and destructor in the class. Create one object using each of the constructors and display it.


This assignment requires a C++ program be written to perform a vote counting and tallying procedure to gauge favorite holiday destinations of individuals. It should present the user with the question and a “ballot” of 5 holiday destinations and an exit/quit option. Once the program is started, it should allow the user to vote multiple times (same as in multiple users using the program to vote).
The program should start with a program title and brief instructions on how to vote. It should then ask the user to select an item (vote) from a group of items that are presented. You should use your own choice of holiday destinations.
After a vote is cast, incorporate a loop that will allow a new vote to be cast. Keep counters for valid and invalid votes as well as for individual item votes. Print a message informing the user
Create a Class triangle with three sides a,b and c as its data members Perform

the following operations: a. Accept the sides of a triangle

b. Display the sides of a triangle

c. Find whether the triangle is an equilateral triangle d. Find whether the triangle is a Scalene triangle

e. Find whether the triangle is an isosceles triangle

The program should have an array of 12 structures to hold weather data for an entire year. When the program runs, it should ask the user to enter data for each month. The program then should display month-wise min., max. and average temperatures and rainfalls in a table-like format. In addition, it should display average min., average max. and average mean temperature of the entire year. Similarly, it should display average min., average max. and average mean rainfall of the entire year. The following checks should be implemented for valid input. • Temperature range: -70 to +60 C • Rainfall range: 1mm to 25mm • Min. value <= Average value <= Max value  



 Write a program that uses the following three structures to store the weather data for a particular month:  



LATEST TUTORIALS
APPROVED BY CLIENTS