2017-2018-2 20172310 "Java Programming" course pair programming Exercises _ arithmetic _ Second week blog requirements
Students in the group need to publish their own blog
The blog should contain the following content:
Related processes
Key code Explanation
Difficulties encountered and their solutions
Write the part of the project that you are responsible for
Division of individual contribution (percentage contribution to each member of the group, contribution of each member to 100%)
Make a comment on a pair of small partners blog links (Focus on where to improve)
The code Cloud link for the project
Give group pair programming photos
If you want to show the team's common results in the blog content, please explain
If you have a reference or reference to the design, implementation, please explain
Explanation of the key code
The key code to build the part of the expression:
Written in last week's blog: 2017-2018-2 20172310 "Java Programming" course pair programming Exercises _ arithmetic _ first week
The key code for the part of the infix expression to the suffix expression:
The design idea is: first create a two-dimensional array as the basis for judging operator level, and then instantiate a StringTokenizer class object, the resulting expression as a string into the St, and a space as a separator.
The use of StringTokenizer is
Then determine whether a is stored in the operator, and then according to the infix suffix of the rules to encode.
- The key code for the part of the suffix expression calculation:
The problems encountered
- Prior to our thinking, when the user enters the answer, we let the user enter the numerator, the denominator separately,
- Solution: This kind of input method is inconvenient, also does not favor the application of the program. The code is then modified.
This is the effect after the modification.
- In implementing a loop of the expression, I encountered a problem that is-how to put a string into a string, is to implement the concatenation of strings, to achieve the purpose of the loop.
It is only possible to use + = when the numeric value of int is used, and the string can also use + =? I made an attempt.
Own part of the responsibility
In fact, this week's own contribution value is really very low (mainly this week on the weekend spent a day on the  ̄▽ ̄) ~*
2017-2018-2 20172310 "Java Programming" course pair programming Exercises _ arithmetic _ second week