subject

Given problemsolution class. use a pointer to object of "problemsolution" class to invoke the "calculatesum" and "print" methods of "problemsolution".

write a function:
void solution(int n1, int n2)

that accepts two integers n1 and n2. the function should instantiate "problemsolution" object with n1 and n2 values and call "calculatesum" and "print" method by creating a pointer to the object of "problemsolution".

input
12 5

output
17
assume that,

n1, n2 and sum are integers within the range [-1,000,000,000 to 1,000,000,000].
given code to work with:

#include
#include
#include
using namespace std;

class problemsolution{
int n1,n2,result;
public:
problemsolution(int n1, int n2){

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
You picked the corridor which led you here. if the guards find you, they're going to be really angry! what is the synonym of angry
Answers: 1
question
Computers and Technology, 22.06.2019 02:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print?
Answers: 3
question
Computers and Technology, 22.06.2019 07:20
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display “enter a value to be cubed.” input value; set cube = value ^ 3 display value, “ cubed is “, cube end while
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
You are new to microsoft certification and want to start out by getting a certification geared around windows 8. what microsoft certification should you pursue?
Answers: 1
You know the right answer?
Given problemsolution class. use a pointer to object of "problemsolution" class to invoke the "calcu...
Questions
question
History, 22.01.2020 00:31
question
History, 22.01.2020 00:31
question
Computers and Technology, 22.01.2020 00:31
question
Geography, 22.01.2020 00:31
Questions on the website: 13722363