Task 3: Statistics using arrays: by java programming With the spread of COVID 19, the HR department in a company has decided to conduct some statistics among the employees in order to determine the number of infections according to some conditions. For each employee, they have to record the code, name, age, whether he/she was infected or no and the remaining days of leaves for him/her. You are requested to write the program that maintains the lists of details for the employees as mentioned above using the concept of arrays. The program repeats the display of a menu of services until the user decides to exit. 1. Start by initializing the employee details by reading them from the keyboard. 2. Repeat the display of a menu of 4 services, perform the required task according to the user’s choice and asks the user whether he/she wants to repeat or no. You need to choose one service from each category (‘A’,’B’,’C’,’D’) a. A. Display the total number of employees that were infected b. B. Display the number of employees above certain age that were infected c. B. Display the number of employees under certain age that were infected d. B. Display the number of employees that have expired their leaves e. A. Display the average age of infected person f. C. Display the age of the youngest person g. C. Display the age of the oldest person

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Task 3: Statistics using arrays: by java programming With the spread of COVID 19, the HR department in a company has decided to conduct some statistics among the employees in order to determine the number of infections according to some conditions. For each employee, they have to record the code, name, age, whether he/she was infected or no and the remaining days of leaves for him/her. You are requested to write the program that maintains the lists of details for the employees as mentioned above using the concept of arrays. The program repeats the display of a menu of services until the user decides to exit. 1. Start by initializing the employee details by reading them from the keyboard. 2. Repeat the display of a menu of 4 services, perform the required task according to the user’s choice and asks the user whether he/she wants to repeat or no. You need to choose one service from each category (‘A’,’B’,’C’,’D’) a. A. Display the total number of employees that were infected b. B. Display the number of employees above certain age that were infected c. B. Display the number of employees under certain age that were infected d. B. Display the number of employees that have expired their leaves e. A. Display the average age of infected person f. C. Display the age of the youngest person g. C. Display the age of the oldest person h. D. Search an employee by code and display all his/her details i. D. Search an employee by name and display all his/her details 3. Write your reflection on completing Task 3.1 and Task 3.2 and demonstrate your understanding on Arrays and Loops concepts used in your code.
Initialization
Enter the total number of employees
2
*** Employee 1**
Enter the code of the employee
101
Enter the name of the employee
Ahmed
Enter the age of the employee
55
Enter True if the employee was infected with COVID19
True
Enter the number of leave days of the employee
30
*****Menu of services*******
A. Display the total number of employees that were infected
B. Display the number of employees above certain age that were infected
c. Display the age of the oldest person
D. Search an employee by code and display all his/her details
Enter your choice
D
Enter the employee code
102
The code:102
The name:Amal
The age:30
Previously infected?:true
The available leave balance:30
Do you want to repeat. Press 'Y' or 'y'
Transcribed Image Text:Initialization Enter the total number of employees 2 *** Employee 1** Enter the code of the employee 101 Enter the name of the employee Ahmed Enter the age of the employee 55 Enter True if the employee was infected with COVID19 True Enter the number of leave days of the employee 30 *****Menu of services******* A. Display the total number of employees that were infected B. Display the number of employees above certain age that were infected c. Display the age of the oldest person D. Search an employee by code and display all his/her details Enter your choice D Enter the employee code 102 The code:102 The name:Amal The age:30 Previously infected?:true The available leave balance:30 Do you want to repeat. Press 'Y' or 'y'
**Employee 2**
Enter the code of the employee
102
Enter the name of the employee
Amal
Enter the age of the employee
Be
Enter True if the employee was infected with COVID19
True
Enter the number of leave days of the employee
30
******Menu of services*****
A. Display the total number of employees that were infected
B. Display the number of employees above certain age that were infected
c. Display the age of the oldest person
D. Search an employee by code and display all his/her details
Enter your choice
A
1. Total number of employees that were infected:2
Do you want to repeat. Press 'Y' or 'y'
y
***** Menu of services********
A. Display the total number of employees that were infected
B. Display the number of employees above certain age that were infected
C. Display the age of the oldest person
D. Search an employee by code and display all his/her details
Enter your choice
B
Enter the age
5e
2. The number of employees above certain age that were infected:1
Do you want to repeat. Press 'Y' or 'y'
y
*****Menu of services**
A. Display the total number of employees that were infected
B. Display the number of employees above certain age that were infected
c. Display the age of the oldest person
D. Search an employee by code and display all his/her details
Enter your choice
C
The age of the oldest person: 55
Do you want to repeat. Press 'Y' or 'y'
Transcribed Image Text:**Employee 2** Enter the code of the employee 102 Enter the name of the employee Amal Enter the age of the employee Be Enter True if the employee was infected with COVID19 True Enter the number of leave days of the employee 30 ******Menu of services***** A. Display the total number of employees that were infected B. Display the number of employees above certain age that were infected c. Display the age of the oldest person D. Search an employee by code and display all his/her details Enter your choice A 1. Total number of employees that were infected:2 Do you want to repeat. Press 'Y' or 'y' y ***** Menu of services******** A. Display the total number of employees that were infected B. Display the number of employees above certain age that were infected C. Display the age of the oldest person D. Search an employee by code and display all his/her details Enter your choice B Enter the age 5e 2. The number of employees above certain age that were infected:1 Do you want to repeat. Press 'Y' or 'y' y *****Menu of services** A. Display the total number of employees that were infected B. Display the number of employees above certain age that were infected c. Display the age of the oldest person D. Search an employee by code and display all his/her details Enter your choice C The age of the oldest person: 55 Do you want to repeat. Press 'Y' or 'y'
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY