Question
In this assignment, you must create a Netbeans Java program that: prompts the user for a file location (use JFileChooser) reads a deterministic finite automata
In this assignment, you must create a Netbeans Java program that:
- prompts the user for a file location (use JFileChooser)
- reads a deterministic finite automata (DFA) from a text file (see format below),
- displays to the user the alphabet associated with the DFA that was read
- prompts the user for an input string (use JOptionPane),
- displays whether the DFA accepts the users input string (use JOptionPane).
- as Java comments give the Big-O analysis of the fileInput and run methods
- as a separate file, submit the DFA file you unit tested on.
Minimally, your program must implement the following domain model (additional classes and method will be required),
The input file containing the DFA must have the format corresponding to the following example two state DFA with alphabet = {, }
q0 q1 q0 a q1 q0 b q2 q1 a q1 q1 b q0 q2 a q2 q2 b q0 |
// The start state (states may be more than two characters)
// List of accept states delimited by spaces
// A list of transitions, one per line, with format
// fromState label toState
// Note you cannot assume the state names, start state,
// accepts states, alphabet labels, or number of transitions.
// Each of these can be determined from the input file
// containing the DFA.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started