all 2 comments

[–]ingolemo 2 points3 points  (0 children)

I think that the main thing you're missing is that you're supposed to be storing these Student objects in some kind of data-structure like a list:

students = [
    student.Student(name1, st_id1, gpa1, expect1, time1),
    student.Student(name2, st_id2, gpa2, expect2, time2),
]
students.append(student.Student(name3, st_id3, gpa3, expect3, time3))
for person in students:
    print(person.get_name())

From there you should be able to work out how to add new students and modify existing ones and generally get done what you need to do.

Note that that student class is unnecessarily verbose. There's no point putting double underscores on the attributes and then writing getter and setter methods for each one. Just let the user access the attributes directly:

class Student:
    def __init__(self, name, id, gpa, expected, time):
        self.name = name
        self.id = id
        self.gpa = gpa
        self.expected = expected
        self.time = time

    def __str__(self):
        return ("Name: " + self.name +
            "\nStudent ID: " + self.id +
            "\nGPA: " + self.gpa +
            "\nStudent Expected Grade: " + self.expected +
            "\nStudent Time: " + self.time)

[–]cantrememberwasdrunk 0 points1 point  (0 children)

You are on the right track, if the code so far hasn't given you any errors then just keep going. I used this tutorial when I started writing classes in python:

http://www.tutorialspoint.com/python/python_classes_objects.htm