de.nidanet.dev.math.calculator
Class Logic

java.lang.Object
  extended by java.util.Observable
      extended by de.nidanet.dev.math.calculator.Logic

public class Logic
extends Observable

The MODEL of the calculator.

Since:
2009-07-30
Version:
0.9
Author:
Nico Danneberg

Field Summary
static char ADD
           
private  boolean comma
           
private  char CurOp
           
private  BigDecimal CurRes
           
static char DIV
           
private  char[] InputLine
           
static char MIN
           
static char MUL
           
static char NaN
           
 
Constructor Summary
Logic()
           
 
Method Summary
 void append(char c)
           
private  void calc()
           
 void doCalculation()
           
 void doOperation(char op)
           
 String getDisplayLine()
           
 boolean isCommaUsed()
           
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NaN

public static final char NaN
See Also:
Constant Field Values

ADD

public static final char ADD
See Also:
Constant Field Values

MIN

public static final char MIN
See Also:
Constant Field Values

MUL

public static final char MUL
See Also:
Constant Field Values

DIV

public static final char DIV
See Also:
Constant Field Values

CurOp

private char CurOp

CurRes

private BigDecimal CurRes

InputLine

private char[] InputLine

comma

private boolean comma
Constructor Detail

Logic

public Logic()
Method Detail

append

public void append(char c)

doOperation

public void doOperation(char op)

doCalculation

public void doCalculation()

getDisplayLine

public String getDisplayLine()

isCommaUsed

public boolean isCommaUsed()

calc

private void calc()