Answer:
Explanation:
The following class is written in Java. I created the entire Circle class with each of the methods and constructor as requested. I also created a tester class to create a circle object and call some of the methods. The output can be seen in the attached picture below for the tester class.
class Circle {
double radius;
public Circle(double radius) {
this.radius = radius;
}
public double getRadius() {
return radius;
}
public void resetRadius() {
radius = 0;
}
public double calculateArea() {
double square = Math.pow((Math.PI * radius), 2);
return square;
}
}
Answer:
Sorry but it donest show the picture
Explanation:
The type of the client subscription used is paid subscription.
<h3>What is Paid Subscription? </h3>
Paid Subscription refers to the payment made already on the product purchased or the services received. It is a kind of the recurring payment whose transactions repeat after a regular basis.
If the customer continue to receive the service then he or she has to pay the subscription.
After paying the membership costs, customers of Quickbooks Online for accountancy firms can access the Quickbooks Online Advanced desktop application.
Learn more about Paid Subscription here:
brainly.com/question/13508895
#SPJ1
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.