Question: Complete depositValue ( ) ' s recursive case: If amount 3 0 0 , call depositValue ( ) to compute the next week's amount as

Complete depositValue()'s recursive case:
If amount 300, call depositValue() to compute the next week's amount as the current week's amount plus 35.
Otherwise, call depositValue() to compute the next week's amount as the current week's amount plus 50.
Ex: If the input is 250, then the output is:
week: 1, amount: 250
week: 2, amount: 300
week: 3, amount: 335
week: 4, amount: 370
Projection ended
import java.util.Scanner;
public class Allowancedetails {
public static void depositvalue(int week, int amount){
System.out.println("week: "+ week +", amount: "+ amount);
if (week =-4){
System, out.println ("Projection ended");
}
else {
V. Your code goes here III
}
}.
 Complete depositValue()'s recursive case: If amount 300, call depositValue() to compute

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!