Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
31 Cards in this Set
- Front
- Back
What are the programming phases?
|
1. Define and analyze: know requirements, sample run, inputs and outputs
2. Design: overall program structure, algorithms in pseudocode 3. Write program code 4. Testing-- find errors 5. Documentation-- for the user 6. Maintain/upgrade |
|
What are the three types of program control?
|
Sequential statement execution
Decision statements Repetition Statements (loops) |
|
What are the Java language elements?
|
comments
reserved words symbols identifiers literal values: numbers, characters, strings case sensitive white space |
|
What are identifiers used for and what are their properties?
|
names of: classes, methods, variables
contain letters, $, _ , digits but not the first character |
|
____________ classes are always implicitly included
|
java.lang.*
|
|
What are some examples of programs?
|
Python, Lisp, Perl, DBII, Javascript, Ruby, C++, Java, C, BASIC, Pascal, Fortran
|
|
______ take program source, translated into lower form, given back as new file, execute the new file (run the program)
|
Compilers
|
|
_______ translate while running the program
|
Translaters
|
|
What is the collection of pre-existing Java software organized into useful class files?
|
Java Applications Programming Interface (API)
|
|
Related class files are in common ______ (folders).
|
Packages
|
|
This might need to be explicitly included in order to be used in your program:
|
import java.packageName.className;
|
|
What are the primitive data types?
|
boolean
byte char short, int, long double, float |
|
char literals must be in _______ quotes
|
single
|
|
'A' to 'Z' have consecutive codes
|
65-90
|
|
'a' to 'z' have consecutive codes
|
97-122
|
|
'0' to '9' have consecutive codes
|
48-57
|
|
______ has twice as many mantissa bits as a _____, so you get more precision
|
double; float
|
|
What is the order of precedence?
|
() do inside parentheses first
- negation * multiplication; / division; % mod + addition, - subtraction = assignment |
|
What modifier do you call for a named constant?
|
final
|
|
What are some escape sequences?
|
\\ \" \n \t
|
|
A program ____ have a main method
|
must
|
|
What are some common classes?
|
Math, Scanner, String, System, Character
|
|
What are some useful Math class functions?
|
you can call methods directly with class name
Math.pow() Math.sqrt() Math.ceil Math.floor Math.round |
|
What are some useful methods in Scanner class?
|
next()
nextInt() nextDouble() nextLine() next().charAt(0) |
|
What is the format template like for printf?
|
%[flags][width][.precision]conversion-character
s- string d- decimal f- float 0- pad , ( - left justified |
|
Character indices start at ___
|
zero
|
|
What are some useful methods in the String class?
|
indexOf()
length() charAt() substring() |
|
What are some conversions to other types?
|
Integer.parseInt(String)
Double.parseDouble(String) |
|
What is DeMorgan's Law?
|
! (A && B) == !A || !B
|
|
What is the operator precedence for logical operators
|
1. parentheses
2. negation, ! not, (cast), ++, -- 3. * multiplication, / division, % mod, 4. + addition, - subtraction, + concatenation 5. < > <= >= 6. == equals and != not equals 7. && and 8. || or 9. =, *=., /=, -=, %= |
|
Switch statement must control with an integer statement (true/false)
|
true
|