Please find the remark “for question 11” in the given incomplete program. What expression should replace the blank line? When typing

Excerpt
// for question 11 finalAmount = System.out.printf(“%-6d%-8d%-16.2f%-30.2f%n”, year, quarter, interest, finalAmount); // for question 12 // for question 13 // for question 14 // for question 15 System.out.printf(“%-6d%-8d%-16.2f%-30.2f%n”, year, quarter, interest, finalAmount); System.exit (8); // end of the main method // end of the class

Please find the remark “for question 11” in the given incomplete program. What expression should replace the blank line? When typing your answer, do NOT put spaces where optional spaces may be placed and do NOT include the ; because it is already given. Attached is the desired sample run and partially done program Transcribed Image Text: Enter the year: 2019
Enter the initial principal: 10000
Principal = 10000.00
Annual Interest Rate = 5.00%
Year
Quarter Interest Earned Amount at the end of quarter
2019
1
125.00
10125.00
2019
126.56
10251.56
2019
3
128.14
10379.71
2019 4
129.75
10509.45
Legend:
Red-colored text are inputs from the user via the keyboard. Transcribed Image Text: // Incomplete Program (The Scanner class is used for data entry)
import java.lang.*;
import java.util.*;
public class MoneyInBank {
public static void main(String[] args) {
Scanner keyboard = new Scanner (System.in);
float annualRate = 0;
float quarterlyRate = 0;
0;
double principal
8;
8;
double interest
double finalAmount
(byte) 0;
byte quarter
int year – 0;
// for question 1
System.out.print (“Enter the year: “);
// for question 2
annualRate =
year
System.out.print (“Enter the initial principal: “);
principal – ;
System.out.printin();
System.out.printf(“%s%.2f%n”, “Principal = “, _
System.out.printf (“%5%.2f%c%n”, “Annual Interest Rate = “, annualRate * 100, ‘%’);
System.out.printf (“%-65%-85%-165%-30s%n”, “Year”, “Quarter”, “Interest Earned”,
// for question 3
_); // for question 4
“Amount at the end of quarter”);
// for question 5
quarterlyRate
quarter = 1;
interest =
// for question 6
finalAmount = printcipal + interest;
System.out.printf(“%-6d%-8d%-16.2f%-30.2f%n”, year, quarter, interest, finalAmount);
principal = final Amount;
quarter =
// for question 7
// for question 8
+ interest;
finalAmount = principal
System.out.printf(“%-6d%-8d%-16.2f%-30.2f%n”, year, quarter, interest, finalAmount);
principal = finalAmount;
// for question 9
// for question 10
// for question 11
finalAmount =
System.out.printf(“%-6d%-8d%-16.2f%-30.2f%n”, year, quarter, interest, finalAmount);
// for question 12
// for question 13
// for question 14
// for question 15
System.out.printf(“%-6d%-8d%-16.2f%-30.2f%n”, year, quarter, interest, finalAmount);
System.exit (8);
// end of the main method
// end of the class

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.


Click Here to Make an Order Click Here to Hire a Writer