public AddMemberController(AddMemberView addMemberView, MemberDALModel memberDAL) { this.addMemberView = addMemberView; MemberModel member = new MemberModel(addMemberView.getName(), addMemberView.getSocialSecurityNumber()); memberDAL.saveMember(member); StartMenuController startMenu = new StartMenuController(); }
public void showSelectedMenu() { this.memberDAL = new MemberDALModel(); ListMembersView listMembersView = new ListMembersView(); StartMenuView.MenuChoice menuChoice = this.startView.GetMenuChoice(); if (menuChoice == StartMenuView.MenuChoice.AddMember) { AddMemberView addMemberView = new AddMemberView(); addMemberView.showAddMemberView(); AddMemberController addMemberController = new AddMemberController(addMemberView, memberDAL); } else if (menuChoice == StartMenuView.MenuChoice.CompactListMembers || menuChoice == StartMenuView.MenuChoice.VerboseListMembers) { if (menuChoice == StartMenuView.MenuChoice.CompactListMembers) { listMembersView.showCompactList(); } else { listMembersView.showVerboseList(); } MemberController listMemberController = new MemberController(listMembersView); } }