I need help creating a student class. I am suppose to create a student class with there first name, last name, credits and gpa. Can anybody help me get started? Below is what needs to be included. For number one, is the variables suppose to be parameters?
for instance, class Student: def __init__(self, name, hours, gpa): self.name = name 1. four instance variables: firstName (a string), lastName (a string), numCredits (an integer), gpa (a float); 2. an accessor method for each instance variable; 3. a mutator method for each instance variable; 4. an __init__ method that sets all the instance variables to values provided by the user; 5. a __str__ method that returns a string that contains all the data of the object in the order: firstName, lastName, numCredits, gpa.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor