Project Specification
For each of the tasks, we provide stub classes that contain the API that you must implement. You should not modify the signatures for the pre-defined functions in these classes. If you modify the signatures, our grading test code will not work and you will get no credit for the project.
If a class already has some data members and methods, you should not remove them.
For example, the Automata class has two pre-defined attributes states and start.
class Automata:
def __init__(self, states: list[State], start: State):
self.states = states
self.start = start
# <<<<< Start of Your Implementation >>>>>
# Feel free to add more attributes if needed
...
# <<<<< End of Your Implementation >>>>>
By convention, we use a special comment
# <<<<< Start of Your Implementation >>>>>
...
# <<<<< End of Your Implementation >>>>>
to indicate the region where you should add your implementation. You can add any code in this region, including new attributes, methods, and helper functions.