Question: [Short answer] Which line numbers demonstrates accessors? List the line numbers from the smallest to the largest separated by comma. Your answer must not contain
![[Short answer] Which line numbers demonstrates accessors? List the line numbers](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f508ccc5478_60466f508cc33ee8.jpg)
[Short answer] Which line numbers demonstrates accessors? List the line numbers from the smallest to the largest separated by comma. Your answer must not contain any spaces. * float gpa; 5 class Student{ 6 private: 7 int id; 8 string name; 9 10 public: Student ():Student(" ",0,0){} 12 Student(string n, int d, float g){ 13 name = n; 14 id = d; 15 spa 16 } 17 void setID(int d){id = d;} 18 void setName(string n){name = n;} 19 void setGPA(float f){gpa = f;} 20 int getIDO const{return id;} 21 string getName() const {return name; } 22 float getGPAC) const {return gpa;} 23 }; [Short answer] Which line demonstrates constructor delegation? No spaces are allowed in your answer. * 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 class Student private: int id; string name; float gpa: public: Student():Student(" ",0,0)) Student(string n, int d, float g){ name = n: id = d; gpa = 8 } void setID(int d) (id = d;} void setName(string n) {name = n;} void setGPA(float f){gpa - f;} int getIDO constfreturn id;} string getName() const {return name; } float getGPAC) const {return gpa;} }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
