Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

finish following program, so it can compile and run successfully public class Tokenizer { static in trans[][] = {{},{....}; static int symNum(char sym){ switch(sym){ case

finish following program, so it can compile and run successfully

public class Tokenizer { static in trans[][] = {{},{....};

static int symNum(char sym){ switch(sym){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return 0; case 'e': return 1; case 'E': return 2; case '+': return 3; case '-': return 4; default: throw new RuntimeException("invalid symbol"); } } public static boolean num(String str){ int state = 0; int I = 0; while ( i < str.length()){ state = trans[state][symNum(str[i])]; i++; } if (state = 1 || state == 3 || state = 6){ retunr true; } else { retunr false; } }

public static void main(string []args){

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions

Question

=+16.5. About Theorem 16.8:

Answered: 1 week ago

Question

Describe the appropriate use of supplementary parts of a letter.

Answered: 1 week ago