20165320 Java Experiment Three: Agile Development and XP practice

Source: Internet
Author: User
Tags stringbuffer

Experimental content:

Agile Development and XP practice an experimental requirement: Install the Alibaba plugin, solve the code problem in the idea using the tool (Code->reformate code) to reformat the code below, and then examine the Code menu to find a feature that makes you feel best. Submit, plus your own study number watermark. Experimental steps:

1. Install the Alibaba plugin as required by the teacher's blog

2. Create a new Codestandard project

Enter the following code:

public class CodeStandard {public static void main(String [] args){StringBuffer buffer = new StringBuffer();buffer.append(‘S‘);buffer.append("tringBuffer");System.out.println(buffer.charAt(1));System.out.println(buffer.capacity());System.out.println(buffer.indexOf("tring"));System.out.println("buffer = " + buffer.toString());if(buffer.capacity()<20)buffer.append("1234567");for(int i=0; i<buffer.length();i++)System.out.println(buffer.charAt(i));}}

3. Modify the code as required by the plugin prompt:

4. The modified code:

Agile development and XP practice two experimental requirements: in the code cloud to put their learning partner into their projects, confirm the partner's project to join their own, download partner experiment Two complex code, add not less than three JUnit unit test cases, after the successful test git Add. Git commit-m "Add content by yourself"; git push; submit a partner project git log, which contains information about git commit above, plus its own watermark information. Experimental steps:

1. First add your partner to your own code cloud project and then go to his project to download the complex code

2. Add three JUnit unit tests as required by the experiment to run as follows:

3. In the GIT Bash Clone partner project, upload your changes to the code cloud as follows:

Code Cloud Link:

Agile development and XP practice three experimental requirements: to complete the refactoring of the content of the exercise, download the code of the partner, at least three refactoring, submit the refactoring code, plus their own number watermark. Submit a link to your partner's code cloud project. Experimental steps:

1. Create a new Complex5325 project, perform some refactoring of the code input of the partner, class name, private,tostring.

2. as follows:

3. Partner Code Cloud Connection: Https://gitee.com/BESTI-IS-JAVA-2018/20165325.git

4. Related refactoring shortcut key content summary:

快速调取一个方法:Ctrl+Alt+M快速提取常量:Ctrl+Alt+C 快速提取变量:Ctrl+Alt+V快速提取成员变量:Ctrl+Alt+F快速更改类名:Shift+F6
Agile development and XP practice four experimental requirements: in pairs to complete the Java cryptography related content learning, combined with refactoring, git, code standards. Submit the learning Result Code cloud link and the representative result, must have the student number watermark. Experimental steps:

1. Related Results run:

2. Code Cloud Project Link: https://gitee.com/BESTI-IS-JAVA-2018/20165325/tree/master/Exp3_Des

Problems encountered in the experiment

One, the following error occurred when uploading code to the cloud:

Solution: Force the upload with the following code-GIT push-f Origin Master

Experimental PSP:

Steps Time Consuming percentage
Demand analysis 40m 25%
Design 60m 37.5%
Realize 20m 12.5%
Test 20m 12.5%
Analysis Summary 20m 12.5%

20165320 Java Experiment Three: Agile Development and XP practice

Related Article

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.