You are responsible for the following for CS1 Quiz 3
- Liang - Chapters 4, 5, 7.1-7.8, 7.10-7.12
- Control Structures
- Selection Statements
- Be able to write an equivalent single if statement
from a switch statement.
- Be able to write an equivalent single switch statement
from an if statement, if it's possible.
- Know when you can't do the above!
- Repetition Statements
- while loop
- Syntax
- Be able to trace the execution of a while loop
- Be able to write one from a description
- Be able to write a while loop that is equivalent
to a do while loop or to a for loop
- do while loop
- Syntax
- Be able to trace the execution of a do...while loop
- Be able to write one from a description
- Be able to write a do...while loop that is
equivalent to a while loop or to a for loop.
- for loop
- Syntax
- Be able to trace the execution of a for loop
- Be able to write one from a description
- Be able to write a for loop that is equivalent
to a do while loop or to a do...while loop
- Know when the above is NOT possible.
- nested loops
- Constructing classes and methods
- Be able to construct a class from scratch given a javadoc or
another specification for the class.
- Modifiers: public, private, static - when used and why?
What do they mean?
- Constructors and Methods
- What is the role of the constructor?
- What is overloading and why is it of use?
- How does Java decide which method to use when you
invoke an overloaded method/constructor?
- Which modifiers (public, private, static) should
be applied, in general, to class/instance
methods?
- Parameter Passing
- Know which method is chosen if the method is overloaded.
- Understand the difference between passing a primitive type
and an object.
- Types of variables: class, instance, and local
- Know the difference between a class and an instance
variables.
- Know how/when to use class/instance variables when
designing classes/methods?
- Which modifiers should be applied, in general, to
individual variables (final, static, public, private)
and when?
- Know how/when to use local variables when designing
classes/methods.
- Unit testing and debugging strategies
- What is testing?
- What is debugging?
- Black box versus white box testing
- How to construct test cases?
- Can you identify a testing strategy to apply
for any classes you have written?
- After a problem has been identified through
testing, can you identify a debugging strategy
to use to find the source of the problem?
- After a fixing the bug, what would you do next?
Phil White
October 19, 2004
http://www.cs.rit.edu/~paw/cs1/Quiz3.html