This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gk; | |
import static java.math.BigDecimal.ZERO; | |
import java.math.BigDecimal; | |
import java.util.Scanner; | |
public class AmountParser { | |
Scanner sc = new Scanner(System.in); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Reads only valid amount from standard output and returns | |
* it to the caller. | |
* | |
* @param prompt to be shown to the user to mark where to input | |
* @param min amount allowed | |
* @param max amount allowed | |
* @return the valid amount | |
*/ | |
public BigDecimal inputBigDecimalValue(String prompt, BigDecimal min, BigDecimal max) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package application; | |
/* ... */ | |
// Application level is the holder of primary drivers | |
// This is actually the specific implementation of the application server | |
// (SparkJava in this case) | |
public class Emapp implements Runnable { | |
private final Mapper mapper; |
OlderNewer