2017-2018-2 20172315 "Java Programming" course pair programming Exercises _ arithmetic

Source: Internet
Author: User
Tags arithmetic

Pair of people
    • Hu Zhihui: infix suffix and calculation of suffix expression
    • Peng Lin: Fractional-related procedures and solving small problems
    • Ludasui: Topic generation and Compilation of driver classes

      Demand analysis
Goal

1. Automatic generation of topics

可独立使用(能实现自己编写测试类单独生成题目的功能)可生成不同等级题目,类似于:1级题目:2 + 5 =;10 - 5 =之类的两个数,一个运算符的题目

2. Problem calculation (question)

可独立使用实现中缀表达式转为后缀表达式并计算判断用户答题正误,并输出正确结果

3. Support True Score

可独立使用实现分数算式的计算

3. Problem-solving (expansion of demand, plus sub-items)

可独立使用实现对自动生成表达式的去重:如下若生成:2 + 5 =;5 + 2 =为同一题目
Analysis
    • Need to design an empty stack, rely on the stack for infix suffix and suffix calculation
    • A class is required to generate the topic, and the class should have the method of grading the topic.
    • Fractional correlation method is needed to realize the calculation of fractions
    • A driver class is required to implement all of the above functions

      Further expansion
    • For the score has not been fully realized, next week to make up
    • For the problem of the weight has not been achieved, next week to fill

      Design ideas
    • First compile a stringtoarithmetic class, realize infix suffix and calculate it
    • Then create the fractional class to achieve the fractional calculation
    • Create a problem generation class, randomly generated topics
    • Finally, the main class is created, which realizes the user's reply and the function of judging right and wrong.

      Difficulties encountered and solutions
    • With regard to the problem of de-weight, the implementation of this function has been studied for a long time and has not come up with an exact method. However, I believe this problem will be solved next week.
    • There are some minor problems in judging the correct rate of the problem.

      After discussion within the group, a solution was drawn, such as

Uml

Psp
PSP2.1 Personal software Process Stages Estimated time-consuming (minutes) actual time elapsed (minutes)
Planning Plan 55 75
Estimate Estimate how long this task will take 3 5
Development Development 2400 3000
Analysis Demand analysis (including learning new technologies) 300 360
Coding Standard Code specification (to develop appropriate specifications for current development) 30 15
Design UML Design Project UML class diagram 60 120
Coding Specific code 2000 2400
Code Review Code review 30 40
Test Test (self-test, modify code, commit changes) 240 300
Size Measurement Calculation effort (actual time) 5 5
Postmortem & Process Improvement Plan Summarize afterwards and propose process improvement plan 30 60
Total 5153 6380

2017-2018-2 20172315 "Java Programming" course pair programming Exercises _ arithmetic

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.