CS 1713-001 Introduction to Computer Science
Spring 2001 -- Review for Exam I
Material that might be covered on the exam:
- Syntax and basics of Java:
- Some short answer syntax questions can be found at
Practice Problem Set 1.
(However, the exam will not have multiple choice questions.)
- Java operators and their precedence.
- You should know the basics of programming:
how to accumulate sums, find the average
of numbers, find the maximum or minimum of numbers.
- Tracing of if-else can be found in
Practice Problem Set 2.
- Loops in Java: while, for, and
do-while. Material about loops is referred
to in the weekly lecture notes. See Week 5
Lecture for an extended loop example and other materials.
- Material about object-oriented programming:
- Terminology:
- Class - a blueprint for an object. (A class definition
reserves no memory; rather it says how objects of a certain kind
should be created and what they can do.)
- Instantiate - create a object from the blueprint
(using new).
- Constructor - specifies how the object should be set up when
it is created. (The constructor has the same name as the class name.)
- Variable - name for a memory location that holds a particular
type of object or value.
- Method - group of programming statements that is given a
name. (Methods define the actions that an object can take.)
- Accessor method - a type of method that gets information about an
object, but does not change its state.
- Modifier method - a type of method that changes the
internal state of an object in some way.
- Field - contains internal state information of an object.
- Client code - code that creates an object and/or asks it
to do something.
- Complete partially written class definitions.
- Write statements to instantiate objects and call methods of an
class to solve a problem.
- Material from specific classes studied in the course.
Some of these involve
specific Java library classes or classes from the text or
from lectures that we have studied.
(Special Note: You are not expected to memorize the
names of the various methods or classes we have studied.
The concepts are the important part.)
- The Math class.
- The
Random class.
- The String class.
- The
Rectangle class (from lectures).
- The Circle
class (from lectures).
- The Counter
class (from lectures).
- The Primes
class, that will print successive Fibonacci numbers
and their factorizations (from lectures).
- The ThreeHalves
class, that will print the 3/2 sequence.
See Week 3 Lecture.
- The Dice class (from the lab).
- The Coin class (from the text, page 179).
- The Rational class (from the text, page 196).
- The
TimesTable class (from lectures).
- The Time, Date, and
DateTimeclasses (from lectures).
- Various materials related to base conversions,
and conversions between ints and
Strings: See Week 4
Lecture.
- The
ConvertBase
class, illustrating static
and non-static methods (from lectures).
- Testing println
(from lectures).
- The GetNext class (from lectures).
- The Lines
class, an applet (from lectures).
- A test of logical operators, including especially
de Morgan's Laws:
LogicTable
class, which prints a table of logical values (from lectures).
- Determine appropriate fields or methods for a class definition
from a word problem.
Revision date: 2001-02-25.
(Use ISO 8601,
an International Standard.)