Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. package jfx;
  2.  
  3. import javafx.event.ActionEvent;
  4. import javafx.event.EventHandler;
  5.  
  6. public class RechenEngine implements EventHandler<ActionEvent> {
  7.  
  8. public static final String OPERATION_ADD = "addition";
  9. public static final String OPERATION_SUB = "subtraktion";
  10. private static final String OPERATION_NONE = "";
  11.  
  12. private double operandA;
  13. private double operandB;
  14. private double ergebnis;
  15. private String operation;
  16.  
  17. public RechenEngine(double operandA, String operation) {
  18. this.operandA = operandA;
  19. this.operation = operation;
  20. }
  21.  
  22. public void setOperandA(double operandA) {
  23. this.operandA = operandA;
  24. }
  25.  
  26. public void setOperandB(double operandB) {
  27. this.operandB = operandB;
  28. }
  29.  
  30. public void setOperation(String operation) {
  31. this.operation = operation;
  32. }
  33.  
  34. public void clear() {
  35.  
  36. }
  37.  
  38. public void executeOperation() {
  39.  
  40. }
  41.  
  42. @Override
  43. public void handle(ActionEvent actionEvent) {
  44. System.out.println(operandA);
  45.  
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement