## 2 MaGraDa Software Tool
### Description of the Visualisation and Computational Tool  
As mentioned above, the MaGraDa Java application includes two modes of operation with similar options: the text mode and the graphic mode. Both modes offer the same  
Figure 1: Java structure of MaGraDa.  
functionalities, and the differences between them lie in the way in which the tool presents both the graphs themselves and the results of the algorithms and their explanation. In the text mode, the theoretical definition of a graph becomes relevant, while the graphic mode exploits the fact that most concepts and problems in graph theory can be expressed through the use of drawings. MaGraDa visualises graphs in the customary way in graph theory; that is, given a graph with a set of vertices \(V\), MaGraDa uses points to represent vertices, line segments from \(u\in V\) to \(v\in V\) to represent an edge \(\{u,v\}\), and an arrow pointing from \(s\in V\) to \(t\in V\) to indicate the direction of an arc \((s,t)\) that starts at \(s\) and ends at \(t\) (see e.g., [33; 40]). In each of the two modes, the results are presented to facilitate a comprehensive understanding of the algorithms and to demonstrate how they can be implemented. In addition, due to the ease of use of MaGraDa, students are able to use it on their own, outside the classroom, from the outset of the course.  
MaGraDa works with directed and undirected graphs, and weighted and unweighted graphs. It can keep various graphs in memory so that at any time, the user can choose which graph to work with. In the text mode, an initial dialogue box displays the most relevant characteristics of the selected graph, such as the name of the graph, the number of vertices, the number of edges or arcs, and whether it is directed and weighted or not. For example, the initial text mode dialogue box in Figure 2a shows that the current graph, called Graph_1 and defined as \(G=(V,A),\ V=\{1,2,3,4,5\},\ A=\{(1,2),(2,4),(4,2),(1,3),(3,5),(5,1),(5,4)\}\), is directed and unweighted, and has five vertices and seven arcs. In the graphic mode, a graphical representation of the current graph is presented (see Figure 2b). We note that the graphic mode has four different zones: a menu bar for access to all the options it offers, a toolbar with the most commonly used options, a canvas on which graphs are drawn, and a status bar that gives information and helps the user with the handling of graphs and algorithms.  
The Java application for graph processing is structured into six menus. Two of these are not related to graph theory, but allow the user to select the mode (text or graphic) and provide some other options (see Figure 3), such as the language used in the software (it currently offers three languages: English, Spanish and Valencian/Catalan), the aspect, or Java L&F, which allows the user to select between several L&Fs (Nimbus, Windows, Dark,...), the file format used to open and save a graph, and a check box to set the visibility of the toolbar. The options related to graph theory are presented in the other four menus, as follows:  
* _Graph_ menu: This allows for the handling of graphs.
* _Basic calculations_ menu: This gives some basic properties of the current graph.
* _Algorithms_ menu: This shows the algorithms that are available to apply to the current graph.
* _View algorithms_ menu: This shows a detailed description of the algorithms included in the software.  
Figure 2: Initial dialogue boxes of MaGraDa.