This assignment is about using a Finite State Machine to help you design and write a program that processes strings. You are to write a Java application that reads lines of text from standard input and writes strings to standard output that represent floating point literals.
Write a Java program (called Here is a description of what a valid floating point literal looks like. Here are a few more requirements for your output strings (these requirements are not really part of the definition of a floating point literal).
You should design a Finite State Machine and then write a Java program that implements that FSM. As part of this assignment you should turn in an image of your FSM. Since the alphabet for your FSM is the whole ASCII character set, it is not practical to label edges with all of the possible input characters. So use the following conventions to simplify your FSM diagram. Use notation like 0-9 to mean all the characters between 0 and 9. Use the character * on an edge leading out of a state to mean that that edge is for all the characters not mentioned on any other edge leading out of that state (in other words, * will mean a kind of "default" transition). Here are some programs that can be used to describe and draw FSM's. If you find another program that you think works well, please let me know about it.
It is important that your program read from standard input and write to standard output because I will use that fact to automatically test your program on a lot of input strings. To further make the testing easier, make sure you call your Java program
Turn in a zip file called |