Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the example provided in class, create a class declaration for student data

ID: 3885769 • Letter: U

Question

Using the example provided in class, create a class declaration for student data with the following specifications:

The class name should be StudentType.

There should be 5 public members:

   - name (first and last together separated by a space)
   - classification (freshman = f, sophomore = s, junior = j, senior = sr)
   - hometown (city, state)
- id (a 5 digit number)
- show_public_info (will show all public data for a student)

There should be 1 private member:

   - gpa (based on a 4.0 scale)

The show_info member is a function but does not need to be implemented.

The member variables do not need default values.

code must be done in c++

Explanation / Answer

//a class declaration for student data
class StudentType {
    public:
        string name;
        char classification;
        string hometown;
        int id;
        void show_public_info() {
            //show all public data for a student
        }
    private:
        float gpa;
};

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote