Question Completion Status: QUESTION 28 Write a method that meets the requiremen
ID: 3726935 • Letter: Q
Question
Question Completion Status: QUESTION 28 Write a method that meets the requirements of the following comment. // printHigherBank // The purpose of this method is to print the name of the bank that provides the I 1arger rate. If both rates are the same, print the name of the first bank // Input Arguments: bankName1, ratel, bankNane2, zate2 the names two banks (as Strings) and the rates they offer (as doubles) // Return Value:none Words:0Explanation / Answer
public void printHigherBank(String bankName1, double rate1, String bankName2, double rate2) { if(rate1 >= rate2) { System.out.println(bankName1); } else { System.out.println(bankName2); } }
Related 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.