DISCUSSION QUESTIONS

IMPORTANT NOTE: Discussion questions this quarter will serve as a study opportunity. Answer the questions in your notebook or electronically. Use the notes to study for "quizzes". You do not need to submit your answers.


DQ #1

Be prepared to define the terms in the following list:

  • class
  • constructor
  • method
  • method invocation
  • method signature
  • return type
  • parameter type
  • formal parameter
  • actual parameter
  • class variable
  • instance variable
  • local variable
  • scope
  • access modifier


DQ #2

Be prepared to define the terms in the following list:

  • inheritance
  • superclass
  • subclass
  • abstract class
  • data hiding
  • encapsulation
  • polymorphism
  • dynamic binding


DQ #3

Here are some questions we will talk about in class:

  • In the Percolation project we have square N x N grids. Do they have to be square?
  • Consider the initial display of the grid and its contents. Does the time it takes to "paint" the background (not including the grid contents) depend on the size of the grid? Does it depend on the number of grid elements? What about displaying the elements in the grid?
  • How does SlowPercolationController drive the Step process?
  • Assuming there are N rows in a grid, how many steps does it take a VerticalPercolator to reach the bottom (or get stuck and it can no longer percolate), in the worst case? What is the worst case?
  • What about GravitationalPercolator? What about AllDirectionPercolator? (Be creative when thinking about the worst case.)
  • How does ListPercolationController drive the Step process?
  • What is the impact of that on the time it takes to execute a single step? How about on the time it takes to run until the material is as saturated as it can be, given the presence and location of obstacles?