Programming Assignment 5 Extra Credit Challenge

A Simple Text Editor using Java Swing Extra Credit Challenge

Code Review for Jade Cheng

Build Results

No errors; no warnings

Requirements Verification

REQ-A5E.1.1

You will implement a Save Changes Dialog that asks users if they want to save changes before continuing an operation.

PASS.

REQ-A5E.2.1

The Save Changes Dialog is a confirmation dialog created using JoptionPane.showConfirmDialog.

PASS.

REQ-A5E.2.2

The title of this dialog is “Save Changes?”, the message text of this dialog is “This file has not been saved. Would you like to save it?”, and the option type of this dialog is JOptionPane.YES_NO_CANCEL_OPTION.

PASS.

REQ-A5E.3.1

If the user closes the application by selecting the Exit Menu Item or by closing the window, and the contents of the text area have been changed since the file was opened or created, then the application displays the Save Changes Dialog.

PASS.

REQ-A5E.3.2

If the user selects the Cancel Button, the application does not terminate.

PASS.

REQ-A5E.3.3

If the user selects the No Button, the application terminates without saving the changes.

PASS.

REQ-A5E.3.4

If the user selects the Yes Button, the application proceeds as if the user selected the Save Menu Item.

PASS.

REQ-A5E.3.5

The application then terminates if and only if the file is saved successfully.

PASS.

REQ-A5E.4.1

If the user selects the New Menu Item, and the contents of the text area have been changed since the file was opened or created, then the application displays the Save Changes Dialog.

PASS.

REQ-A5E.4.2

If the user selects the Cancel Button, the application does not start a new file.

PASS.

REQ-A5E.4.3

If the user selects the No Button, the application proceeds normally without saving the changes.

PASS.

REQ-A5E.4.4

If the user selects the Yes Button, the application proceeds as if the user selected the Save Menu Item.

PASS.

REQ-A5E.4.5

The application then starts a new file if and only if the file is saved successfully.

PASS.

REQ-A5E.5.1

If the user selects the Open Menu Item, and the contents of the text area have been changed since the file was opened or created, then the application displays the Save Changes Dialog.

PASS.

REQ-A5E.5.2

If the user selects the Cancel Button, the application does not open a new file.

PASS.

REQ-A5E.5.3

If the user selects the No Button, the application proceeds normally without saving the changes.

PASS.

REQ-A5E.5.4

If the user selects the Yes Button, the application proceeds as if the user selected the Save Menu Item.

PASS.

REQ-A5E.5.5

The application then opens a new file if and only if the file is saved successfully.

PASS.

Screenshots

Save Changes

Save

Save Error