-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cxx
More file actions
46 lines (43 loc) · 1.6 KB
/
main.cxx
File metadata and controls
46 lines (43 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// #include <iostream>
// data structures used by all the project
#include <DataStructure/ModernLinkedList.hpp>
#include <DataStructure/BinaryTree.hpp>
#include <DataStructure/BinaryTreeImpl.hpp>
#include <DataStructure/ModernQueue.hpp>
// All Services used by program
#include <Services/BookService.hpp>
#include <Services/UserService.hpp>
#include <Controllers/UserController.hpp>
#include <Controllers/BooksController.hpp>
#include <Controllers/LoanBookController.hpp>
#include <Views/BooksView.hpp>
#include <Views/UserView.hpp>
#include <MenuBuilder.hpp>
// #include <string>
// using namespace std;
int main(int argc, char* argv[])
{
// Initialize the data structures for books and users
ModernLinkedList<Book> bookList;
ModernLinkedList<User> userList;
ModernLinkedList<LoanBook> loanBookList;
ModernQueue<Node<Book>*> books;
BinaryTreeImpl<Book> tree(books);
// Initialize the services
BookService bookService(bookList, tree);
UserService userService(userList);
LoanBookService loanBookService(loanBookList);
// Initialize the views
BooksView booksView;
UserView userView;
LoanBookView loanBookView;
// Initialize the controllers
UserController userController(userService, userView);
BooksController bookController(bookService, booksView);
LoanBookController loanBookController(loanBookService, loanBookView, bookService,
booksView, userService, userView);
// Initialize the MenuBuilder with the controllers
MenuBuilder menuBuilder(bookController, userController, loanBookController);
menuBuilder.BuildMenu();
return 0;
}