#
# Copyright 2023, Ali Arya
# Anyone Can Code: Algorithmic Thinking
# Example 6.2p
#

#encapsulation thorugh classes in Python

#global data
numStudents = 0

class Student:
    """A simple Student class"""
    ID = 0
    Grades = []
    GPA = 0
    def Init(self):
        global numStudents
        self.ID = 1000 + numStudents
        numStudents += 1
        for i in range(0,20):
            self.Grades.append(-1)
        self.GPA = -1
    def Print(self):
        for i in range(0,20):
            print(self.Grades[i])
        print(self.GPA)

s1 = Student();
s1.Init()
s1.Print()
s2 = Student();
s2.Init()
s2.Print()
