class MainController:
    def __init__(self):
        self.repository = NoteRepository()

    def get_all_notes(self):
        return self.repository.get_all_notes()

    def add_note(self, note: str):
        self.repository.add_note(note)

    def clear_all(self):
        self.repository.clear_all_notes()
示例#2
0
class MainController:
    def __init__(self):
        # Create note repository here
        # Your code here
        self.repository = NoteRepository()

    def get_all_notes(self):
        # Return all notes
        # Your code here
        return self.repository.get_all_notes()

    def add_note(self, note: str):
        # Add note
        # Your code here
        self.repository.add_note(note)

    def clear_all(self):
        # Clear all note
        # Your code here
        self.repository.clear_all_notes()
示例#3
0
 def __init__(self):
     # Create note repository here
     # Your code here
     self.repository = NoteRepository()
 def __init__(self):
     self.repository = NoteRepository()
 def clear_all(self):
     # Clear all note
     # Your code here
     NoteRepository.clear_all_notes(self)
     pass
 def add_note(self, note: str):
     # Add note
     # Your code here
     NoteRepository.add_note(self, note)
     pass
 def get_all_notes(self):
     # Return all notes
     # Your code here
     return NoteRepository.get_all_notes(self)
     pass
示例#8
0
 def get_all_notes(self):
     return NoteRepository.get_all_notes(self)
     pass
示例#9
0
 def clear_all(self):
     NoteRepository.clear_all_notes(self)
     pass
示例#10
0
 def add_note(self, note: str):
     NoteRepository.add_note(self, note)
     pass