leo_kor

Calculator Launcher

Apr 9th, 2020
377
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class CalcLauncher {
  2.     public static void main(String[] args) {
  3.         // Create the actual objects
  4.         CalcService calculator = new CalcService();
  5.         CalcHelper helper = new CalcHelper();
  6.  
  7.         // Print the instructions to the user
  8.         helper.printInstructions();
  9.  
  10.         // Set the values
  11.         calculator.setA(helper.readDouble());
  12.         calculator.setB(helper.readDouble());
  13.  
  14.         // Choose operator
  15.         calculator.setOperator(helper.readString());
  16.  
  17.         // Select operation
  18.         helper.operationSelect(calculator.getOperator(),calculator.getA(), calculator.getB());
  19.     }
  20. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×