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.
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.
解决方案 »
- 又是线程问题
- 帮我看看哪里错了。AJAX
- 紧急求助:怎样实现加入组播,并监听消息?
- 如何得到正在进行的java程序的processID.
- 编译出错高手指教!!!!!!!!!!!
- 求12306验证码识别的JAVA代码
- 我用jbuilder7編譯為什么總是提示"invalid output directory" 小弟初學.請多多指教.謝謝各位.
- 有个奇怪的问题!!!!
- 如何把自己编好的.class文件拿给别人运行啊,如果别人没有装jdk?
- e:\java\tomcat是我的tomcat目录;e:\java\j2sdk是我的j2sdk1.4.0的目录,
- 线程问题
- 来自java初学者的史上最菜问题之二,期待各位答复
如何进行编译运行?怎么使用windows的vi?
编译的话到命令行下(cmd),先敲一个命令java,看看路径设了没有。如果提示没有这个命令的话到系统-》用户环境,去把jdk的安装路径加在path里面。
编译:javac yourfile.java