Question: creaate a java program. Get the user inputs in the main method then pass them to a method you can define,calculaye the loan and return

creaate a java program.
Get the user inputs in the main method then pass them to a method you can define,calculaye the loan and return it to the main to print out.
Validate salary and yox before passing them to the method.
use while loop to allow user to try again in case they entered an invalid imput  creaate a java program. Get the user inputs in the main

Ask the user to enter the annual salary and years of experience (yox) of an employee. The program checks the salary if its greater than $50000, the program checks if yox is greater than 10 , a loan of $5000 is given, otherwise, a loan of $4000 is given. However, if the salary is greater than $4000e, a loan of $3000 is given, otherwise no loan is given. /luse the scanner to get the salary and yox from the user. //decalre loan variable as double if (salary > se00e) if ( yox >10) else loan =5000; loan=4000; else if (salary > 40000) loan =3000; else loan =0.0; System, out.println("The loan given is: " + loan)

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