Consider the following C++ classcode. class MyClass { public: MyClass(char*, int
ID: 3614969 • Letter: C
Question
Consider the following C++ classcode.
class MyClass {
public:
MyClass(char*, int, int);
char* Name(void);
int First(void);
int Second(void);
protected:
char*name;
int first;
int second;
};
The above code also introduces a constructor, a function withthe same name as the class name, which is called whenever the classobject is created and the above C++ class has the following objectdeclaration.
MyCLass obj("str", 10, 2);
MyClass * ptr;
ptr = new MyClass("str", 10, 2);
For the above given code in C++, you are required to write theequivalent code and the same object declaration in Ada programminglanguage.
Explanation / Answer
Zick check ur notes if u still face problem mail me i will send u solution but mention at which part u face problem.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.