Question: Use Java Gerbil Problem This section defines a game with a pet gerbil that descends into crevices to acquire precious metal nuggets. Since gerbils are

Use Java
 Use Java Gerbil Problem This section defines a game with a
pet gerbil that descends into crevices to acquire precious metal nuggets. Since

Gerbil Problem This section defines a game with a pet gerbil that descends into crevices to acquire precious metal nuggets. Since gerbils are small, you gerbil can only carry 10 ounces. Rhodium is the most valuable metal, Platinum is the second most valuable metal, Gold is the third most valuable metal, and Ruthenium is the least valuable metal. You want to train your gerbil such that whern sent into a crevice, the gerbil returns with the most valuable haul. For example, if the crevice contains 5 ounces of Rhodium, 6 of Platinum, 4 of Gold, and 7 of Ruthenium, I want her to return with 5 ounces of Rhodium and 5 of Platinum. Create a Java class Gerbil that has a found method with the following signature. public static void found (int rhodium, int platinum, int gold, int ruthenium) The formal parameters are the amounts of Rhodium, Platinum, Gold, and Ruthenium in the crevice. The method found prints to the console the best retrieval of metal for that trip into the crevice. The following are example calls to the method found

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!