Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CHALLENGE ACTIVITY 2 . 5 . 1 : Creating a recursive method. 5 2 2 5 6 2 . 3 5 7 8 1 9

CHALLENGE
ACTIVITY
2.5.1: Creating a recursive method.
522562.3578194. qx 3z qy 7
Jump to level 1
Complete increaseAmount 0's recursive case:
If amount 400, call increaseAmount(0 to compute the next week's amount as the current week's amount plus 15.
Otherwise, call increaseAmount(0 to compute the next week's amount as the current week's amount plus 50.
Ex: If the input is 420, then the output is:
week: 1, amount: 420
week: 2, amount: 435
week: 3, amount: 450
week: 4, amount: 465
week: 5, amount: 480
Study completed
import java.util.Scanner;
public class FundDetails {
public static void increaseAmount (int week, int amount){
System.out.println("week: "+ week +", amount: "+ amount);
if (week ==5){
System.out.println("Study completed");
}
else {
I* Your code goes here */
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions