20165226 Experiment 3 Agile Development and XP Practice

Experiment 3 Agile Development and XP Practice

Purpose

  • 1. Install the alibaba plug-in to solve the specification problem in the code. Use the tool (Code->Reformate Code) in IDEA to format the code, study the Code menu, and compare the functions.

  • 2. Add your learning partner to your project on the code cloud, download the Complex code of partner experiment 2, add no less than three JUnit unit test cases, test and upload the code to the code cloud

  • 3. Download your partner's code and complete the refactoring exercise.

  • Fourth, combine refactoring, git, and code standards to complete the learning of Java cryptography related content in pairs.

    Experiment content and steps

    (1) Install the alibaba plug-in to solve the specification problem in the code. Use the tool (Code->Reformate Code) in IDEA to reformat the following code, and then study the Code menu to find a function that makes you feel the best.

  • Install the alibaba plugin

    and restart it after successful installation.
  • Format the code and then normalize the code
    • format

    • Canonical code (using alibaba)

  • code menu
    After trying the Code menus one by one, Movethe four items I think are very easy to use.

(2) Add your learning partner to your own project on the code cloud. After confirming that the partner's project has been added to your own, download the Complex code of partner experiment 2, add no less than three JUnit unit test cases, and git add .; git commit -m "自己学号 添加内容";git push;submit the partner after the test is successful. A screenshot of the project's git log, including the above git commit information, plus your own student number watermark information.

  • Invite users

  • partner complex test

  • Partner git log commit

(3) Complete the refactoring exercises, download the code of your partner, perform at least three refactorings, submit a screenshot of the refactored code, and add your own student ID watermark. Submit your partner's code cloud project link.

  • Download partner code
  • Partner code refactoring

(4) Complete the learning of Java cryptography related content in pairs, combined with refactoring, git, and code standards. Submit the learning outcome code cloud link and representative results screenshots, with a student ID watermark.

Problems and solutions

  • Question 1: When compiling the code, the following error occurs

  • Solution to problem 1: The problem is that you have entered more codes, delete them, and run them again.
  • Question 2: When running the code, as shown below, there is no input.

  • Solution to problem 2: Through input java DigestPass abc, the problem is successfully solved.

Statistics PSP (Personal Software Process) time:

step time consuming percentage
design 50min 20%
Code 25 10%
test 20 10%
analysis Summary 30 10%

Experimental summary

In this experiment, I mainly learned how to standardize the code in the idea, how to invite partners to join my own project, and how to refactor the content. In the process of inviting partners to join our own project, we rebuilt a project on the basis of joining each other's 2018java projects, so that it is convenient to transfer files together and avoid accidental mistakes such as accidental deletion. At the same time, I learned about symmetric and asymmetric encryption algorithms (and DES and RSA algorithms) and how to share the knowledge of secret keys through the blog of learning Java cryptography algorithms. Some functions in the idea can not be successfully run, and then go to Ubuntu to operate, although the process is somewhat tortuous, but the total gain is great.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325066828&siteId=291194637