Beijing Institute of Electronic Technology (BESTI)
Real Inspection report
Course: Java Lab class: 1352 Name: Ma Qiyang No.: 20135234
Score: Instructor: Lou Jia Peng Experimental Date: 2015.4.15
Experiment level: Preview degree: Experiment time:
Instrument Group: 05 Compulsory/Elective: Compulsory experiment serial number: 01
Lab Name: familiarity with Java Program development environment
Experimental purposes and requirements:1. implementing the command line Java Program Development ;
2. implementing Java program Development under Eclipse
Experimental instrument:
Name |
Model |
Number |
Eclipse |
|
1 |
Virtual machines |
|
1 |
Experimental Knowledge Points:
Installation location and difference of 1.JVM,JRE,JDK
2. Command line run JAVAC.JAVA,JAVAC–CP;JAVA-CP
The setting method and application of 3.path,classpath,sourcepath
4. Package Management: package;import;javac-d
5.Eclipse (Netbeans) Managing Java projects, commissioning: Power outages, stepping, etc.
6.Java basic syntax: type and type conversion; variables; operators; Process control, etc.;
Use of 7.JDK help documents
Experimental steps:
(a) The command line under the Java Program development:
Enter the CD 20135234 command into the experiment directory, enter a similar mkdir EXP1 to create the first experiment directory, and then enter the CD EXP1 into the experiment directory, you can enter the PWD command to view the current working path, as shown in:
1, the first line of code, which affects how we compile the code using JAVAC.
2, the second line of code, when we use a class in the Java class Library, to import the relevant classes with import, the import path can view the JDK Help document, for example, we use the Scanner class:
Note: When you have a package in your code, you must add the-d parameter when you compile your code with JAVAC, and you must prefix the name of the packet when you run the code.
Two Under Eclipse Java program development, debugging:
Enter the eclipse command on the command line and enter or click the Eclipse EE icon on the desktop to open eclipse
In Eclipse, click File->new-> Java Project to create new Java projects
Enter the project name Hellojdb and click the Finish button to complete the new project,
In Eclipse, click File->new->class to create a new Java class
Enter the package name LJP according to the Java code specification, the class name Hellojdb, and tick the Automatically generate main function option, then click the Finish button,
To practice the Debug program:
First open debug view with Window->open Perspective->debug
The debugger first sets breakpoints and runs in one step.
Then click the Debug button to start debugging the Java program
(c) Practice
Question Fifth:
Now I'm looking for the function of all prime numbers between positive integers 1-n and debugging
Time Statistics:
Steps |
Take |
Percentage |
Demand analysis |
16min |
19.5% |
Design |
14min |
17% |
Code implementation |
40min |
48.7% |
Test |
2min |
0.1% |
Analysis Summary |
10min |
12.2% |
Analysis Summary:
Problem encountered: 1,eclipse operation method is not proficient
Workaround: Follow the tutorials several times and improve your proficiency by reviewing certain data
2, set breakpoint operation Jian cannot find
Workaround: Successful after multiple attempts
20135234 Ma Qiyang