Create a second package called lsquotask01 within this


Task 1

Create a new project in Eclipse called ‘Assignment 2'.
Create a package called ‘people' within this project. Download the start up classes and put them into this package. These classes are similar to the ones you wrote for assignment 1 but they have been modified somewhat, so make sure you use the ones provided.
Create a second package called ‘task01'. Within this package provide classes which perform the following tasks.

Task 2
Create a third package called ‘task02'. Copy the TestUniApplication, AddStudentDialog and ListStudentDialog across to this new package. Make the following modifications to TestUniApplication


• Provide a second menu called File with the following menu items.
o A menu item called save. When this item is selected, the whole Vector is stored to a file using serialisation. Use a FileChooser object for this. The starting directory for the FileChooser object should be c:\\input.
o A menu item called open. When this item is selected, a FileChooser object appears which enables the user to open a file that was previously save (using the ‘save' button). The Vector object should be read from the file, and its contents added to whatever is currently in the main Vector collection.
o A menu item called empty that will remove all Students currently in the Vector. A message box should appear to confirm with the user if this is the action they want taken.
Make the following modifications to ListStudentDialog
• Add a new button (called remove) to remove the selected Student. When this button is clicked a message box should appear asking whether the user is sure that they want to delete the student. If the user selects ‘yes' the Student should be removed from the underlying Vector. The window should then close and control return to the main window.
• Note that if you click the remove button with no item selected in the list, the program will crash with an ArrayOutOfBoundsException. While there are several ways of dealing with this, the program should use a try/catch block that provides a message dialog (in the handler) telling the user that an item must be selected.


Attachment:- 353031_1_Assignment-2.zip

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a second package called lsquotask01 within this
Reference No:- TGS0648368

Now Priced at $70 (50% Discount)

Recommended (96%)

Rated (4.8/5)