The answers for the question below on Chegg does not work. Please give me a scri
ID: 3673896 • Letter: T
Question
The answers for the question below on Chegg does not work. Please give me a script that works.
Determine Loan Interest Rate based on credit scores. Use if..else statements to find the interest rate.
Write a program that will give the interest rate for a new car loan based on a credit score.
Credit score Interest Rate
850-720 5.56%
719-690 6.38%
660 689 7.12%
625-659 9.34%
590-624 12.45%
Below 590 no credit issued.
Prompt the user for the credit score. Determine and display the user input credit score and the interest rate associated with the credit score.
Explanation / Answer
import java.util.Scanner; public class CreditScore { public static void main( String[] args ) { // declare and initialize variables int creditScore; double loanAmount, interestRate, interestAmount; final double l_a=5.56,l_b=6.38,l_c=7.12,l_d=9.34,l_e=12.45,l_f=0; String instructions = "This program calculates annual interest " + "based on a credit score. "; String output; Scanner input = new Scanner( System.in ); // for receiving input from keyboard // get input from user System.out.println( instructions ); System.out.print( "Enter the loan amount: $ " ); loanAmount = input.nextDouble(); System.out.print( "Enter the credit score: " ); creditScore = input.nextInt(); System.out.println(); // print blank line // process data if( creditScore >= 720 && creditScore = 690 && creditScore = 660 && creditScore = 625 && creditScore = 590 && creditScoreRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.