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:
IBM PC compatible computers are computers similar to the original IBM PC, XT, and AT that are able to use the same software and expansion cards. Such computers were referred to as PC clones, or IBM clones
Answer:
The answer is "Title page".
Explanation:
Don uses the title page to create it's designed because this page contains basic information like names, dates, titles, and the names of the author. On this heading tab, it does not have a paper summary, and wrong choices can be described as follows:
- The Blank Page is the wrong choice because it doesn't contain any layout.
- The Bibliography is also a wrong choice because it describes the source of the information.
- The Cover Page is also a wrong choice because it is also known as the main page it describes the name, the title of the document but it can't contain the date.
As for this problem, the most probable and the most likely answer to this together with the presented options would be D. Social Networks.
Social networks is the term that defines Internet applications that help people connect with each other through a virtual environment by providing them with a collection of online tools. These tools include the instant messaging, the uploading of pictures and other tools that is found useful in connecting with people online. This has become phenomenon and the most popular social network as of the moment would be Facebook.