Test Postmortem Dennis Burford

29
Test Postmortem Dennis Burford [email protected]

description

Question 1a JPanel JFrame (with its own content pane) JPanel JTextFieldJLabelJTextFieldJLabel JButton

Transcript of Test Postmortem Dennis Burford

Page 1: Test Postmortem Dennis Burford

Test Postmortem

Dennis [email protected]

Page 2: Test Postmortem Dennis Burford

Question 1a

• Draw a component hierarchy for the following Java application. [5]

Page 3: Test Postmortem Dennis Burford

Question 1a

JPanel

JPanel

JFrame (with its own content pane)

JPanel

JPanel JPanel

JTextFieldJLabel JTextFieldJLabel

JButtonJButton

JButton

Page 4: Test Postmortem Dennis Burford

Question 1b

• Name any three of the Layout Managers in Java. [3]

Page 5: Test Postmortem Dennis Burford

Question 1b

• Name any three of the Layout Managers in Java. [3]

BorderLayout GridLayoutFlowLayout GridBagLayoutBoxLayout

Page 6: Test Postmortem Dennis Burford

Question 1c

• Give a statement in Java to set the Layout of myPanel to any Layout Manager. [2]

JPanel myPanel = new JPanel();

Page 7: Test Postmortem Dennis Burford

Question 1c

• Give a statement in Java to set the Layout of myPanel to any Layout Manager. [2]

JPanel myPanel = new JPanel();

myPanel.setLayout( new BorderLayout() );

Page 8: Test Postmortem Dennis Burford

Question 2a

• You are writing a Swing application and want the program to print out the message “Ouch!” every time you press a button. Show how you would do this for the following button: [4]

JButton button = new JButton(“Press Me”);

Page 9: Test Postmortem Dennis Burford

Question 2a

button.addActionListener( new ActionListener() { public void actionPerformed( ActionEvent e ){

System.out.println(“Ouch!”);}

}

);

Page 10: Test Postmortem Dennis Burford

Question 2b

• Indicate what type of Listener is used for each of the following components: [2]

i. JTextfield

ii. JSlider

Page 11: Test Postmortem Dennis Burford

Question 2b

• Indicate what type of Listener is used for each of the following components: [2]

i. JTextfield ActionListener

ii. JSlider ChangeListener

Page 12: Test Postmortem Dennis Burford

Question 2c

• What is the difference between a Listener and an Adapter in Java? [2]

Page 13: Test Postmortem Dennis Burford

Question 2c

• What is the difference between a Listener and an Adapter in Java? [2]

A Listener is an interface (have to implement methods). An Adapter implements a Listener interface using empty methods.

Page 14: Test Postmortem Dennis Burford

Question 3a

• Name the five stages of the traditional Software Lifecycle. [5]

Page 15: Test Postmortem Dennis Burford

Question 3a

• Name the five stages of the traditional Software Lifecycle. [5]

1. Specification2. Design3. Implementation4. Testing5. Maintenance

Page 16: Test Postmortem Dennis Burford

Question 3b

• Give two constraints you would consider when planning a software project. [2]

Page 17: Test Postmortem Dennis Burford

Question 3b

• Give two constraints you would consider when planning a software project. [2]

Time, Money, Equipment, People,….

Page 18: Test Postmortem Dennis Burford

Question 4a

• What is the difference between a Milestone and a Deliverable? [2]

Page 19: Test Postmortem Dennis Burford

Question 4a

• What is the difference between a Milestone and a Deliverable? [2]

A Milestone is the end of a distinct stage. A deliverable is a milestone with tangible results that are delivered to the client.

Page 20: Test Postmortem Dennis Burford

Question 4b

• Name two commonly used techniques for documenting/illustrating a project schedule.

[2]

Page 21: Test Postmortem Dennis Burford

Question 4b

• Name two commonly used techniques for documenting/illustrating a project schedule.

[2]

1. Table of Tasks2. Gantt Chart

Page 22: Test Postmortem Dennis Burford

Question 4c

• Give an example of a common project pitfall (be sure to say what the problem is, rather than just giving a name). [1]

Page 23: Test Postmortem Dennis Burford

Question 4c

• Give an example of a common project pitfall (be sure to say what the problem is, rather than just giving a name). [1]

One person taking all the responsibility for the project and doing all the work.

(many others….)

Page 24: Test Postmortem Dennis Burford

Question 5a

• What are the two forms that an IP address can take? Give an example of each (they do not have to be real addresses). [2]

Page 25: Test Postmortem Dennis Burford

Question 5a

• What are the two forms that an IP address can take? Give an example of each (they do not have to be real addresses). [2]

1. DNS Form: casper2.cs.uct.ac.za2. Dotted Quad Form: 137.158.128.58

Page 26: Test Postmortem Dennis Burford

Question 5b

• What two things together identify a program offering a service on a machine?

[2]

Page 27: Test Postmortem Dennis Burford

Question 5b

• What two things together identify a program offering a service on a machine?

[2]

1. IP Address2. Port Number

Page 28: Test Postmortem Dennis Burford

Question 5c

• Give an example of a type of Internet application that uses the Client-Server model. [1]

Page 29: Test Postmortem Dennis Burford

Question 5c

• Give an example of a type of Internet application that uses the Client-Server model. [1]

email, web browser, irc, telnet, ftp, ….