Implementação de um autômato em JAVA.
Diante do seguinte problema:
Construa um AFD para reconhecer todos os números romanos de 1 até 100.
Uma vez que esse tiver sido denido, implemente um reconhecedor para testar o mesmo.
Desenvolvi o seguinte algoritmo:
/*Classe Principal*/
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Principal.java
*
* Created on 25/09/2009, 18:31:13
*/
package automato;
import javax.swing.JOptionPane;
/**
*
* @author tiago
*/
public class Principal extends javax.swing.JFrame {
//Estados Aceitáveis
int estadoaceitaveis[] ={2,3,4,5,6,7,8,9,10,11,12,13,14,15};
/** Creates new form Principal */
public Principal() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked...