CSC 216/s08/exercise caution

From Expertiza_Wiki
Jump to navigation Jump to search

Four Questions

Testing student's knowledge

This exercise is meant to be a kind of test of previously assigned study material. The preparation for this test is meant to be done before class. It takes about twenty minutes to play from beginning to end.

Participants and props

All the students in the class can participate. The props needed are: 4 flash cards or pieces of paper with questions and a clock or stopwatch.

The script

The instructor assigns some study material for students to study before class. He then writes down four different questions on four different pieces of paper based on the study material. Due to the nature of this game, the questions need to be somewhat difficult and conceptual or subjective in nature.

This game is played in four stages:

Stage 1
At the beginning of the class period, the instructor divides the class into four groups and hands out the pieces of paper to each group. After the rules of the game are explained, the students are given three minutes to discuss the answers to the questions with their team members.

Stage 2
After the three minutes are up, the students are given the option of talking about their question to team members from other groups. The catch is, a student can either ask a question pertaining to what is written on his assigned problem, or the student can answer another students question by responding with both a true and a false answer. This stage also takes three minutes.

Stage 3
After the interrogation stage is over, the students are again allowed to discuss their findings with their teammates for three minutes.

Stage 4
Finally, the teams are asked to come one by one to the front of the class to tell their question and give out their answer. The instructor may comment on the answers.

Questions Used to Teach GUI's

Listeners
1. The implementation of listeners in GUI's is an example of _______________ Programming.
        (a)Modular         (b)Event Driven         (c)Audable

2. An ActionListener relies on this method for action processing.
        (a)actionPerformed         (b)processExecuted         (c)actionAnswered

3. This listener was created to combine the MouseListener ad the MouseMotionListener into one listener.
        (a)MultiMouseListner         (b)MouseInputListener         (c)CombinedMouseListener

4. Is there a MouseListener that monitors the rotary button on a mouse? If so, what is its name?
        (a)No.         (b)Yes, MouseScrollListener         (c)Yes, MouseWheelListener

MenuBar
1. This class represents a choice on a dropdown menu.
        (a)JMenuOption         (b)JMenuChoice         (c)JMenuItem

2. ___________ does not have to be done before a background image can be displayed on a MenuBar.
        (a)Set the background opacity to false.         (b)Override the objects paint menthod.         (c)Set Background to specified image.

3. ___________ must be added to a menu in order to process menu selection events.
        (a)MouseListener         (b)ActionListener         (c)None, Action management is built into the class.

4. This is the standard Layout used by MenuBars.
        (a)BoxLayout         (b)GridLayout         (c)FlowLayout

Graphics
1. The ___________ method is a low-level graphical implementation method that should only be called by the system. If the programmer wants to make the window paint again, he should call ____________.
        (a)paint(), rePaint()         (b)draw(), paint()         (c)sketch(), drawWindow()

2. Which Graphics method draws a rectangle, and then shades the adges to give the illusion of depth?
        (a)drawShadedRect()         (b)paintRect3D()         (c)draw3DRect()

3. What method erases a given rectangular region by filling it in with the backgroundcolor of the current drawing space?
        (a)fillRect()         (b)clearRect()         (c)erase()

4. Which of the following methods copies a specified area and pastes it in a new loction?
        (a)copyArea()         (b)move()         (c)drag()

Layouts/Panels
1. This method is used to assign a Layout type to a panel.
        (a)assignLayout()         (b)setOrganisation()         (c)setLayout()

2. Which of the following sets of constants are used with a BorderLayout?
        (a)NORTH, SOUTH, EAST, WEST         (b)TOP, BOTTOM, LEFT, RIGHT         (c)None of the above.

3. Which of the following is not a standard Java Layout?
        (a)FlowLayout         (b)GridBagLayout         (c)LeftJustifiedLayout

4. Which of the folowing is not a method of JPanel?
        (a)setOpaque()         (b)setPreferredSize()         (c)setBackground()