Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The next few questions deal with the class definition (.h file) shown below. The

ID: 640006 • Letter: T

Question

The next few questions deal with the class definition (.h file) shown below. The class SummerVacation represents a trip taken somewhere.

#include <string>
using namespace std;

class SummerVacation {

void pack();

public:

int getLength();
double getCost();
string getPlace();
SummerVacation( int length, string place, double cost );

private:

void relax();
int my_Length;//days traveled
string my_Place; //place traveled to
double my_Cost; //how much was spent

};

Question 10

Not yet answered

Marked out of 2.00

Flag question

Question text

An instance of the class SummerVacation may be created by passing the constructor

Select one:

a. exactly three arguments

b. one, two or three arguments

c. exactly two arguments

d. exactly one argument

Question 11

Not yet answered

Marked out of 2.00

Flag question

Question text

In the class SummerVacation, how many public methods variables does it define?

Select one:

a. 3

b. 0

c. 4

d. 5

Question 12

Not yet answered

Marked out of 2.00

Flag question

Question text

Which of the statements below is true about the method pack?

Select one:

a. It is a public method of the class SummerVacation.

b. None of the choices listed here are correct about the method pack.

c. It is a method that requires an argument be passed by the calling code.

d. It is a private method of the class SummerVacation.

e. It is a method which can be called from driver code.

Question 13

Not yet answered

Marked out of 2.00

Flag question

Question text

In the class SummerVacation, how many constructors does it define?

Select one:

a. 4

b. 0

c. 2

d. 1

Question 14

Not yet answered

Marked out of 2.00

Flag question

Question text

In the class SummerVacation, how many private member variables does it define?

Select one:

a. 0

b. 3

c. 5

d. 4

Question 15

Not yet answered

Marked out of 2.00

Flag question

Question text

In the class SummerVacation, how many public member variables does it define?

Select one:

a. 1

b. 2

c. 0

d. 3

Question 16

Not yet answered

Marked out of 2.00

Flag question

Question text

Which of the statements below is true about the method getCost?

Select one:

a. None of the choices listed here is correct about the method getCost.

b. It is a mutator method of the class SummerVacation.

c. It is an accessor method of the class SummerVacation.

d. It is a method which cannot be called from driver code.

e. It is a method that requires an argument be passed by the calling code.

Explanation / Answer

#include <string>
using namespace std;
class SummerVacation {
void pack();
public:
int getLength();
double getCost();
string getPlace();
SummerVacation( int length, string place, double cost );
private:
void relax();
int my_Length;//days traveled
string my_Place; //place traveled to
double my_Cost; //how much was spent
};
Question 10
An instance of the class SummerVacation may be created by passing the constructor
Select one:
a. exactly three arguments
Question 11
In the class SummerVacation, how many public methods variables does it define?
Select one:
a. 3
Question 12
Which of the statements below is true about the method pack?
Select one:
d. It is a private method of the class SummerVacation.
Question 13
In the class SummerVacation, how many constructors does it define?
Select one:
d. 1
Question 14
In the class SummerVacation, how many private member variables does it define?
Select one:
b. 3
Question 15
In the class SummerVacation, how many public member variables does it define?
Select one:
c. 0
Question 16
Which of the statements below is true about the method getCost?
Select one:
c. It is an accessor method of the class SummerVacation.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote