code:
/**
* Purpose: print the asterisks
* @param storeNumber the store number
* @param inputString the user input string
*/
public void printAsterisk(String storeNumber, String inputString) {
if (inputString != null && inputString.length() > 0) {
// convert the input string as an int
int inputStringAsInt = Integer.parseInt(inputString);
// get the number of asterisks to output
// get the mod of the input
int numAsterisks = inputStringAsInt % 100;
// output
System.out.print(String.format("Store %s:", storeNumber));
for (int i=0; i < numAsterisks;i++) {
System.out.print("*");
}
System.out.println("");
}
}