Question: QUESTION 2: PART A: #include #include #include using namespace std; class Student { public: Student(); Student(string studentName); Student(string studentName, int studentAge, double studentHeight); void Print();

QUESTION 2:

PART A:

QUESTION 2: PART A: #include #include #include using namespace std; class Student

#include #include #include using namespace std;

class Student { public: Student(); Student(string studentName); Student(string studentName, int studentAge, double studentHeight); void Print(); private: string name; int age; double height; };

Student::Student() { name = "NoName"; age = 0; height = 0.0; }

Student::Student(string studentName) { name = studentName; age = 0; height = 0.0; }

Student::Student(string studentName, int studentAge, double studentHeight) { name = studentName; age = studentAge; height = studentHeight; }

void Student::Print() { cout

int main() { string studentName; int studentAge; double studentHeight; cin >> studentName; cin >> studentAge; cin >> studentHeight;

// ENTER THE MISSING PIECE OF CODE HERE AND TEST IT IN C++ (THANK YOU)

student1.Print(); student2.Print(); student3.Print(); return 0; }

PART B:

{ public: Student(); Student(string studentName); Student(string studentName, int studentAge, double studentHeight); void

#include #include using namespace std;

int main() { int numValues; unsigned int i; vector febFeaturedItems; vector decFeaturedItems; vector decBackup; cin >> numValues; febFeaturedItems.resize(numValues); decFeaturedItems.resize(numValues); cout > febFeaturedItems.at(i); cout > decFeaturedItems.at(i); cout

// ENTER THE MISSING PIECE OF CODE HERE AND TEST IT IN C++ (THANK YOU)

if (decBackup.size() > 0) { cout

PART C:

Print(); private: string name; int age; double height; }; Student::Student() { name

#include #include using namespace std;

int main() { vector valElements(2); int initValues = 2; unsigned int i; int listSize; int startNum;

valElements.at(0) = 16; valElements.at(1) = 36;

cin >> listSize; cin >> startNum;

// ENTER THE MISSING PIECE OF CODE HERE AND TEST IT IN C++ (THANK YOU)

for (i = 0; i

return 0; }

-----------

Thank you >:O

The Student class has a default constructor, a constructor with one parameter, and a constructor with three parameters. Declare the following objects: - student1 with no arguments - student2 with studentName as an argument - student3 with studentName, studentAge, and studentHeight as arguments Ex: If the input is Ada 204.75, then the output is: Student: NoName, 0,0.00 Student: Ada, 0,0.00 Student: Ada, 20,4.75 Integer numValues is read from input. Then, numValues strings are read and stored in vector febFeaturedltems, and numValues strings are read and stored in vector decFeaturedltems. Perform the following tasks: - If febFeaturedltems is equal to decFeaturedltems, output "February's featured items are the same as December's featured items." - Otherwise: - Output "February's featured items are not the same as December's featured items." - Assign decBackup as a copy of decFeatureditems. Ex: If the input is 2 salmon aqua brown indigo, then the output is: February's featured items: salmon aqua December's featured items: brown indigo February's featured items are not the same as December's featured items. December's backup: brown indigo Given an integer vector valElements with two elements and input integers listSize and startNum, resize valElements to listSize. Then, assign the new elements of valElements with startNum 3i, where i is the index of each element in the vector. Ex: If the input is 421 , then the output is: 16361512

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!