CS 162 Lecture Notes - Lecture 8: Olivia Dunham, Leslie Knope, Toby Ziegler

33 views8 pages

Document Summary

11 string course_name; int num_credits; string term; string grade; private: Static variable. shared across all objects of class. 47 int id_num; string first_name; string last_name; string major; float gpa; int num_credits; int num_courses; course* courses; static int count; //accessors int get_id_num() const; string get_first_name() const; string get_last_name() const; string get_major() const; float get_gpa() const; int get_num_credits() const; int get_num_courses() const; string get_course_name(int) const; int get_course_credit(int) const; string get_course_term(int) const; string get_course_grade(int) const; //mutators void assign_id_num(int); void set_first_name(string); void set_last_name(string); void set_major(string); void calculate_gpa(); void calc_num_credits(); void set_num_courses(int); void set_course(string, int, string, string, int); static int get_count(); 30 student::student(int idn, string fn, string ln, string m, float gpa, int ncr, int nc) { 47 int student::get_id_num() const { return id_num; } 48 string student::get_first_name() const { return first_name; } 49 string student::get_last_name() const { return last_name; } 50 string student::get_major() const { return major; } 51 float student::get_gpa() const { return gpa; } 52 int student::get_num_credits() const { return num_credits; }

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions