{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ectc - source code(human-readable program text in an editor...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
test compile edit edit-compile-test-summer2k6.2: Created on Mon Jun 19 2006; modified on Tue Jun 20 2006 The edit-compile-test cycle handout for CS 302 by Will Benton ([email protected]) Java compiler (translates from human-readable source code to machine-readable JVM code) Text editor (creates and modifies source code files) Compiled program (.java files) Compiled program (.java files) Compiled program (.class files) Program source code (.java files) Program source code (.java files) Program source code (.java files) Java VM (executes .class files; "runs program") If there are any compile-time errors, the compiler will reject the .java file; in this case, you'll have to fix the errors. Fix any run- time errors. Working program! No compile- time errors? produces compiled by executed by No run-time errors? The edit-compile-test cycle is the process by which programmers iteratively remove errors from their programs. EDIT: A programmer writes
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: source code (human-readable program text) in an editor . TEST: Programmers must ensure that a compiled program behaves properly. Testing typically involves exercising different parts of the program to find run-time errors. If testing exposes run-time errors, then the programmer must edit the program again. (Note, however, that absence of evidence does not constitute evidence of absence: a program that passes all of its tests may still exhibit run-time errors.) COMPILE: She then uses a compiler to translate the human-readable source code into machine-readable .class files. If there are compile-time errors, the translation will fail, and the programmer will have to resume editing to correct the errors. Compiled program (.java files) Compiled program (.java files) Compiled libraries (.class files, written by other programmers)...
View Full Document

{[ snackBarMessage ]}