Answer:
Complete the program as follows:
1. Replace
String combo =
with
String combo = customerOrder.substring(0);
2. Replace
Integer comboNumber =
with
Integer comboNumber = Integer.parseInt(combo);
Explanation:
Required
Fill in the missing codes
From the code given, there are only two gaps to be filled and they are:
1. String combo =
2. Integer comboNumber =
1. String combo =
The first is to get the first index of customerOrder using substring.
The syntax of this is:
variable.substring(0);
In this case, the syntax will be replaced with:
<em>String combo = customerOrder.substring(0);</em>
Where customerOrder represents the string variables
2. Integer comboNumber =
This is to convert combo from string to integer using parseInt
This is done as follows:
Integer comboNumber = Integer.parseInt(combo);
<em>See attachment for complete code</em>