20165302 Agile development and XP practice

20165302 Agile development and XP practice experiment report

1. Submission point 1

1. Experimental requirements

  • Refer to http://www.cnblogs.com/rocedu/p/6371315.html#SECCODESTANDARD to install the alibaba plugin 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. Submit a screenshot and add your student ID watermark.

    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));
    }
    }

    2. After formatting

    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. Screenshot

  • before fixing

  • after modification

4. Use of Code menu

2. Submit point 2

1. Experimental requirements

  • Add your learning partner to your own project on the code cloud. After confirming that the partner's project is added to yourself, download the Complex code of partner experiment 2, add no less than three JUnit unit test cases, and git add .; git after the test is successful commit -m "Add content to your student number"; git push;
  • Submit a screenshot of the partner project git log, including the above git commit information, and add your own student number watermark information.

2. Screenshot of successful test

3. Upload to partner code cloud, git log log

Three, submit point three

1. Experimental requirements

  • Agile development and XP practice http://www.cnblogs.com/rocedu/p/4795776.html , the content of Eclipse is replaced with IDEA
  • Complete the refactoring exercises, download your partner's code, 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.

2. About Refactoring

Guess you like

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