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

Create a 'DISTANCE' class with the following members:

Data Members

b) feet and inches

Member Functions

d) To input distance through constructor

e) To output distance

f) To add two distance objects

Write a main        function to create objects of DISTANCE class. Input two distances (one through

implicit call and other explicit call and output the sum. 


Write a program to perform addition of two complex numbers using constructor overloading.

The first constructor which takes no argument is used to create objects which are not initialized, second which takes one argument is used to initialize real and imaginary parts to equal values and third which takes two argument is used to initialize real and imaginary to two different values.


Write a program to perform addition of two complex numbers using constructor. Complex numbers are given through user input.


Create a class which stores name, roll number and total marks for a student.Input the data for a student and display it.


Surname Score
1. Sam Williams 60
2. John Phoenix 85
3. Simon Johnson 75
4. Sarah Khosa 81
5. Mat Jackson 38
6. Nick Roberts 26
7. Isaac Wayne 74
8. Anna Mishima 34
9. Daniel Rose 64
10. Aaron Black 83
11. Jack Mohamed 27
12. Kathrine Bruckner 42
Create a C++ program that has 3 Stacks.
Insert, into the first stack, all the data above (which is the data of student’s names,
surnames and the marks they obtain in a particular assessment)
Display the content of the stack on the screen (console)
Then, remove all the students whose surname starts with the alphabets ‘R’, ‘J’ and
‘M’, from the first stack and insert them into the second Stack.
Display the contents of Stack1 and Stack2.
Finally, remove all the students whose marks are less than 50 from both Stack1
and Stack2 and insert them into the Third Stack.
Display the contents of all the 3 Stacks. (30)
Write a method that receives elapsed time for an event in seconds as a parameter. The
method then displays the elapsed time in hours, minutes, and seconds. For example, if the
elapsed time is 9630 seconds, then the method will display is 2:40:30. Write a main()
method that will prompt a user for elapsed time for an event in seconds, and use received
value to demonstrate that the method works correctly. Save the file as ElapsedTime.cpp
3

Consider an array MARKS[20][5] which stores the marks obtained by 20 students in 5 subjects. Now write a program to

(a) find the average marks obtained in each subject.

(b) find the average marks obtained by every student.

(c) find the number of students who have scored below 50 in their average.

(d) display the scores obtained by every student.


WAP to create the classes as per the hierarchy shown below.Include the data members in the relevant classes to store the following information:-

Name, Id, No of matches played,No. of runs scored, No. of wickets taken.

Calculate the batting average and wickets per match for an all rounder player.Use parameterized constructor to initialize the object.

[ Batting average=No. of runs scored/No. of matches played

 Wickets per match= No. Of wickets taken/ No. of matches played ]

 



WAP to Create a class ‘Book’. Derive two classes from it namely ‘’Print_Book’ and ‘E_Book’. Store the following details about the book in the relevant classes. Title, Author, Price, No of pages and Size in KB. Input information for ‘m’ number of print books and ‘n’ number of eBooks and display it.


WAP to create a class which stores a dynamic integer array and its size. Include all the constructors and destructor in the class. Store two arrays of different size in two objects. Join the two arrays and and store it in another object using a member function.


LATEST TUTORIALS
APPROVED BY CLIENTS