Final Exam Study Guide

General Guidelines

The exam is taken from Non-Programmer's Tutorial for Python 3 , Python worksheets, and from Chapters 1-7 of Big Java 4th Edition by Horstmann. The text and notes should be the primary instrument of study to prepare for the exam. The PowerPoint slides should be regarded as a companion to rather than substitute for the text. The learning aids in each chapter and the resources in WileyPLUS are also useful in preparing for the exam.

Material from Python programming assignments and labs
Material from Transition Guide
Material from Java programming assignments and labs

Test Format (Monday, December 9, 2013 in CCT208)
Multiple Choice Questions (40 pts)
Short Answer Questions (100 points) - evaluate, compute, write Python and Java statements, what is the output from Python and Java code segments?
UML Diagram (10 pts)
Python and Java Programming Problems (50 pts) that has at least one user-defined class and a main class

ACADEMIC OBJECTIVES

Specific Guidelines

Things you should know:

PYTHON

v  identify the parts of a simple Python program (sections 1-3, pages 1-8)

v  Python terminology, expressions (sections 3, pages 8-11)

v  Python input, variables, and assignment statements (Section 4, pp. 12-17)

v  Python while loops (Section 5, pp. 17-22)

v  Python decision statements (if) (Section 6, pp. 22-28)

v  Debugging Python programs (Section 7, pp. 28-32)

v  Python functions (Section 8, pp. 33-39)

v  Python lists (Section 10, 15, pp. 43-52, 69-73)

v  Python for loops (Section 11, pp. 52-55)

v  Python Boolean expressions (Section 12, pp. 55-61)

v  Python strings (Section 16, pp. 73-78)

v  Python files (Section 17, pp. 79-85)

JAVA

v  identify the parts of a simple Java program (Topic 1.5, pages 11 - 13)

v  Java comments (Topic 1.5, page 12, Special Topic 1.1, page  14)

v  kinds of programming errors (Topic 1.7, pages 18 - 19)

v  Rules for forming Java identifiers, determine if a programmer-defined Java identifier is valid, Java statements that declare and initialize variables (Topic 2.2, pages 36 - 38)

v  What accessor and mutator methods are (Topic 2.7, page 48)

v  What a reference is and what it contains when it does and does not refer to an object, What an alias is and how references can become aliases (Topic 2.10, pages 54 – 56, Topic 5.2.5, page 182)

v  know how applets differ from applications (Special Topic 2.2, pages 63 - 65)

v  know how RGB colors work and be able to identify primary colors based on their RGB value (Topic 2.13.4, page 67)white space characters (space, tab, newline)What access specifiers are and what they mean, what an instance variable is, how the declaration of a method is formed, what a return type is (Topics 3.1 and 3.3, pages 82 - 84, 86)

v  What constructors are, what distinguishing features constructors have, how the declaration of a constructor is formed, what a default constructor is, how many constructors a class can have (Topic 3.3, page 87 and class discussion)

v  What garbage collection is (Topic 3.7, page 101)

v  Java statements that define constants (Topic 4.2, pages 133 - 135)

v  evaluate expressions that use arithmetic operators, precedence of arithmetic operators and parentheses (Topic 4.3, pages 137 - 139)

v  How to use the methods abs, sqrt, and random in the Math class (Topics 4.3.4 and 4.3.5, pages 139 -141)

v  Java statements that use an explicit cast to force Java to assign an incompatible type (Topic 4.3.5, pages 140 - 142)

v  Java statements that use shortcut operators (Special Topic 4.3, page 145)

v  How to use the methods of the String class, Java statements that send output to the console screen including the use of string concatenation and escape sequences (Topic 4.5, pages 149-151)

v  escape sequences (\” for quote,  \’ for apostrophe, \t for tab, \n for newline, \\ for backslash, Special Topic 4.4, pages 152 - 153)

v  the character set Java uses (Special Topic 4.5, pages 153 - 154)

v  know how to import the Scanner class and read Java statements that call the methods of the Scanner class (Topic 4.6, pages 155 - 157)

v  What a class is, what attributes and behaviors are and what defines them in a class, what the state of an object is (pages 160-161)

Plus these items discussed in class:

v  how many bits are in a byte (8) and the number of values that can be represented in a byte (256)

v  letter abbreviations for certain powers of 2 (K, M, G, T)

v  What’s special about the package java.lang (it doesn’t have to be imported) and example classes in that package (Math, Object, String, System, for example)

v  How to recognize a method call and identify the calling method, called method, and what type of value is returned by the called method (class discussion)

v  Terms: formal parameter (parameter coded in a method declaration (also known as a method header)), actual parameter also known as argument (coded when a method is called), calling method (method containing the method call), called method (method named in the method call)

v  Determine the truth or falsity of Java Boolean expressions including simple as well as compound conditions

v  Determine whether a condition will be fully evaluated or not

v  Determine the outcome of if statements including nested if/else statements

v  Compare Strings using the compareTo method

v  Determine whether or not it is advisable to use the equality comparison operators (== and !=) for certain data types

v  Read and write expressions using the conditional operator

v  Read and write switch statements

v  Determine for various counter-controlled loop statements the values output, the number of times the loop body is executed, and the final value of loop control variables

v  Understand why code containing a for loop would not compile if the loop control variable is declared in the for header and referenced after the loop is complete

v  Be able to compare the while, do-while, for, and for-each loops

v  Know how the methods in the Random class work

v  Know what regression testing, black-box testing, and white-box testing are

v  Declare and instantiate an array of a specified type using the new operator

v  Declare and instantiate an array of a specified type using an initializer list

v  Declare and instantiate an arraylist of a specified type using the new operator

v  Set the values of array elements using a for statement

v  Read and write statements that reference and manipulate specific array / arraylist elements

v  Read and write a statement that will calculate the sum of the elements in an array / arraylist of numbers

v  Read and write statements that declare and instantiate an array having the same number of elements as a given array and copy the elements from the given array into the new one

v  Read and write statements that find the largest or smallest element in an array/ arraylist of numbers

v  Be able to determine the number of rows and columns in a 2-dimensional array

v  Read and write statements that reference elements of a 2-dimensional array

v  Read and write statements that display the number of rows and columns in a 2-dimensional array

v  Know how to use the methods in the ArrayList class