Skip to content

Instantly share code, notes, and snippets.

@ycui1
Last active April 17, 2022 22:27
Show Gist options
  • Save ycui1/86a1f2820fc9e44a2edf4ace7fa63b32 to your computer and use it in GitHub Desktop.
Save ycui1/86a1f2820fc9e44a2edf4ace7fa63b32 to your computer and use it in GitHub Desktop.
class Student:
def __init__(self, name, student_id, grade):
self.name = name
self.student_id = student_id
self.grade = grade
def register_course(self, course):
pass
def load_account(self, amount):
# fetch the amount from the server
current_balance = 100
current_balance += amount
# save the new balance to the server
def check_in(self, arriving_time):
record_time = arriving_time
required_time = "08:00"
on_time = record_time <= required_time
# save the data to the database
class Teacher:
def __init__(self, name, staff_id, course_covered):
self.name = name
self.staff_id = staff_id
self.course_covered = course_covered
def request_vacation(self, start_date, duration):
pass
def load_account(self, amount):
# fetch the amount from the server
current_balance = 100
current_balance += amount
# save the new balance to the server
def check_in(self, arriving_time):
record_time = arriving_time
required_time = "07:30"
on_time = record_time <= required_time
# save the data to the database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment