20145336 Three week Java Lab report 20145336 Java Programming Third experimental report
Experimental report of Beijing Institute of Electronic Technology (BESTI)
Course: Java programming
class:1453
Name: Zhang Ziyang
Instructor : Lou Jia Peng
date of experiment:2016.04.22
Experiment Name: Familiarity with the Java development environment (Linux + Eclipse)
Experimental content:
XP Basics
XP Core Practice
Related tools
Experimental purposes and requirements:
Students who do not have a Linux base are advised to start with the Linux basics (new version) Vim Editor course
Complete the experiment, write the experiment Report, the experiment report is published in the blog Garden, note that the experimental report is focused on the running results, the problems encountered (tool search, installation, use, program editing, debugging, running, etc.), solutions (empty methods such as "Check Network", "Ask classmates", "reading" 0 points) as well as analysis (what can be learned from it, what gains, lessons, etc.). The report can refer to the guidance of Fan Fei Dragon Teacher
Plagiarism is strictly forbidden, and the results of the experiment of the perpetrator are zero, and other punitive measures are added.
Experimental steps Agile Development and XP
Two formulas: Software = program + Software engineering and software Enterprise = SW + business model
Agile Development (development) is a human-centric, iterative, and progressive approach to development.
The XP team uses on-site customers, special planning methodologies, and ongoing testing to provide rapid feedback and comprehensive communication:
- XP is a methodology developed to target software that meets customer needs
- XP is a practice-based software engineering process and thought
- XP believes that code quality is more important than people generally think.
- XP is ideal for small, responsible, self-motivated teams to develop software that requires uncertainty or rapid change
XP guidelines: Communication, simplicity, feedback, courage
XP rules: Quick feedback, hypothesis simplicity, incremental change, advocacy for change, quality of work
XP activities: Coding, testing, listening, designing
XP Practices: Coding standards, pairing programming, code ownership, testing, refactoring, and more
Coding standards
An important understanding of writing code is that "most of the time the program is for people to see", the programming standard makes the code easier to read and understand, and can even guarantee fewer errors. Programming standards include: Descriptive names, clear expressions, straightforward control flow, readable code and annotations, and the importance of consistently using certain rules and idioms when pursuing these content.
Program Indentation: We can indent by eclipse-defined specifications by clicking Source->format in the Eclipse menu or ctrl+shift+f with the shortcut key.
Pair programming
There are two roles in pairing programming:
- The driver (Driver) is the person who controls the keyboard input. Write design documentation, encode and unit test, and other XP development processes.
- The Navigator (Navigator) plays the role of pilotage and reminding. Review the driver's documentation, the driver's implementation of the development process such as coding, consider the coverage of unit tests, think about the need for and how to refactor, and help drivers solve specific technical problems.
Configuration of Git
First you need to install Git
Set up your account and email
the use of Git
To download the Java files of the same group members first, then modify and then upload.
We first open the same group of members of the project, copy its URL:
Right click on the desktop, click Git Bash here, enter the GIT clone + project group address:
At this point, the desktop appears in the Project Groups folder:
Open the folder and change the Java file you want to modify into the project Group folder:
Right-click on Git bash here and start to upload the modified Java file:
At this time, [e-Mail protected] in the corresponding project group also has a file, upload success:
the refactoring process for Eclipse
Source:
Import Java.util.Scanner;
public class Myutil {
public static void Main (string[] args) {
Scanner scanner=new Scanner (system.in);
String write= "";
Char[] Mid=new char[100];
Int[] Code=new int[100];
int time=0;
int i=0;
System.out.println ("Please enter clear text");
Write=scanner.nextline ();
Time=write.length ();
for (i=0;i<time;i++) {
Mid[i]=write.charat (i);
code[i]= (int) mid[i]-' a ' +3)%26+ ' a ';
}
System.out.println ("ciphertext:");
for (i=0;i<time;i++) {
System.out.printf ("%c", (char) code[i]);
}
}
}
The refactored code:
Classcaesar{PublicStaticChar[] Mid=Newchar[100];PublicStaticInt[] Code=Newint[100];PublicStaticint Time=0;PublicStaticint i=0;PublicStaticvoidEncryptwrite (String write) {time=write.length ();for (i=0;i<time;i++) {Mid[i]=write.charat (i); Code[i]= ((int) mid[i]-' A ' +3)%26+' A ';} System.out.println ( "ciphertext:"); 0;i<time;i++) {system. out.printf ( "%c", (char) code[i]);}} public class MyUtil {public static void main (string[] args) {Scanner scanner= new Scanner (System. in); String write=out.println ( "Please enter clear text"); Write=scanner.nextline (); Caesar.encryptwrite (Write),}}
Lab Partners
20144303 Shi Yusen Http://www.cnblogs.com/20144303sys
Third Week study summary