Question: the starter code is here and the code goes below the getallchoices method Suppose you are at the ice cream store trying to decide what

 the starter code is here and the code goes below the
getallchoices method Suppose you are at the ice cream store trying tothe starter code is here and the code goes below the getallchoices method

Suppose you are at the ice cream store trying to decide what combination of flovers ond toppings you want on your ice cream, but there's simply too many combinations to processl To aide you in this decision, you decide to write a program thatll print out every possble chaice for you Copy the code from IceCreamProctice.txt onte IDoodle. Inside is the following method: string[1[] getAl1choloes ( stringll flavoks, stringt) toppinge ) The main method is already completed for you. Only write code inside the get AllChoices method. The first parameter is an orray of Strings storing all possible flavors. The second parameter is an emay of Strings storing all possible toppings. The method will return a 20 -array (natrix) of Strings containing every possible combination of flovors and toppings. Each combination must be written using the following formati "(flavor) with (tepping) on top." Example: "Chocolate with Cherry on top." The following code: string[] flavors = (mocha", "vani11a"): string[] toppings = ("sprinkles", "fudge", "cherry): hing[] [1 combos = getal1choicest sprinkles, toppings in import java.ut:il.Arrays? public class Myclass \{ public static string[][] getAluchoices( String[] flavors, string[] toppings) [ i) public static void main( string[] args ) [ string[][] combos = getAl1Choices( flavors, toppings ): printMatrix( conbos ); ) public static void printhatrix( String[][] natrix) \& for ( int i=8;1 = Arrays.tostring( eatrix[1] ) )

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!