Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CalcLauncher {
- public static void main(String[] args) {
- // Create the actual objects
- CalcService calculator = new CalcService();
- CalcHelper helper = new CalcHelper();
- // Print the instructions to the user
- helper.printInstructions();
- // Set the values
- calculator.setA(helper.readDouble());
- calculator.setB(helper.readDouble());
- // Choose operator
- calculator.setOperator(helper.readString());
- // Select operation
- helper.operationSelect(calculator.getOperator(),calculator.getA(), calculator.getB());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment