Skip to content

Commit

Permalink
Rename DFAmenu to DFAController and update references in Menu class
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony0380 committed Oct 31, 2024
1 parent 700fc07 commit 46790f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package computability;
package computability.Controllers;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import computability.CalculationModels.DFA.DFA;
import computability.CalculationModels.DFA.State;
import computability.CalculationModels.DFA.Transiction;
public class DFAmenu {
public class DFAController {
private String input;
private DFA dfa;
private BufferedReader reader;

public DFAmenu() {
public DFAController() {
reader = new BufferedReader(new InputStreamReader(System.in));
dfa = new DFA();
}
/**
* Create a new DFA menu for the given DFA.
* @param dfa The DFA to create the menu for.
*/
public DFAmenu(DFA dfa) {
public DFAController(DFA dfa) {
this.dfa = dfa;
reader = new BufferedReader(new InputStreamReader(System.in));
}
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/computability/Menu.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package computability;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import computability.Controllers.DFAController;

import computability.Controllers.DFAController;
public class Menu {

private String choice;
Expand Down Expand Up @@ -32,7 +35,7 @@ private boolean selectOption() {
}
switch (choice) {
case "1":
DFAmenu dfaMenu = new DFAmenu();
DFAController dfaMenu = new DFAController();
dfaMenu.run();
break;
case "2":
Expand Down

0 comments on commit 46790f7

Please sign in to comment.