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 program that Will short thee integers .the integers are entered from the keyboard and stored in variable num1,num2,num3 respectively. The program sorts the numbers so that num1<=num2<=num3.


Write a program to define a class Complex that will contain real and imaginary as the data members. Define appropriate constructors and a display functions. Overload the binary + and the * operator to add and multiply two complex numbers respectively.
Write a program to define a class book that will contain Title, Author and Price of the book as data members. Define Null Constructor, parameterized constructor and copy constructor for the class and a function to display the details of an object. Use the new operator to initialize object of this class through a pointer and display the data member through a member function.
Write a program to define two classes Alpha and Beta containing an integer each as data members. Define a function Sum() that will be a friend to both Alpha and Beta, That will take one object from each class as argument and return the sum of the data members of the argument objects.

Write a program that read an integer and display all its smallest factors. example if the input integer 120,then the output should be as follows: 2,2,2,3,5.


Write a function that determines whether an integer is a prime number.



Suppose you work for an employer that sells vehicles and your employer instructs you to design a program using the C++ language to determine the car that corresponds to the price that your program calculated. The price of the car is determined by adding three(3) prices: which are engine price, color price, and the price based on the color of the car. The engine price ranges between R500 000 – R2000000-00. The colour of the car ranges between R7000 – R10000

The price based on the power of the car ranges between R300 000 – R600 000. If the sum of the three(3) prices is between R700 000 – R1000000, the program must display that the car is in the range of a VW Golf 8 GTI. If the sum of the three(3) prices is between R1100000-1800000, the program must display that the car is in the range of a Mercedes Benz GLC63s. If the sum of the three(3) prices is between R1900 000 – R2500000, the program must display that the car is in a range of a BMW M8 challenger. DESIGN YOUR A PSEUDOCODE


Now, imagine your younger brother is working in a project with you. Both of you need to

solve negative number issue input by user. But you want to restrict information type

which can be send as error notification by your brother. So, write a program to handle the

scenario.


Write a C++ program for the following specification: Create a class Fuzzy with two


data members: x of type integer and memx of type float. memx should range from 0 to 1. Implement the operator overloading for the operators: &, I and ~. i. Operator function for & should return the Fuzzy object with minimum memx, after checking the equality of data member x in both objects.


Sample Data:


f1 (10,0.5) f2= (10,0.2)


f1&f2= (10,0.2) ii. Operator function for should return the Fuzzy object with 1-memx..


Sample Data:


f2=(10,0.2) ~f2=(10,0.8)


Implement the appropriate member functions to get the input and print the output.


Note: In & operator overloading, if x is not equal, then return fuzzy object (0,0)


Create a class Time with data members – Hours(int), Minutes(int) and Seconds(int). Include two

constructors – (i) to initialize the data members to zero, and (ii) to initialize the data members with

the values passed as arguments. Include two member functions – (i) AddTime() to add two objects

passed as parameters and set the invoking object with this result (ii) DispTime() to display the time

in the format hh:mm:ss. The main() program should create two initialized Time objects and one that

is not initialized. Add the two initialized values leaving the result in the third Time object. Display the

values of the third object.


LATEST TUTORIALS
APPROVED BY CLIENTS