Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

File ApplicationCentre.java, which contains classes ApplicationCentre and Student. Introduction Write a Java program to handle applications for universities admission providing a good user interface. This

File ApplicationCentre.java, which contains classes ApplicationCentre and Student.

Introduction

Write a Java program to handle applications for universities admission providing a good user interface. This program should work as a Frame with the width = 500 pixels and the height = 500 pixels.

The tasks of this Java program:

- to enter information for a number of students

- to display in a separate window the information about all the students stored

- to display in another separate window the information for a selected student

Your Task

In this assignment class Student encapsulates the student information relevant for universities admission: student name (just the family name), high school average and 3 universities chosen. The admission is based on the high school average according to the following table:

University High school average for admission

Toronto 90

York 84

Brock 75

Guelph 76

Waterloo 88

McGill 90

Concordia 76

Laval 78

Macmaster 82

Western 80

Based on this table a method of Student should decide the admission and the method toString() should produce a String as in the following example:

Smith, average=87, York-admitted, McGill-rejected, UofT- rejected

Class ApplicationCentre extends JFrame. At the top of the file introduce as a comment your name and student number. In this applet you have to use as a starting point CardDeck.java which is part of the Java Programs files associated with Lecture 6. This program was used to introduce the CardLayout management.

The Main Screen has on the left hand side 3 buttons presented in a column. These buttons have the labels: Input, DisplayAll, Search. The user will click on these buttons to change the panels displayed in the right hand side of the screen (using the CardDeck layout manager). The followings are the description of the right panels (the "cards"). Note that you have some flexibility in organizing the layout of each panel.

The Input panel, uses labels to prompt the user and four textfields to enter the student name, the highschool average mark. This panel also contains a JList object containing the following 10 Canadian universities: Toronto, York, Western, Brock, Guelph, Waterloo, McGill, Concordia, Laval and Macmaster. From that list the user will select 3 universities. A Button labeled "Submit" displayed at the bottom of the panel allows the user to enter the input data coming from textfields and JList object into an array with maximum 100 Student objects. Do not forget to erase the content of the textfields when the Submit button is clicked and provide a label which shows how many students were entered (for instance it should say "student 5 out of 100").

Note: A sample of the Main Screen and Input panel is shown in the document shown below the Assignment 2 link.

The DisplayAll panel will present the content of the array of objects using a JTextArea object. In this textarea the students are displayed with the names in ascending order (you need to sort the array of objects using the Bubble Sort algorithm). The text in the JTextArea is displayed with a Serif style font in Italic and 12-point size.

The Search panel contains at the top the label Enter students name and next to that label a textfield. Below the panel contains a JTextArea, where the result of the search is displayed with in Arial style font and 14-point size. If the search for the student fails the textarea should contain the message Student not found.

Tests You should enter at least 3 candidates into the array of objects. Make sure that the names are not in ascending order and use high school averages over 75. After you test the two Display panels, enter one more candidate and check the DisplayAll panel again.

Please remember that you have to submit a working code. To ensure that it is a good idea to modify the file CardDeck.java make only small changes and checking that at all times you have a working code.

Hint: It is a good idea to write class ApplicationCentre with a single actionPerformed() method.

Marking Correct code for classes Student, 15%

Correct layout of the application showing the correct GUI components in the panels 25%

Correct capability in the Input panel 15%

Correct DisplayAll capability (includes sorted data, font change) 25%

Correct Search capability 20%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

What do you think it means to be healthy?

Answered: 1 week ago