From c69284136a75f3eaf5460aa918781f1e8a9d3c91 Mon Sep 17 00:00:00 2001 From: Senyr <102770968+Senyr@users.noreply.github.com> Date: Tue, 29 Aug 2023 20:16:05 -1000 Subject: [PATCH] Update Hr.md --- projects/Hr.md | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/projects/Hr.md b/projects/Hr.md index 79d5401..9d58ebc 100644 --- a/projects/Hr.md +++ b/projects/Hr.md @@ -1,7 +1,7 @@ --- layout: project type: project -image: img/micromouse/micromouse-square.jpg +image: img/download.jpg title: "HR" date: 2022 published: true @@ -18,18 +18,29 @@ summary: "I created a program that can add/delete employees and add certain info The Hr program will give you options based off what you want to do such as 1) Add employee 2) Remove employee 3) Print employees that earn a given amount 4) Print all the employees. Based off the option you choose there is a prompt that tells you what to do and it stores the information between each option. -Here is some code that illustrates how we read values from the line sensors: +Here is some code that shows how to add an employee: + + public static Employee[] removeEmployee(Employee [] employeeArray) { + Scanner input = new Scanner(System.in); + int enumb = 0; + System.out.println("Please enter the employee number you want to remove"); + try{ + enumb = input.nextInt(); + } + catch(InputMismatchException ime){ + System.out.println("Please enter the valid credentials"); + return employeeArray; + } + for(int i = 0; i < employeeArray.length; i++) { + if(employeeArray[i] != null){ + if(employeeArray[i].getEnumb() == enumb){ + employeeArray[i] = null; + + System.out.println("You have removed the employee"); + } + } + } + return employeeArray; -```cpp -byte ADCRead(byte ch) -{ - word value; - ADC1SC1 = ch; - while (ADC1SC1_COCO != 1) - { // wait until ADC conversion is completed - } - return ADC1RL; // lower 8-bit value out of 10-bit data from the ADC -} -``` You can learn more at the [UH Micromouse News Announcement](https://manoa.hawaii.edu/news/article.php?aId=2857).