Q BgQuestion:

      
Rookie
Karma Points: 10
(Virtual University of Pakistan)
Respect (100%):
posted by  Aisha1122 on 11/20/2009 1:51:42 PM  |  status: Live  |  Earned Karma: 10

Ada programing very simple program plz help me soon

Course Textbook Chapter Problem Needs by
Software Design N/A N/A N/A 11/21/2009 at 11:00:00 PM
Question Details:

Consider the following C++ class code.                                                        [20]

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 with the same name as the class name, which is called whenever the class object is created and the above C++ class has the following object declaration.

 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 the equivalent code and the same object declaration in Ada programming language.

Aisha

AAnswers:

Answer Question Ask for clarification

No one has answered this question yet.

Be the first to answer. Earn up to 3 karma points.

*This member has requested that only hints be provided    Learn more »

Answer Question Ask for clarificarion

Join Cramster's Community

Cramster.com brings together students, educators and subject enthusiasts in an online study community. With around-the-clock expert help and a community of over 100,000 knowledgeable members, you can find the help you need, whenever you need it. Join for free today » How Cramster is different from tutoring »