java experiment-3

Experiment content
1. XP basics

2.XP core practice

3. Related tools

Experimental content

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

The screenshot of the experiment is as follows:

Two:
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. The
running screenshot is as follows:

3
Experiment requirements:
Experiment 3 Agile development and XP practice, 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.
The screenshots of the operation are as follows:

4:
Experiment reference, 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. Requirements:
The screenshot of code running is as follows:

V: Teamwork
experience
Many of the experiments involved teamwork and cooperation. In the fourth experiment, because of my poor academic performance, most of the code was completed by my partner Qi Ying. I just debugged it.

Guess you like

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