CSCI 1300
Introduction to Computing
Fall 1997
Programming Assignment #2
Due Sept. 12
-
Write a program that:
- Creates a class called Student.
- The class should have at least 6 fields (private variables)
including at least one of type int, float, char, char* (string), and
boolean (True/False). Note that boolean isn't a real type - you have
to use an int and assign either 0 (False) or 1 (True) to it.
- The fields should represent information about the student that
might be found in a University database. The class should include the
student's name, student id, age, major, year in school,
resident/non-resident status, and any other relevant information you
can think of.
- Creates an instance of the Student class.
- Calls a member function called query_user() that queries the
user for the information to put in the fields of the class, filling in
the values as it goes along.
- Calls a second function called print_info() that prints the
values in the various fields of the class.
-
To hand in:
-
- Demo the running program to the TA.
- Hand in a printout of your program.