Midterm Exam Study Guide
General Guidelines
The exam is taken from Non-Programmer's Tutorial for Python 3 , Python worksheets, and Chapters 1-3.3 of Big Java 4th Edition by Horstmann. The text, worksheets, quizzes, and programming assignments should be the primary instruments of study to prepare for the exam. The PowerPoint slides in CougarView 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 (October 5, 2012 in CCT208)
Multiple Choice Questions (20 pts)
Short Answer Questions (40 points) - evaluate, compute, and write Python and
Java statements, what is the output from Python and Java code segments?
Python and Java Programming Problems (40 pts)
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)
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 (28=256)
v letter abbreviations for certain powers of 2 (K, M, G, T)
v What’s special about the package (module) 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 (function) call and identify the calling method (function), called method (function), and what type of value is returned by the called method (class discussion)
v Terms: formal parameter (parameter coded in a method (function) declaration (also known as a method header)), actual parameter also known as argument (coded when a method (function) is called), calling method (method containing the method call), called method (method named in the method call)