This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Queue import Queue | |
import random | |
class Doctor : | |
def __init__(self): #doctor class constructor | |
self.D_rate = random.randrange(20,61)//5 | |
self.currentpatient = None | |
self.timeRemaining = 0 | |
def tick(self) : # a method to calculate the time remaining for the patient at the doctor's |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Stack: | |
def __init__(self): | |
# creates an empty list as a private instance variable | |
self.__items = [] | |
def push(self, item): | |
# list#append adds an element to the end of the list | |
self.__items.append(item) |