Question: JAVA Question!!!!!!!!!!! PROBLEM PROMPT - Student Roster He has opened an obedience training school for dogs. Robert spends so much time sleeping on his couch

JAVA Question!!!!!!!!!!!

PROBLEM PROMPT - Student Roster

He has opened an obedience training school for dogs. Robert spends so much time sleeping on his couch that he is unaware of modern technology. So in his school, they keep all of their information in a text file.

In managing her obedience training school for dogs, Robert has decided he wants a slightly more sophisticated solution to managing his students. This Student Roster program must include a GUI that roughly looks like this:

Student Roster must provide the following features:

  • Add new student: To add a new student:
    1. Click the "New" button, at which point all of the input fields clear
    2. Enter the following fields:
      1. Name
        1. Required field
        2. Cannot be blank
        3. Must be unique -- there must not exist another student with this name
      2. Breed
        1. Drop-down list of choices: Bulldog, Chihuahua, French Bulldog, German Shepherd, Golden Retriever, Labrador Retriever, Pomeranian, Poodle, Pug, Siberian Husky, Other
        2. Bulldog is the default selection in this list
      3. Phone
        1. Required field
        2. Cannot be blank
        3. Cannot have any characters other than digits (0-9)
      4. Status
        1. Two radio buttons (exactly one must be selected)
          1. New Student
          2. Returning Student
      5. Courses
        1. Check boxes: Agility Training, Obedience 1, Obedience 2, Puppy Etiquette, Tricks
        2. Any number of check boxes can be checked (including 0)
        3. When a check box is checked or unchecked, the tuition is automatically updated (tuition is $100 per course).
      6. Notes
        1. Optional field, can be left blank
        2. Scrollable text area
    3. Click the "Save" button
      1. If any of the input is invalid, a warning dialog pops up, stating, "Invalid input!"
      2. If all input is valid, a dialog pops up, stating, "Student saved!" The new student is now part of the roster.
  • Navigate/view students: To navigate through the roster, use the "Previous" and "Next" buttons.
    • The roster should be arranged in alphabetical order by name (use the lexicographic ordering used by Java to order strings)
    • If the current student is the first one in the list, the "Previous" button should be disabled/grayed out.
    • If the current student is the last one in the list, the "Next" button should be disabled/grayed out.
  • Edit student: To edit an existing student's info:
    1. Navigate to the student using Previous/Next
    2. Edit any info in the student's fields
    3. Click the "Save" button
      1. If any of the input is invalid, a warning dialog pops up, stating, "Invalid input!"
        • Take care of the case in which the user attempts to change an existing student's name to one that already exists in the list. This should not be allowed.
      2. If all input is valid, a dialog pops up, stating, "Student saved!"
  • Delete student: To delete a student:
    1. Navigate to the student using Previous/Next
    2. Click the "Delete" button
    3. Show a confirmation dialog asking if the user is sure they want to delete the student before deleting it (hint: use a JOptionPane)
    4. After deleting, go to the first student in the roster, or if there are no students in the roster, just clear the form

Other Requirements/Details

  • Your GUI layout can vary slightly from the one shown above, but should follow the same basic pattern, and should have components nicely aligned and spaced out.
  • Your name and student id must be in the title of your window, like the screenshot above.
  • Clicking on "Delete" when no student is in view will just do nothing.
  • Clicking on "New" when the form is already cleared will just do nothing.
  • Clicking on "Save" when no info has been changed will still pop up the "Student Saved" dialog. (Although all this is bad UI/UX practice, it's fine for simplification purposes for this lab.)
  • The only required class that you must have is StudentRosterUI (with a main method). Any other classes are entirely up to you, but make sure you include them in your submission.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!