This project is an Android app that allows users to create and interact with graphs. Users can add vertices and edges, and perform Depth First and Breadth First traversals, with the traversed vertices and edges highlighted in red to demonstrate the order of traversal.
- Add vertices and edges to a graph
- Perform Depth First Search (DFS)
- Perform Breadth First Search (BFS)
- Visual feedback with traversed elements highlighted in red
This project was developed as a school assignment and is coded entirely in Java following the MVP (Model-View-Presenter) architecture.
- Model: Contains all graph-related logic including edges, vertices, and traversal algorithms.
- Presenter: The
GraphPresenterclass manages user interactions and updates the graph. - View: Consists of
DrawingViewandMainActivityclasses for displaying the graph and user interface.
- Android Studio
- Java Development Kit (JDK)
- Clone the repository
- Open the project in Android Studio.
- Build and run the project on an emulator or physical device.
- Open the app on your Android device.
- Use the spinner at the top to select an action (Add Vertex, Add Edge, DFS, BFS).
- Interact with the graph as per your selection.
