CSSE 221: Fundamentals of Software Development Honors

Key

Programming assignment (due by Monday 11:59 pm)

Finish Fifteen, as stated in the specification, being sure you have checked in your final, fully-documented copy to the repository.

Written homework to do before week 4 (due before beginning of class on Monday, Sept 24).

Answers are to be written in your own words! As usual, please bring hardcopy for written answers to class to hand in on Monday.
  1. Weekly reading. You may also want to refer to the Sun Java tutorial on Swing as a reference.
  2. (15 pts) Describe any three different LayoutManagers in Swing.
  3. (10 pts) Describe any advantages of having a panel be a subclass of JPanel rather than using JPanel as-is.
  4. (6 pts) When is it appropriate to use the ActionListener interface? What method must you implement when using it?
  5. (4 pts) Look at the API for MouseListener, MouseMotionListener, KeyListener, and ChangeListener. Name one method from each interface.
  6. (15 pts) Write a class called MyButton extending JButton. When a button of this type is pressed, it turns another panel, myPanel (stored as a field), the color green.
  7. (5 pts) What is the difference between JTextField and JTextArea?
  8. (15 pts) Say you wanted to create a two-dimensional dynamically sized 2D array (i.e. a 2D ArrayList). Write a short paragraph speculating how you might tackle this problem.
Reminder that assistants are in Moench F217 every weekday afternoon and from 7-9pm on Sunday through Thursday nights to help you.