This graph shows the package/class-level dependencies within the src directory.
graph TD
Main[Main.java] --> AuthService[service.AuthService]
Main --> LibraryService[service.LibraryService]
Main --> ConsoleView[view.ConsoleView]
Main --> InputUtil[util.InputUtil]
Main --> model[model.*]
AuthService --> UserDAO[dao.UserDAO]
AuthService --> PasswordUtil[util.PasswordUtil]
AuthService --> model.User
LibraryService --> BookDAO[dao.BookDAO]
LibraryService --> IssueDAO[dao.IssueDAO]
LibraryService --> LibraryException[exception.LibraryException]
LibraryService --> model.Book
LibraryService --> model.IssueRecord
dao[dao.*] --> DBConnection[util.DBConnection]
dao --> model[model.*]
model.*(Data objects) have NO dependencies on any other package in the application. They are pure data.dao.*depends heavily onjava.sql.*,model.*, andutil.DBConnection. DAOs do not know about services or views.service.*relies ondao.*for data andmodel.*for exchanging data structures. Services are isolated from user I/O.view.*depends onmodel.*(for rendering tables) and standard output streams (System.out). It knows nothing of DAOs or DB connections.Maincoordinates the flow. It touchesservice.*,view.*, andutil.InputUtilto orchestrate actions.
src/util/DBConnection.java: Changes to database driver or credentials go here. Breaking this breaks the whole app.src/Main.java: Coordinates all app flow and state (currentUser). Modifying session behavior starts here.src/service/LibraryService.java: The core logic hub. Changing borrowing rules (e.g., maximum books) requires modifying this file.