25 lines
532 B
Python
25 lines
532 B
Python
class Student:
|
|
def __init__(self, name: str, year: int):
|
|
self.name = name
|
|
self.year = year
|
|
|
|
|
|
class Node:
|
|
next = None
|
|
previous = None
|
|
|
|
def __init__(self, student: Student):
|
|
self.student = student
|
|
|
|
|
|
# homework: implement this Queue which orders students by year.
|
|
# students with a higher year are placed in front of students with a lower year
|
|
class Queue:
|
|
pass
|
|
|
|
def append(self, student: Student):
|
|
pass
|
|
|
|
def popleft(self) -> Student:
|
|
return Student(name="", year=0)
|