Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Task 1

Create a new project in Eclipse.

Create a package called ‘people' within this project. Download the start up classes and put them into this package. Create a second package called ‘task01'. Within this package provide classes which perform the following tasks.

TestUniApplication.

• Create a class, called TestUniApplication, that causes a JFrame window to appear when the application first starts. The window, that appears when the program is executed, should be appropriately sized, titled and located on the screen. The class could have a private instance variable of type Vector (not ArrayList) called students.

• Provide a menu, called Students, with the subsequent menu items
o Add Student
o List Students
o Exit

• Provide the subsequent functionality when each of the menu items is selected

o Add Student - a modal dialog box, called AddStudent, should appear. The details for this dialog box appear below.
o List Students - a modal dialog box, called ListStudents, should appear. The details for this dialog box appear below.
o Exit - the application will close.

• Provide a pushbutton, called Exit, which provides the same functionality as the menu item with the same name.

Task 2

Create a third package called ‘task02'. Copy the TestUniApplication, AddStudentDialog and ListStudentDialog across to this new package. Make the subsequent 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 subsequent 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.

Java, Programming

  • Category:- Java
  • Reference No.:- M9717024

Have any Question?


Related Questions in Java

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Assessment instructionsin this assessment you will complete

Assessment Instructions In this assessment, you will complete the programming of two Java class methods in a console application that registers students for courses in a term of study. The application is written using th ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As