This is an interactive console-based simulator for understanding and visualizing linked list data structures. The simulator provides a simulation for users to interact with and manipulate linked list nodes, facilitating a deeper understanding of data structure concepts.
To run this program, you will need to have the MinGW development environment installed on your machine. Once you have you can simply run
mingw32-make
This command will execute the default target in the makefile
, which is all rule based on the provided makefile
. This rule compiles all source files and links them into an executable.
Console Simulator
- LineList/SatirListesi Node Class: This component represents
Single Linked List
. The core building block of the linked list structure. Each node represents a data element in the list. The constructor initializes the head pointer with a unique approach, creating a head node containing the value -1 to serve as a separator and starting point.
LineList Nodes
-
AdministratorList/YoneticiListesi Class: This component represents
Doubly Linked List
. This class manages the SatirListesi nodes, providing functionality for calculating averages of stored data and arranging nodes in ascending order based on these averages. The class enables dynamic sorting and navigation within the linked list structure, enhancing user interaction and understanding of data organization principles. -
Menu Interface: Upon running the program, users are presented with a menu allowing them to navigate through the AdministratorList nodes, view the content of selected LineListesi objects, and perform various operations.
-
Navigation Controls: Users can move between nodes in the AdministratorList using
z
andc
keys. The content of the selected LineListesi is displayed downward from the menu, allowing easy visualization. -
Dynamic Display: The console interface dynamically updates to display 8 AdministratorList nodes at a time. Users can browse the entire list iteratively using
a
andd
keys. For example, if there are 18 nodes in total, nodes 0-7 will be shown initially. When the user presses thed
key, nodes 8-15 will appear on the screen, and when the nextd
key is pressed, nodes 16-17 will appear on the screen. -
Node Deletion: Users can remove selected nodes from the AdministratorList using the
p
key. Additionally, pressing thek
key deletes a random node from the RowList of the selected node, with the average recalculated and ManagerList updated accordingly.
Here is a list of terminal commands and their corresponding functionalities in the program:
z
key: Move to the previous node in the AdministratorList.c
key: Move to the next node in the AdministratorList.a
key: Browse to the previous set of 8 nodes in the AdministratorList.d
key: Browse to the next set of 8 nodes in the AdministratorList.p
key: Delete the selected node from the AdministratorList.k
key: Delete a random node from the LineList of the selected node in the AdministratorList.
This shows some of how to use the commands and console simulator
Console Simulator