Question: 5 3 6 8 3 8 . 4 0 5 2 2 5 2 . qx 3 zqy 7 Jump to level 1 The Student
qxzqy
Jump to level
The Student class has a default constructor, a constructor with two parameters, and a constructor with three parameters. Declare
the following objects:
student with no arguments
student with studentName and studentAge as arguments
student with studentName, studentAge, and studentHeight as arguments
Ex: If the input is Aya then the output is:
Student: None,
Student: Aya,
Student: Aya,
#include
#include
#include
using namespace std;
class Student
public:
Student;
Studentstring studentName, int studentAge;
Studentstring studentName, int studentAge, double studentHeight;
void Print;
private:
string name;
int age;
double height;
;
Default constructor
Student::Student
name "None";
age ;
height ;
Student::Studentstring studentName, int studentAge
name studentName;
age studentAge;
height ;
Student::Studentstring studentName, int studentAge, double studentHeight
name studentName;
age studentAge;
height studentHeight;
void Student::Print
cout fixed setprecision "Student: name age height endl;
int main
string studentName;
int studentAge;
double studentHeight;
cin studentName;
cin studentAge;
cin studentHeight;
Your code goes here
studentPrint;
studentPrint;
studentPrint;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
