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, 23.06.2019 12:10
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Why should you evaluate trends when thinking about a career path?
Answers: 1
You know the right answer?
Given problemsolution class. use a pointer to object of "problemsolution" class to invoke the "calcu...
Questions
question
Mathematics, 12.03.2020 17:31
question
Mathematics, 12.03.2020 17:31
question
History, 12.03.2020 17:31
question
Mathematics, 12.03.2020 17:31