Model-View-Controller Design Pattern and Swing Interface Components in Core Java - Prof. P, Lab Reports of Software Engineering

A part of csi 3471 course, focusing on swing interface components. Students are required to answer questions related to the model-view-controller (mvc) design pattern as discussed in chapter 9 of core java. Topics include the characteristics of components, roles of model, view, and controller, content of jbutton, text field size limitations, and more.

Typology: Lab Reports

Pre 2010

Uploaded on 08/18/2009

koofers-user-4m0
koofers-user-4m0 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSI 3471
Swing Interface Components
Reference: Chapter 9 of Core Java
Please answer the questions in Part A before we have class tomorrow (in the lab).
A. Model-View-Controller Design Pattern
1. Every component has three characteristics. Please list them.
2. In the model-view-controller pattern, identify what each of the three parts does:
a. model:
b. view:
c. controller:
3. What is the content of a JButton?
4. What happens if the content for a text field is larger than the view of the text field?
5. Why does the author think that the term “model” is unfortunate?
6. Does the view know why its contents would change?
7. If the user presses a cursor key, what tells the view to change?
8. Which of the three parts of model, view, and controller is(are) stored within a JButton or
a JTextField?
pf2

Partial preview of the text

Download Model-View-Controller Design Pattern and Swing Interface Components in Core Java - Prof. P and more Lab Reports Software Engineering in PDF only on Docsity!

CSI 3471

Swing Interface Components Reference : Chapter 9 of Core Java Please answer the questions in Part A before we have class tomorrow (in the lab). A. Model-View-Controller Design Pattern

  1. Every component has three characteristics. Please list them.
  2. In the model-view-controller pattern, identify what each of the three parts does: a. model: b. view: c. controller:
  3. What is the content of a JButton?
  4. What happens if the content for a text field is larger than the view of the text field?
  5. Why does the author think that the term “model” is unfortunate?
  6. Does the view know why its contents would change?
  7. If the user presses a cursor key, what tells the view to change?
  8. Which of the three parts of model, view, and controller is(are) stored within a JButton or a JTextField?
  1. Why is there a wrapper class that surround both the model and the view? For example,JButton is actually a wrapper class.
  2. Table 9-1 lists the properties of the ButtonModel interface, in other words, the data that isassociated with a button. Assuming that you already have a JButton called myButton, how would you retrieve its model?
  3. Does a JButton contain the button label or icon?
  4. JButton is simply a ____________________ class inheriting from _______________________ that holds the _________________________ object, some ________ data, and a _____________________ object that is responsible for the button view.
  5. In general ______________________ are placed inside containers, and a _____________________ manager determines the ______________ and _____________ of each component in the container.
  6. Each container has a default layout manager. What is the default for a JFrame?