Final project for databases class.
In the GUI, a user either puts in information and presses a search button, or puts in information, selects an option from a drop down menu and pushes a search button. When the search button in pressed, a new instance of the Nurse class is created with the information that the user put in the search field assigned to its instance variable info. Then, depending on what information the user wants back, a string is passed to the search method which is called on the instance that was just created (see below).
- User puts in Nurse SSN and pushes search to get Nurse's name and Nurse's supervisor's name information
- A new instance of Nurse is created using Nurse n = new Nurse(whatever information was in the GUI field)
- The search method is called on Nurse with the String "NURSE" since you're searching the NURSE table in the database for information: n.search("NURSE")
- The search method will return a string containing the information requested that the GUI can then just print, the string will be properly formatted to immediately printed.