Definition:a.. Variable: Begin with character set ['a' - 'z', '_'], variable can
contain char set ['a' - 'z', '_', '0' - '9']. Sensitive Case.
b.. Constant: Only contain the char set ['0' - '9'], and range is 0 to
2147483647.
c.. Assignment Expression:
a.. Assign constant to variable
For example:A1 = 1;o Assign variable to variableFor example:A1 = 1;A2 = 2;A1 = A2;a.. Assignment : '='
b.. Assignment separator: ';'
a.. Error (the point ed by * is optional implementation)
a.. Number format error
For example:A1 = 1a12;a.. Variable format error
For example:1A1 = 112;a.. Assignment expression format error
For example:A1 == 1a12;A1 = A2 = 1a12;a.. * Assignment separator expected
For example:A1 = 112a.. *Variable expected
For example:= 112;a.. *Constant expected
For example:A1 = ;a.. Assign error
a.. No initial value
For example:A1 = 1;A3 = A2;a.. Modify Constant
For example:1 = A1;Input:A text file contains a set of assignment expressions.For example:A1 = 1;A2 = 2;A3 = 3;A2 = A3;A1 = 3;Output
List all the variables that have the same value and list with
their value together.For example:After process the above expressions, you need output
the result like this:[A1, A2, A3] = 3;Requirement:a.. Design document (English only) is required. This document should write
before you write any code.
b.. Code should be consistent with java code convention.
c.. Program can identify and handle all the errors in definition part.
Test point:a.. Correctness
a.. Identify all error in expression
b.. Treat expressions correctly
c.. Output correct result
a.. Reliability
a.. Processing can not be interrupted by incorrect input or other reason
b.. Heap will not overflow when big amount of expressions are processed
a.. Performance
a.. Amount of the expressions can be treated in 1 second
a.. Memory
a.. Memory occupied when 100000 correct expressions are treated.