Study Guide for Comp 110                 

This study guide covers the entire course. For the portion of this material covered in each of the exams, see the 'Exams & Grades' link.

For each chapter in our textbook, Java: An introduction to problem solving and programming, 6th edition by Savitch and Carrano, Peasron Publishing, this study guide lists the most important concepts. Questions on the exams will, in part, be taken from this study guide. You should be able to answer the self test questions and exercises from each section of the textbook that we cover. The self test questions and exercises listed below are of particular importance. Our text contains numerous "listings" that are examples of Java programs. The listings noted below are of particular importance and, for each, you should understand and be able to explain every single line of the listing.

Chapter 1 - Introduction

1.       Define the following.  Be as concise as possible: CPU, main memory, RAM, secondary memory, program, operating system, JVM, bytecode, load a program, applet, invoke a method, call a method, IDE, OOP, information hiding, abstraction, algorithm, pseudocode, bug, debugging, API

Compare and contrast the following. Briefly explain each, their similarities, and their differences. Note that each of these terms is also fair game for a “Define the following” question.

You will need to understand listings 1.1 and 1.2 in detail.

Exercises 1-8, 10.

We will skip the following: class loader, history of Java, pixel

We will touch very lightly on: inheritance, polymorphism.

 

Chapter 2 - Variables and expressions

5.      Define the following.  Be as concise as possible: Data type, identifier, keyword, reserved word, constant, literal, type casting, precedence rule, whitespace, self-documenting, crash, comment. For Strings: concatenate, substring, position in a String, index in a String,

Compare and contrast the following. Briefly explain each, their similarities, and their differences. Note that each of these terms is also fair game for a "Define the following" question.

Understand in detail listings 2.2 and 2.9

Self-test questions 1-12.

Exercises 4-8 and 11 (Note - before the midterm, we have not covered the material for questions 7 or 8)

We will come back later in the semester to cover 2.4 (Documentation and Style).

Section 2.3 (Keyboard and Screen I/O) covers some details that we will not need in this course. We will not cover figure 2.7, "Other Input Delimieters", or listings 2.6

We will skip the following: escape character, Unicode, other input delimiters,

We will touch on only lightly: type casting, floating point numbers, details of precedence rules.

 

Chapter 3 - Branches

1.       Define the following.  Be as concise as possible: control structure, flow of control, branch, compound statement, Boolean expression, multibranch if-else, mutually exclusive, Boolean variable. Define the following Java operators:  ==   !=   >=   <=   !   ||   &&

  Compare and contrast the following. Briefly explain each, their similarities, and their differences. Note that each of these terms is also fair game for a "Define the following" question.

Understand in detail listings 3.1, 3.2, and 3.3

Self-test questions 1-5, 8-11

Exercises 1-8

We will skip the following: conditional operator, short circuit, lazy. and complete evaluation, enumerations

Compare and contrast the following. Briefly explain each, their similarities, and their differences. Note that each of these terms is also fair game for a "Define the following" question.

We will skip the following: switch statement

We will touch on only lightly: operator precedence

 

Chapter 4 - Loops

Define the following. Infinite loop. Nested loop.

List and briefly explain the 4 components of every loop.

Tracing loop execution is the key skill you need to learn from this chapter.

Key listings: 4.1 (while), 4.4 (nested), 4.5 (for),

Self-test questions:1, 2, 5, 7-10, 13, 14-16, 18, 19,

Exercises: 1, 4, 8, 9, 18, 19

We will skip the following: for-each loop, assert

We will touch on only lightly: do-while loop, break

 

Chapter 5 - Classes and Methods

Define the following: instantiate, Java keyword "new", void, return

Compare and contrast the following. Briefly explain each, their similarities, and their differences. Note that each of these terms is also fair game for a "Define the following" question. class vs. object, return vs. break, call vs. define a method, instantiate vs. define a class, actual vs. formal parameter, gettr vs. settr

Why are gettrs and settrs used? What does this have to do with encapsulation?

Key listings: 5.2, 5.3

Self-test questions: 1-8, 9-10, 13, 15

Exercises: 1, 6

We will skip: global variable, call by value vs. call by reference, block, precondition, postcondition

 

Chapter 6 - Objects and Methods

Define the following: constructor, default constructor, overloading vs. overriding, signature

How does the syntax of a constructor differ from other methods?

Key listings: 6.1, 6.2

Self-test questions: 1-3

Exercises: 2

Chapter 7 - Arrays

Define the following: array, index

Characteristics of an array: bundle of closely related variable, share same name, distinguished by index, linear, homogenous, fixed size.

Key listings: 7.1,

Self-test questions: 1-6, 9-12

Exercises: 1-5, 9-11

 

WWW and Internet

Know all terms from the class handout and be able to answer the questions.