Question: Instructions: a. Write JAVA program using https://www.onlinegdb.com/online_java compiler b. Copy and paste the program of your answers in the notepad. c. Upload Your Notepad Answer

Instructions: a. Write JAVA program using https://www.onlinegdb.com/online_java compiler b. Copy and paste the program of your answers in the notepad.

c. Upload Your Notepad Answer File in e-learning.

d. Date of Submission: on or before December 20, 2020 1. Write a Java program for the given problem using Array. Ibri Hospital wants to create an application to calculate the salary for Doctors. The program should read the number of Doctors. The program will accept the Doctor ID, Doctor name, and Basic salary of all Doctors. If Basic salary is less than or equal to 500, then HR Allowance is 150, Medical Allowance is 25% of Basic salary and Tax deduction is 20% of Basic salary. If Basic salary is greater than 500 and less than or equal to 1000, then HR Allowance is 250, Medical Allowance is 35% of Basic salary and Tax deduction is 30% of Basic salary. If Basic salary is greater than 1000, then HR Allowance is 350, Medical Allowance is 45% of Basic salary and Tax deduction is 40% of Basic salary. Gross salary Basic salary +HR Allowance + Medical Allowance. Net salary = Gross Salary-Tax deduction Display Doctor ID, Doctor name, Basic salary and Net Salary of all the Doctors.

2. Write a Java program using Array to perform the following: Read array size from the user and create an integer array Accept the array elements from the user and perform the following: > Print sum of Odd numbers in the array. > Print how many Odd numbers present in the array.

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 Programming Questions!