Example #1
0
def main():
    student_repo = RepoWritingFileStudent()
    assign_repo = RepoWritingFileAssign()
    grade_repo = RepoWritingFileGrade(student_repo, assign_repo)
    validator_student = ValidatorStudent()
    validator_assign = ValidatorAssign()
    validator_grade = ValidatorGrade()
    controller_undo_redo = UndoController()
    controller_student = ControllerStudent(student_repo, validator_student,
                                           controller_undo_redo)
    controller_assignment = ControllerAssignment(assign_repo, validator_assign,
                                                 controller_undo_redo)
    controller_grade = ControllerGrade(student_repo, assign_repo, grade_repo,
                                       validator_grade, controller_undo_redo)
    console = Console(controller_student, controller_assignment,
                      controller_grade, controller_undo_redo)
    console.pre_run()
Example #2
0
    bookRepo = RepoBookBinaryFiles(repoFiles[0])
    clientRepo = RepoClientBinaryFiles(repoFiles[1])
    rentalRepo = RepoRentalPickleFiles(bookRepo, clientRepo, repoFiles[2])
#bookRepo = RepoBookBinaryFiles()
#clientRepo = RepoClientBinaryFiles()
#bookRepo = RepoBookTextFiles()
#bookRepo = RepoBook()
#clientRepo = RepoClient()
#clientRepo = RepoClientTextFiles()
#rentalRepo = RepoRental(bookRepo, clientRepo)
#rentalRepo = RepoRentalTextFiles(bookRepo, clientRepo)
validBook = BookValidator()
validClient = ClientValidator()
undoList = UndoRedo()
validRental = RepoValidator(bookRepo, clientRepo)
bookList = ServiceBook(bookRepo, validBook, undoList)
clientList = ServiceClient(clientRepo, validClient, undoList)
rentalList = ServiceRental(bookRepo, clientRepo, validRental, rentalRepo,
                           undoList)

if repoFiles[3] == "GUI":
    console = GUI(bookList, clientList, rentalList, undoList)
    if repoChoose == "memory":
        console.generate()
else:
    console = Console(bookList, clientList, rentalList, undoList)
    if repoChoose == "memory":
        console.generate()

console.run()
Example #3
0
'''
Created on 3 feb. 2019

@author: Vasilica
'''
from domain.Domain import Board
from repo.Repository import RepoGame
from controller.Controller import GameController
from console.Console import Console
from valid.Validation import GameValidator

repo = RepoGame()
valid = GameValidator(repo)
controller = GameController(repo, valid)
console = Console(controller)
 
console.run()
Example #4
0
def main():
    validator = Validator()
    repo = Repository()
    controller = Controller(repo, validator)
    console = Console(controller)
    console.run()