1. (a)10111 (b)19 2. (a) byte: 8 bits (b) software: directions to the computer divided into classifications: operating system and application software (c) IDE: Integrated Development Environment provides capabilities of editting, compiling running and debugging in one application (d) compiler: translates source code to something the computer can interpret (e) ASCII: American Standard Code for Information Interchange a mapping of binary sequences to character values (f) method: a portion of code that does a specific task - it has a name and possibly a list of parameters it accepts values for from the caller - it runs and returns control back to whoever called it (g) byte code: Java can be compiled to byte code which is then interpretted by the JVM. - it allows Java to be portable in its already compiled form (most languages are like C which means the source code is portable not after it is translated) 3. local variables come into existance when they are declared, but they go out of existance when the block that contains them closes 4. literal is something that requires no interpretation for example - a String literal is indicated with quotes: "Jan" - a char literal is indicated with single quotes: 'a' - an integer, byte, and short with numeric digits: 5 - a long with numeric digits and an L: 1293819L - a double in scientific notation : 4241e8 or floating point notation: 3.451 - a float same as above but with an F: 4241e8F or 3.451F - a boolean with the word true or the word false 5. byte 1 short 2 int 4 long 8 float 4 double 8 char 2 boolean 1 6. parentheses: ( ) unary ops: +x -x ++x –-x x++ x-- !x multiply/divide: * / % add/subtract: + - comparisons: < > <= >= equality: == != logical and: && logical or: || assignments: = += *= /= %= (only these are right to left associative) 7. public static void maketriangle(int first, int second){ int max = 0; if (first > second){ max = first; } else { max = second; } if (max > 0){ for (int row = 1; row <= max; row++){ for (int col = 1; col <= row; col++){ System.out.print("*"); } System.out.println(); } } } 8. public static void main(String[] args) { int max = 0, min=0, sum=0, current=0; Scanner s = new Scanner(System.in); // assume the first number read is // both the max and the min max = min = current = s.nextInt(); while(current>=0){ if(current>max){ max = current; } if(current carOne.getMileage()){ System.out.println("Better Mileage for Car with type ", carTwo.getType); }else{ System.out.println("Better Mileage for Car with type ", carOne.getType); }