C++ Answers

Questions answered by 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


a. Critically explain why you would consider the concept of using methods in your 

program again running a couple of if else statements.


b. Declare a method with three arguments all of type int. The method should return the 

greatest of the three arguments, however if any two or all three are the same, you 

method should return that value ?

c. Embed you method in a complete program that requests for three variable all of type 

int and display the conditions explained in “b” above. 

d. Critically explain the logic behind the code?


Create a class student with attributes name, register number, department, an array for storing 5 subject marks, total. In main(), find the student who has scored the highest total using the '>' operator (friend) to compare the objects and display the details of the student. Include necessary member functions and constructors.

Write a C++ application that can compute the letter grade of a student after accepting the student’s mid and final mark. The program should only accept mid result [0-40] and final [0- 60]. If the data entered violates thisrule, the program should display that the usershould enter the mark in the specified range. The program is also expected to run until the user refuses to continue. 


Write a program segment to calculate and display the total yearly income of an employee which is calculated from his total salary and annual bonus. The user will be asked to enter the employee's monthly salary and year of service. The employee's year of service will determine the bonus he receives.


Write a function to calculate the distance a vehicle has traveled for a given time period

at a given speed. The distance travelled can be calculated from the following formula:

distance = speed * time period

For example, if a car travels at 110 km per hour for three hours, the distance travelled

is 330 km.


Declare an array to store the marks of 100 students and then write the code to input

data into the array.


Write a complete program that will convert Malaysian Ringgit to Japanese Yen and

Singapore Dollar. The user will have to input an amount in Malaysian Ringgit and the

program will then display its equivalent amount in Japanese Yen and Singapore Dollar


c++ program to get two integers from the user x,y and calculate x power y using recursion and pointers


Write a program to input a year and find out that the year is leap year or not.

write a program that computes the average value of an array and prints the difference between each value and the average value you have just computed let the maximum number of items in the array be 8


LATEST TUTORIALS
APPROVED BY CLIENTS