Answer:
#include <iostream>
using namespace std;
class ProblemSolution {
private:
int num1, num2;
public:
ProblemSolution(int n1, int n2) {
num1 = n1;
num2 = n2;
}
int calculateSum() {
int sum = 0;
sum = num1 + num2;
return sum;
}
void printSum() {
// calculateSum will return sum value that will be printed here
cout <<"Sum = "<< calculateSum();
}
~ProblemSolution() {
cout << "\nDestructor is called " << endl;
};
};
int main() {
int a, b;
cout << "Enter a: ";
cin >> a;
cout << "Enter b: ";
cin >> b;
// Initiallizing object pointer of type ProblemSolution
ProblemSolution *objPtr = new ProblemSolution(a,b);
// printing Sum
objPtr->printSum();
// delete objPtr to relaease heap memory :important
delete objPtr;
return 0;
}
Explanation:
we will initialize a pointer "objPtr" and initallize the constructor by passing 2 values a and b followed by the keyword "new". the keyword "new" allocates memory in the heap. we can access class member functions using arrow "->". it is important to delete objPtr at the end of the program so that the heap memory can be freed to avoid memory leakage problems.
Answer:
-Learn how to code
-Make Character
-Design
-Go to classes
-Go on video game platforms and make an video game(rblx is the best in my opinion)
-Play video games and see the scripts
-Decide what type of video game your making(horror, family game, battle game, etc.)
Explanation:
The answer to this question is C. Row
In excel, The number of Rows will be placed on the Left side of the sheet.
Rows will be utilized together with a column in order to differentiate specific cells with another.
This differentiation will be useful if user wanted to create a certain formula within the sheets
<span>31 2/8 minus 29 3/8
( 31 + 2/8 ) minus ( 29 + 3/8 )
2 plus ( 2/8 - 3/8 )
</span><span>2 minus 1/8
1 7/8 answer</span>