public void Execute(string[] args, StudentsDatabase database) { string name = args[1]; Student student = database.Find(name); if (student != null) { this.engine.Write(student.ToString()); } }
public StudentSystem(IIoEngine ioEngine) { this.students = new StudentsDatabase(); this.commands = new Dictionary <string, ICommand> { { "Create", new CreateCommand() }, { "Show", new ShowCommand(ioEngine) } }; this.ioEngine = ioEngine; }