Answer:
Replace /* Your solution goes here */
with
<em>const int CENTS_PER_POUND = 25;
</em>
<em>
cout << "Weight(lb): ";
</em>
<em>cin >> shipWeightPounds;
</em>
<em>shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;
</em>
<em />
Explanation:
This line declares and initializes CENTS_PER_POUND as constant integer to 25
const int CENTS_PER_POUND = 25;
This line prompts user for weight of shipment
cout << "Weight(lb): ";
This line gets weight from the user
cin >> shipWeightPounds;
This line calculates the cost of shipment
shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;
Answer:
I think option C is correct
Answer:
The FAFSA4caster is a free financial aid tool from the federal government that allows you to practice filling out the Free Application for Federal Student Aid (FAFSA) and estimate the financial aid you could receive based on student and family assets and income.
Answer:
what does that even say omg
Answer:
Explanation:
The following modified code correctly uses recurssion to reverse the string that was passed as a parameter to the reverseString method. A test output using the runner class can be seen in the attached image below.
import java.util.Scanner;
class U10_L2_Activity_One {
public static String reverseString(String str) {
if (str.isEmpty()) {
return str;
}
return reverseString(str.substring(1)) + str.charAt(0);
}
}
class runner_U10_L2_Activity_One
{
public static void main(String[] args)
{
System.out.println("Enter string:");
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
System.out.println("Reversed String: " + U10_L2_Activity_One.reverseString(s));
}
}