Answered You can hire a professional tutor to get the answer.
4 QUICK QUESTIONS Due in 1 hour! Thanks! Consider the following class: class GiantEnemyCrab { public:
4 QUICK QUESTIONS
Due in 1 hour! Thanks!!
Consider the following class:
class GiantEnemyCrab
{
public:
GiantEnemyCrab();
GiantEnemyCrab(int _x, int _y, string _color);
~GiantEnemyCrab();
int getX();
int getY();
int getColor();
void setX(int _x);
void setY(int _y);
void setColor(string _color);
private:
int x;
int y;
string color;
}
int main()
{
GiantEnemyCrab krabby(3, 5, "red");
cout << krabby.getX();
}
WHAT IS THE OUTPUT?
Consider the following class:
class GiantEnemyCrab
{
public:
GiantEnemyCrab();
GiantEnemyCrab(int _x, int _y, string _color);
~GiantEnemyCrab();
int getX();
int getY();
int getColor();
void setX(int _x);
void setY(int _y);
void setColor(string _color);
private:
int x;
int y;
string color;
}
int main()
{
GianyEnemyCrab kingler(3, 5, "red");
cout << kingler.color << endl;
}
WHATS THE OUTPUT?
What kind of method must be called when creating an object, and is responsible for setting default values for all of the attributes of that object?
Select one:
a. Printb. Constructor c. setFahrenheit()d. DestructorConsider the following function header:
void Temperature::print()
What is the purpose of the "Temperature::" portion of the header?
Select one:
a. It means that print is an object of type Temperatureb. It's just for decorationc. It indicates that print is a function that belongs to the Temperature class