Question: JAVA - Question: COVID cases (100 points) The coronavirus pandemic has affected our lives, our economy, and nearly every corner of the globe. In country

JAVA - Question: COVID cases (100 points) The coronavirus pandemic has affected our lives, our economy, and nearly every corner of the globe. In country A, we found that the COVID cases are growing in a specific pattern. The cases triple in even months and double in odd months. Please see the following for the first 12 months assuming the start cases is three. Month 1

Month

1

2

3

4

5

6

7

8

9

10

11

12

cases

3

9

18

54

108

324

648

1944

3888

11664

23328

69984

in the starter code, you need to complete the two methods: JAVA getCases and getNumMonth. The getCases method should return the number of cases given the start cases and the target month.

For example, getCases(3,7) should return 648

getCases(3,12) should return 69984

The getNumMonth is the recursive method that returns the month of the cases collected. The first argument is the number of cases and the second argument is the start cases.

For example,

getNumMonth(3888, 3) should return 9.

getNumMonth(23328, 3) should return 11.

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!