Java developers should have a suitable development environment, and Eclipse is such a suitable integration environment for Java development, completely free, is a necessary platform for Java developers. Before installing eclipse, you need to install the JDK, which is a Java language SDK for Java applications on mobile devices and embedded devices. The JDK is the core of the entire Java development, which contains Java's runtime environment, Java tools, and Java-based class libraries.
1. Install the JDK and configure the environment variables: The installation package can be downloaded on the website (http://www.oracle.com/)
2. Configure environment variables after installation
Configuring Environment variables
Edit path: Add to the front of the Bin folder in the JDK
New classpath: Add first,; , followed by the path to the Lib folder in the JDK
New Java_home: Path to the installed JDK
Detecting JDK configurations
3. Install eclipse: Download the website (http://www.eclipse.org/)
Decompression can
4. Maximum sub-arrays and test cases
Unit Test
Before you start the test, you need to know some basic test methods
Statement overwrite: Makes every statement in the program can be executed at least once.
Decision override: Causes each decision in the program to be at least true or false each time.
Conditional override: Allows each condition in the decision to obtain a variety of possible results.
Decision/Condition Coverage: simultaneously satisfies the judgment coverage and the condition coverage.
Conditional combination overrides: Causes the various possible combinations of conditions in each decision to appear at least once.
Use Case number |
Input data |
Expected output data |
Actual output data |
Pass/No Pass |
1 |
-1-2-3 |
-1 |
-1 |
Y |
2 |
-1 1-3 |
1 |
1 |
Y |
3 |
-1-2 3 |
3 |
3 |
Y |
4 |
1 2 3 |
6 |
6 |
Y |
Unit tests:
5.coding.net Link: https://git.coding.net/J_mg/Maxsum.git
Software Engineering Second Job