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:
#include
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:
#include
int main() { int numValues; unsigned int i; vector // ENTER THE MISSING PIECE OF CODE HERE AND TEST IT IN C++ (THANK YOU) if (decBackup.size() > 0) { cout PART C: #include int main() { vector 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started