Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Contents The user will type in some data on the left panel. When the user clicks on the OK button, the the typed data will

Contents

The user will type in some data on the left panel. When the user clicks on the "OK" button, the the typed data will be transferred to the right panel. Then a student object will be created, the student's information will be displayed including an evaluation of the student's GPA.

image text in transcribed

1- Layout

  • The lab needs a layout in control panel with a panel on the left where the data will be typed in and a panel on the right where the data will be displayed.
  • The layout of panel left and of panel right should be very similar to the picture above. Very little differences are expected due to the use of different operating systems.

2- Content of Panels

  • Control Panel:
    • has two panels (left and right) already created in the starter Netbeans package.
  • Left panel:
    • two labels with the description of what needs to be typed for first name and last name
    • It has to ask for first name and last name using JTextFields
    • a label asking for the age
    • It asks for the students age using a JSlider
    • A button to display the student's GPA
    • A button to generate a random GPA
    • a message button
    • a OK button
  • Right panel
    • it has a button that will display the students' information
    • it has a button to display the student GPA's assessment

3- Listening requirements

  • the OK button has to be listened in the right panel. This means that the right panel will implement the ActionListener that will be used when OK is pressed.
  • The listener for the GPA button has to be implemented in the left panel. This means that the left panel will implement the ActionListener that will be used when the "calculate GPA" button is pressed.

4- Scenarios

  • All the information is correct
    1. the user types the first name
    2. the user types the last name
    3. the user chooses an age
    4. the user presses the "calculate GPA" button
    5. the GPA is displayed on the GPA button
    6. the OK button is pressed
      1. the student information is displayed on the big button on the right panel
      2. the GPA assessed and a message is displayed in the small button on the right panel
  • All the information is correct
    • the calculated GPA is
      1. between 0 and 1.00
        • the GPA assessment button on the right panel becomes red
      2. between 1.01 and 2.00
        • the GPA assessment button on the right panel becomes pink
      3. between 2.00 and 3.00
      • the GPA assessment button on the right panel becomes orange
    • between 3.00 and 3.50
      • the GPA assessment button on the right panel becomes green
    • greater than 3.50
      • the GPA assessment button on the right panel becomes green
      • the message "You made the Dean's List !!!!!" is displayed on the GPA assessment button
  • Some information is missing
    1. the user does not type the first name or the last name
    2. the OK button is pressed
    3. a message saying "Student name cannot be blank" is displayed on the message button
      1. "Error" is displayed on both buttons in the right panel
  • Some information is missing
    1. the user does not asks the GPA to be calculated (GPA value is still zero)
    2. the OK button is pressed
    3. a message saying "Calculate the GPA before submitting" is displayed on the message button
      1. "Error" is displayed on both buttons in the right panel

*****PLEASE INCLUDE SCREENSHOT OF OUTPUT****

Lab 08 Starter First Name Last Name Student Info Age 15 20 25 30 35 0.0 GPA Calculator Message GPA Assessment

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

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions