20165323 experiment a familiarity with the Java development environment

Source: Internet
Author: User

First, the experimental report cover

Course: Java Programming class: 1653 class Name: Yang Jinchao No.: 20165323

Instructor: Lou Jia Peng Experiment Date: April 2, 2018

Experiment time: 13:45-15:25 experiment serial Number: a

Lab name: Familiarity with the Java development environment

Experimental purposes and requirements:
1, complete the experiment, write the experimental report, pay attention to the experimental report is the operation results, problems encountered and analysis.
2, the test report in the statistics of their own PSP (Personal software Process) time;
3, master the ability to use idea to complete basic programming and program debugging.

Second, the experimental content:

1, the use of JDK compiled, run a simple Java program;
2. Use idea to edit, compile, run, and debug Java programs.

Iii. Experimental Steps (i) Java program Development under command line

Create a directory of "20165323EXP1"
Set up directories such as Src,bin in the "20165323EXP1" directory
mkdircreating a directory with commands

Writing and running programs

(ii) idea under the Java Program development, debugging

1. Create the "Hellojdb" project, create the "Hellojdb" class under the project, and enter the code:

2, click "Run" Running code (or shortcut key ALT+SHIFT+F10)

3. Click on the left side of the required number of lines, set a breakpoint (or shortcut key Ctrl+f8), then click Debug (or use the shortcut key alt+shift+f9) to get the following result:

4. Click "Step Into" (or shortcut key F7) or "Stepover" (or shortcut key F8) to run the program to the next step.
Here we have to be clear that step into can go into the method to run the next step, and step over is to run the method directly. Here we use step over to get the following results

5, set the conditional breakpoint, set the value of the program I to 50: Click Resume (or shortcut key F9) run the program directly to the next breakpoint, that is, the conditional breakpoint set in the previous step:

6. You can continue to set temporary breakpoints

(c) Practice

1, Title: My study number 23%9 +1 equals 6, so I need to complete the sixth question: Achieve the permutation number p (n,m) function, m,n from the command line input, and test (normal situation, abnormal situation, boundary conditions).
2, Analysis: To clear the arrangement of the calculation method is P (n,m) =n!/(N-M)!
3. Programming:
Using the command line implementation

Test (the previous input is n, the latter input is m)
Normal tests, such as n=12,m=11

Abnormal conditions



Boundary conditions

Code link Three, experimental experience and summary
Steps Time Consuming percentage
Demand analysis 3min 7%
Design 5min 12%
Code implementation 20min 50%
Test 3min 7%
Test summary 10min 24%
Experimental experience

The experiment content is relatively simple, the first use of Ieda will also appear a lot of errors, in the continuous learning will be more fruitful. The use of Ieda is easier for beginners than for JDB debugging. Learning to master the relevant usage of idea in the course of the experiment is really more useful than the VIM command line, and the debugging process is displayed more clearly. Easier operation

20165323 experiment a familiarity with the Java development environment

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.