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 19:00
Jill wants to become a network professional. which certification would be useful for her? a. mcse b. pmp c. comptia a+ d. ccie
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
Suppose an astronomer discovers a large, spherical-shaped body orbiting the sun. the body is composed mostly of rock, and there are no other bodies sharing its orbit. what is the best way to categorize this body? a. planet b. moon c. comet d. asteroid
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
You know the right answer?
Given problemsolution class. use a pointer to object of "problemsolution" class to invoke the "calcu...
Questions
question
Biology, 17.04.2020 23:26
question
Mathematics, 17.04.2020 23:26
question
Mathematics, 17.04.2020 23:26
question
Mathematics, 17.04.2020 23:27
question
Mathematics, 17.04.2020 23:27
Questions on the website: 13722359