Class Review: Terms & Concepts
Deena Engel's V22.0002: Introduction
to Programming
Note: Before you begin
... There is an old joke that is recited as follows:
- Question: How do you get to Carnegie Hall?
- Answer: Practice, practice, practice!
The same is true here. I can't emphasize enough ... reviewing the programs
that we wrote and analysed in class; writing your own code; practicing programming
at the compiler ... these are the primary tools which will help you to study
and to prepare for the final exam.
General
- syntax
- operating system
- programming language
- structured programming
- debugger
- trace
- /* comments in code */
- // more comments in code
- Import statements; why are they used? what
do they do? name one example and why/when you would use it
- Blocks and {braces}: what do
the braces do?
- What is a statement? (Note the ";"
at the end.)
- Algorithm: what is it ? how is it used? Do they exist outside
of programming and mathematics?
- What is the difference between (parentheses), {braces},
and [brackets]? Which ones do you use and
when?
Variables
- variables
- Data types: what are they? name at least 5. Which ones are used when?
- declarations
- initialization
- assignment
- = vs = = What is the difference?
- operators: name at least 11
- reserved words: what are they? name at least 5
- integer division: what is it and how is it used?
- operator precedence: what is it? how does it work?
- cast operator: what is it and how is it used?
- coercion: what is it? what is the problem with it?
- more operators: ++, --, +=, *=, etc. How are these used?
Errors
- We have seen examples of run-time errors, logic errors
and compile errors. Which are which? How do you fix them? How do you find
them?
Control Structures
- Sequence structure: what is it? How do you describe this in Java?
- Selection structure: what is it? How is it used in Java?
- Repetition structure (aka "iterative structure"): what is it?
Give examples in Java
- Boolean values: How can they be used in iterative structures?
- Nested statements: what are these? what does this imply? give examples
- if vs else if: which is which?
- logical operators: list at least two. How are they used? What are the results?
- switch: what is it and how is it used?
- break and continue: how/when are they
used? give examples
- while loops: what are they and how are they used?
What are
the three required components for all while loops? Give examples.
- What is an infinite loop? Give an
example.
- Define counter-controlled repetition and give an example.
- Define sentinel-controlled repetition and give an example.
- What is a do/while loop? Give an example
- What are the differences between a do/while loop and a
while loop?
- What is a for loop? How is it used? give an example. What
are the three components of a for loop?
- What are the advantages and disadvantages of for loops vs
while and do/while loops?
Methods
- What is a method?
- What information is in a method header and what is the format?
- What information is included in a method signature?
- parameters: What is the difference between formal parameters
and actual parameters?
- What information is included in a parameter profile?
- What is the significance of a return value? Is there always a return value
required?
- What does it mean to call or invoke a
method?
- What does pass by value mean? How does it work?
- What does pass by reference mean?
- What is the difference between pass by value and pass by reference
and give some examples of which you would use in Java.
- What are local variables? Give an example.
- What does scope refer to?
- What is method overloading? How and why would it be used?
Give an example.
Arrays
- what is an array? how is it used? why is it used?
- Give some examples of declaring arrays
- What are elements in an array? how are they referenced?
- How are subscripts used in an array?
- What are some ways to assign values to arrays? to a single value in an array?
to an entire array? give examples.
- What are array bounds? What should you look out for with
respect to array bounds?
- How are arrays passed to methods? Give an example.
- what is a multi-dimensional array?
- what is a linear search?
- what is a bubble sort?
Java Applets
- What is an applet? What is the significance of the .html
file?