Giter Site home page Giter Site logo

hospital-employee-database's Introduction

hospital-employee-database

HospitalEmployeeDatabase

The purpose of this project is to implement a system to store data for employees at UAB Hospital. You have to implement a for the user to interact with your system, via things like inputs that lead to different functions that display other things for the user, like the employeeList() function. Another aspect of the project was to implement a way to change the current stored data. I added ways to add and delete employees based on user input. Additionally, I had to implement a function to update the actual uabEmployee.txt file that stores the original employee data with the changes that were made by the user.

I created a ArrayList for every position. I created a class for every position as well, as well as a “SystemTester” class.. I implemented a toString overwrite in HospitalEmployee class, and then overwrote it in every every class, with a “super” call to each parent class’s “toString”. This allows me to implement the toString() function for child classes more easily, because it will automatically display the shared data that the parent class has for toString(). This will make implementing child toString functions less effort and less writing.

I constantly ask for user input in the form of numbers, and this guides the user into which methods they need to be directed towards. The data from uabEmployees.txt is automatically processed line by line, made into an Array split by “ “, and then based on what letter is located at index 0 of each line, an object is created in the correct position. Additionally, based on the letter located at index 0, it asks for different inputs to match the amount of parameters each position object requires. Getters and setters are made for every variable for every position as well.

This comes up when you first run the code. SystemTester’s method Menu() is being displayed:

Screen Shot 2022-10-12 at 5 24 08 PM

Here I enter “1” to see the employee list:

Screen Shot 2022-10-12 at 5 24 58 PM

It automatically brought me back to the menu, so now I’m going to hit “2” to add an employee.

Screen Shot 2022-10-12 at 5 25 35 PM

It will prompt to add all of the necessary information and then it will add the employee:

Screen Shot 2022-10-12 at 5 27 29 PM

Lets see it in the list by hitting 1:

Screen Shot 2022-10-12 at 5 28 03 PM

Now lets update the txt file. It is not currently exactly like the original since i have been messing with it:

Screen Shot 2022-10-12 at 5 28 41 PM

We don’t see the new person we added yet since we haven’t updated, but i’ll hit 3 (update database) now.:

Screen Shot 2022-10-12 at 5 29 23 PM

As you can see, in line 7 the new doctor has been added to the txt file. Now I am going to delete him, i’m going to hit 4:

Screen Shot 2022-10-12 at 5 30 00 PM

So because I typed Mitchell’s blazerID, it removed him from the system, now to save the changes we can hit update database, 3:

Screen Shot 2022-10-12 at 5 31 25 PM

As you can see, the database was updated and Mitchell was removed

hospital-employee-database's People

Contributors

mfkimbell avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.