import java.util.EmptyStackException; import java.util.function.Supplier; import edu.uwm.cs.junit.LockedTestCase; import edu.uwm.cs351.Calculator; import edu.uwm.cs351.Operation; public class...

1 answer below ยป
Please look over the assignment


import java.util.EmptyStackException; import java.util.function.Supplier; import edu.uwm.cs.junit.LockedTestCase; import edu.uwm.cs351.Calculator; import edu.uwm.cs351.Operation; public class TestCalculator extends LockedTestCase { private Calculator calc; /** * Convert the result into a string, or into the name of the exception thrown * @param supp supplier of something, may return null * @return string of result, or simple name of exception thrown */ protected String toString(Supplier supp) { try { return ""+supp.get(); } catch (RuntimeException ex) { return ex.getClass().getSimpleName(); } } protected String howStopped(Runnable r) { try { r.run(); return "OK"; } catch (RuntimeException ex) { return ex.getClass().getSimpleName(); } } @Override protected void setUp() throws Exception { super.setUp(); calc = new Calculator(); } /// locked tests public void test() { // we test 1 + 2 * 3 - 4 = calc.value(1); assertEquals(1,calc.getCurrent()); calc.binop(Operation.PLUS); // what will the calculator window show after pressing '+' assertEquals(Ti(2130836036),calc.getCurrent()); calc.value(2); // what will the calculator window show after pressing '2' assertEquals(Ti(2132532626),calc.getCurrent()); calc.binop(Operation.TIMES); // what will the calculator window show after pressing '*' assertEquals(Ti(1743461167),calc.getCurrent()); calc.value(3); // what will the calculator window show after pressing '3' assertEquals(3,calc.getCurrent()); calc.binop(Operation.MINUS); // what will the calculator window show after pressing '-' // Not obvious: remember that minus is lower precedence than * and + (if after) assertEquals(Ti(203422342),calc.getCurrent()); calc.value(4); // what happens when we press '=' ? assertEquals(Ti(856279275),calc.compute()); testcont(true); } private void testcont(boolean ignored) { // we got an answer of 3. This is called the "default value". calc.binop(Operation.TIMES); calc.value(7); // what will the calculator show (don't be tricked!) assertEquals(Ti(1674274506),calc.getCurrent()); calc.sqrt(); // what is the integer (rounded down) square root of Ti(1674274506) ? assertEquals(Ti(1675006888),calc.getCurrent()); // do you remember what we were doing? assertEquals(Ti(2077042487),calc.compute()); testerror(false); } private void testerror(boolean ignored) { // default value is 6 // howStopped is "OK" is no exception thrown, // or the name of exception if one is thrown // what if we type "99"; assertEquals("OK",howStopped(() -> calc.value(99))); // and then enter another number? assertEquals(Ts(760326031),howStopped(() -> calc.value(55))); // then press + assertEquals(Ts(48507371),howStopped(() -> calc.binop(Operation.PLUS))); // then enter another number: 55 assertEquals("OK",howStopped(() -> calc.value(55))); // then a closing parenthesis assertEquals(Ts(1325211284),howStopped(() -> calc.close())); // but the closing paren did force computation: assertEquals(Ti(2128232356),calc.getCurrent()); // now press '/' calc.binop(Operation.DIVIDE); // now press 'clear' (red 'C') assertEquals(Ts(1998774167),howStopped(() -> calc.clear())); assertEquals(0,calc.getCurrent()); } public void testInit() { assertEquals(0,calc.getCurrent()); assertEquals(0,calc.compute()); } public void testValue() { calc.value(7); assertEquals(7,calc.getCurrent()); assertEquals(7,calc.compute()); } public void testAdd() { calc.value(1); calc.binop(Operation.PLUS); calc.value(2); assertEquals(2,calc.getCurrent()); assertEquals(3,calc.compute()); assertEquals(3,calc.getCurrent()); } public void testAddDefault() { calc.binop(Operation.PLUS); calc.value(17); assertEquals(17,calc.getCurrent()); assertEquals(17,calc.compute()); assertEquals(17,calc.getCurrent()); } public void testSub() { calc.value(6L); calc.binop(Operation.MINUS); calc.value(2); assertEquals(2,calc.getCurrent()); assertEquals(4,calc.compute()); assertEquals(4,calc.getCurrent()); } public void testSubDefault() { calc.binop(Operation.MINUS); calc.value(2); assertEquals(2,calc.getCurrent()); assertEquals(-2,calc.compute()); assertEquals(-2,calc.getCurrent()); } public void testPrecAddMul() { calc.value(5); calc.binop(Operation.PLUS); calc.value(6); calc.binop(Operation.TIMES); calc.value(7); assertEquals(7,calc.getCurrent()); assertEquals(47,calc.compute()); } public void testPrecMulAdd() { calc.value(5); calc.binop(Operation.TIMES); calc.value(6); calc.binop(Operation.PLUS); assertEquals(30,calc.getCurrent()); calc.value(7); assertEquals(7,calc.getCurrent()); assertEquals(37,calc.compute()); } public void testAssocDiv() { calc.value(144); calc.binop(Operation.DIVIDE); calc.value(8); calc.binop(Operation.DIVIDE); assertEquals(18,calc.getCurrent()); calc.value(3); assertEquals(3,calc.getCurrent()); assertEquals(6,calc.compute()); } public void testParenAddMul() { calc.open(); calc.value(5); calc.binop(Operation.PLUS); calc.value(6); calc.close(); assertEquals(11,calc.getCurrent()); calc.binop(Operation.TIMES); calc.value(7); assertEquals(7,calc.getCurrent()); assertEquals(77,calc.compute()); } public void testParenMulAdd() { calc.value(5); calc.binop(Operation.TIMES); calc.open(); calc.value(6); calc.binop(Operation.PLUS); assertEquals(6,calc.getCurrent()); calc.value(7); calc.close(); assertEquals(13,calc.getCurrent()); assertEquals(65,calc.compute()); } public void testLarge() { calc.value(1L<32); calc.binop(operation.times);=""><16);><48,calc.compute());><48,calc.getcurrent()); }="" public="" void="" testrecompute1()="" {="" calc.value(13);="" calc.binop(operation.plus);="" calc.value(77);="" assertequals(90,calc.compute());="" calc.value(25);="" assertequals(25,calc.compute());="" }="" public="" void="" testrecompute2()="" {="" calc.value(3);="" calc.binop(operation.times);="" calc.value(4);="" assertequals(12,calc.compute());="" calc.binop(operation.times);="" calc.value(5);="" assertequals(60,calc.compute());="" }="" public="" void="" testrecompute3()="" {="" calc.value(10);="" calc.binop(operation.divide);="" calc.value(3);="" assertequals(3,calc.compute());="" assertequals(3l,calc.compute());="" calc.binop(operation.times);="" calc.value(3);="" assertequals(9,calc.compute());="" }="" public="" void="" testrecompute4()="" {="" calc.value(6);="" calc.binop(operation.times);="" calc.value(7);="" assertequals(42,calc.compute());="" calc.value(100);="" calc.binop(operation.minus);="" calc.value(52);="" assertequals(48,calc.compute());="" calc.binop(operation.divide);="" calc.value(6);="" assertequals(8,calc.compute());="" }="" public="" void="" testparens()="" {="" calc.value(1);="" calc.binop(operation.minus);="" calc.open();="" calc.value(2);="" calc.binop(operation.minus);="" calc.open();="" calc.value(3);="" calc.binop(operation.minus);="" calc.value(4);="" calc.binop(operation.times);="" calc.value(5);="" calc.close();="" assertequals(-17,calc.getcurrent());="" calc.close();="" assertequals(19,calc.getcurrent());="" calc.binop(operation.plus);="" assertequals(-18,calc.getcurrent());="" calc.value(20);="" assertequals(2,calc.compute());="" }="" public="" void="" testdefaultclose()="" {="" calc.value(1);="" calc.binop(operation.minus);="" calc.open();="" calc.value(2);="" calc.binop(operation.minus);="" calc.open();="" calc.value(3);="" calc.binop(operation.minus);="" calc.value(4);="" calc.binop(operation.times);="" calc.value(5);="" compute="" should="" close="" any="" parens="" as="" needed.="" assertequals(-18,calc.compute());="" }="" public="" void="" testclear1()="" {="" calc.value(-144);="" calc.clear();="" calc.binop(operation.minus);="" calc.value(44);="" assertequals(-44,calc.compute());="" }="" public="" void="" testclear2()="" {="" calc.value(-144);="" calc.clear();="" calc.value(55);="" calc.binop(operation.minus);="" calc.value(44);="" assertequals(11,calc.compute());="" }="" public="" void="" testclear3()="" {="" calc.value(-144);="" calc.binop(operation.plus);="" calc.clear();="" calc.binop(operation.minus);="" calc.value(44);="" assertequals(-44,calc.compute());="" }="" public="" void="" testclear4()="" {="" calc.value(-144);="" calc.binop(operation.plus);="" calc.clear();="" calc.value(101);="" calc.binop(operation.minus);="" calc.value(44);="" assertequals(57,calc.compute());="" }="" public="" void="" testsqrt()="" {="" calc.value(4100);="" calc.sqrt();="" assertequals(64,calc.getcurrent());="" calc.sqrt();="" assertequals(8,calc.compute());="" calc.sqrt();="" calc.binop(operation.times);="" calc.value(3);="" assertequals(6,calc.compute());="" }="" public="" void="" testsqrtempty()="" {="" calc.sqrt();="" assertequals(0,calc.compute());="" }="" public="" void="" testsqrtlarge()="" {="" test="" to="" make="" sure="" sqrt()="" uses="" intmath.isqrt,="" not="" math.sqrt="" long="" l1="0x87654321L;" long="" l2="l1*l1;" calc.value(l2);="" calc.sqrt();="" assertequals(l1,calc.compute());="" calc.value(l2+1);="" calc.sqrt();="" assertequals(l1,calc.compute());="" calc.value(l2-1);="" calc.sqrt();="" assertequals(l1-1,calc.compute());="" }="" public="" void="" testsqrtnegativeone()="" {="" calc.value(-1);="" calc.sqrt();=""><32)-1,calc.compute()); }="" public="" void="" testsqrtnegative()="" {="" long="" l1=""><32)-1; long="" l2=""><33)+1; calc.value(l2); calc.sqrt(); assertequals(l1,calc.compute()); calc.value(l2+1); calc.sqrt(); assertequals(l1,calc.compute()); calc.value(l2-1); calc.sqrt(); assertequals(l1-1,calc.compute()); } /// error tests public void testerrorclose() { try { calc.close(); assertfalse("close() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerrorvaluevalue() { calc.value(8); try { calc.value(2); assertfalse("second value should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerrorvalueopen() { calc.value(8); try { calc.open(); assertfalse("open() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerrorvalueclose() { calc.value(8); try { calc.close(); assertfalse("close() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof emptystackexception); } } public void testerrorlparennotbinop() { try { calc.binop(operation.lparen); assertfalse("binop('(') should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalargumentexception); } } public void testerrorrparennotbinop() { try { calc.binop(operation.rparen); assertfalse("binop(')') should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalargumentexception); } } public void testerroropop() { calc.binop(operation.plus); try { calc.binop(operation.times); assertfalse("binop('*') should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerroropclose() { calc.binop(operation.plus); try { calc.close(); assertfalse("close() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerroropsqrt() { calc.binop(operation.plus); try { calc.sqrt(); assertfalse("sqrt() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerroropcompute() { calc.binop(operation.plus); try { calc.compute(); assertfalse("compute() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerroropenop() { calc.open(); try { calc.binop(operation.divide); assertfalse("binop('/') should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerroropenclose() { calc.open(); try { calc.close(); assertfalse("close() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerroropensqrt() { calc.open(); try { calc.sqrt(); assertfalse("sqrt() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerroropencompute() { calc.open(); try { calc.compute(); assertfalse("compute() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } } public void testerroclose() { calc.binop(operation.minus); calc.value(42); try { calc.close(); assertfalse("close() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof emptystackexception); } } public void testrecovery1() { calc.value(2); calc.binop(operation.plus); calc.value(3); calc.binop(operation.times); calc.value(4); try { calc.close(); assertfalse("close() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof emptystackexception); } assertequals(14,calc.getcurrent()); try { calc.value(13); assertfalse("value(13) should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } assertequals(14,calc.getcurrent()); calc.binop(operation.minus); calc.value(4); assertequals(10,calc.compute()); } public void testrecovery2() { calc.value(2); calc.binop(operation.plus); calc.value(3); calc.binop(operation.times); try { calc.sqrt(); assertfalse("sqrt() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } calc.value(4); assertequals(4,calc.getcurrent()); calc.binop(operation.minus); assertequals(14, calc.getcurrent()); calc.value(4); try { calc.open(); assertfalse("open() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } calc.sqrt(); assertequals(2, calc.getcurrent()); assertequals(12, calc.compute()); } public void testerrorcomplexrecovery() { try { calc.close(); assertfalse("close() should have raised error",true); } catch (runtimeexception e) { asserttrue("exception of wrong type: " + e.getclass().getname(), e instanceof illegalstateexception); } calc.value(1); calc.binop(operation.minus); try calc.value(l2);="" calc.sqrt();="" assertequals(l1,calc.compute());="" calc.value(l2+1);="" calc.sqrt();="" assertequals(l1,calc.compute());="" calc.value(l2-1);="" calc.sqrt();="" assertequals(l1-1,calc.compute());="" }="" error="" tests="" public="" void="" testerrorclose()="" {="" try="" {="" calc.close();="" assertfalse("close()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerrorvaluevalue()="" {="" calc.value(8);="" try="" {="" calc.value(2);="" assertfalse("second="" value="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerrorvalueopen()="" {="" calc.value(8);="" try="" {="" calc.open();="" assertfalse("open()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerrorvalueclose()="" {="" calc.value(8);="" try="" {="" calc.close();="" assertfalse("close()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" emptystackexception);="" }="" }="" public="" void="" testerrorlparennotbinop()="" {="" try="" {="" calc.binop(operation.lparen);="" assertfalse("binop('(')="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalargumentexception);="" }="" }="" public="" void="" testerrorrparennotbinop()="" {="" try="" {="" calc.binop(operation.rparen);="" assertfalse("binop(')')="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalargumentexception);="" }="" }="" public="" void="" testerroropop()="" {="" calc.binop(operation.plus);="" try="" {="" calc.binop(operation.times);="" assertfalse("binop('*')="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerroropclose()="" {="" calc.binop(operation.plus);="" try="" {="" calc.close();="" assertfalse("close()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerroropsqrt()="" {="" calc.binop(operation.plus);="" try="" {="" calc.sqrt();="" assertfalse("sqrt()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerroropcompute()="" {="" calc.binop(operation.plus);="" try="" {="" calc.compute();="" assertfalse("compute()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerroropenop()="" {="" calc.open();="" try="" {="" calc.binop(operation.divide);="" assertfalse("binop('/')="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerroropenclose()="" {="" calc.open();="" try="" {="" calc.close();="" assertfalse("close()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerroropensqrt()="" {="" calc.open();="" try="" {="" calc.sqrt();="" assertfalse("sqrt()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerroropencompute()="" {="" calc.open();="" try="" {="" calc.compute();="" assertfalse("compute()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" }="" public="" void="" testerroclose()="" {="" calc.binop(operation.minus);="" calc.value(42);="" try="" {="" calc.close();="" assertfalse("close()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" emptystackexception);="" }="" }="" public="" void="" testrecovery1()="" {="" calc.value(2);="" calc.binop(operation.plus);="" calc.value(3);="" calc.binop(operation.times);="" calc.value(4);="" try="" {="" calc.close();="" assertfalse("close()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" emptystackexception);="" }="" assertequals(14,calc.getcurrent());="" try="" {="" calc.value(13);="" assertfalse("value(13)="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" assertequals(14,calc.getcurrent());="" calc.binop(operation.minus);="" calc.value(4);="" assertequals(10,calc.compute());="" }="" public="" void="" testrecovery2()="" {="" calc.value(2);="" calc.binop(operation.plus);="" calc.value(3);="" calc.binop(operation.times);="" try="" {="" calc.sqrt();="" assertfalse("sqrt()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" calc.value(4);="" assertequals(4,calc.getcurrent());="" calc.binop(operation.minus);="" assertequals(14,="" calc.getcurrent());="" calc.value(4);="" try="" {="" calc.open();="" assertfalse("open()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" calc.sqrt();="" assertequals(2,="" calc.getcurrent());="" assertequals(12,="" calc.compute());="" }="" public="" void="" testerrorcomplexrecovery()="" {="" try="" {="" calc.close();="" assertfalse("close()="" should="" have="" raised="" error",true);="" }="" catch="" (runtimeexception="" e)="" {="" asserttrue("exception="" of="" wrong="" type:="" "="" +="" e.getclass().getname(),="" e="" instanceof="" illegalstateexception);="" }="" calc.value(1);="" calc.binop(operation.minus);="">
Answered 20 days AfterMar 12, 2021

Answer To: import java.util.EmptyStackException; import java.util.function.Supplier; import...

Shweta answered on Apr 02 2021
150 Votes
77558Solution/edu.uwm.cs351/.classpath

    
        
            
        
    
    
    
    
    
77558Solution/edu.uwm.cs351/.project

     edu.uwm.cs351
    
    
    
    
        
             org.eclipse.jdt.core.javabuilder
            
            
        
    
    
         org.eclipse.jdt.core.javanature
    
77558Solution/edu.uwm.cs351/.settings/org.eclipse.jdt.core.prefs
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/Calculator.class
package edu.uwm.cs351;
public synchronized class Calculator {
private util.Stack operands;
private util.Stack operators;
private long defaultValue;
priv
ate boolean expectingValue;
public void Calculator();
public void value(long);
public void open();
public void close();
public void binop(Operation);
public void sqrt();
private void step();
public long getCurrent();
public long compute();
public void clear();
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/CalculatorGUI$1.class
package edu.uwm.cs351;
synchronized class CalculatorGUI$1 implements Runnable {
void CalculatorGUI$1();
public void run();
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/CalculatorGUI$AddHexitsActionListener.class
package edu.uwm.cs351;
synchronized class CalculatorGUI$AddHexitsActionListener implements java.awt.event.ActionListener {
private final String hexits;
void CalculatorGUI$AddHexitsActionListener(CalculatorGUI, String);
public void actionPerformed(java.awt.event.ActionEvent);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/CalculatorGUI$ClearListener.class
package edu.uwm.cs351;
synchronized class CalculatorGUI$ClearListener implements java.awt.event.ActionListener {
private void CalculatorGUI$ClearListener(CalculatorGUI);
public void actionPerformed(java.awt.event.ActionEvent);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/CalculatorGUI$EqlListener.class
package edu.uwm.cs351;
synchronized class CalculatorGUI$EqlListener implements java.awt.event.ActionListener {
private void CalculatorGUI$EqlListener(CalculatorGUI);
public void actionPerformed(java.awt.event.ActionEvent);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/CalculatorGUI$OperationActionListener.class
package edu.uwm.cs351;
synchronized class CalculatorGUI$OperationActionListener implements java.awt.event.ActionListener {
private final Operation op;
void CalculatorGUI$OperationActionListener(CalculatorGUI, Operation);
public void actionPerformed(java.awt.event.ActionEvent);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/CalculatorGUI$ResultPane.class
package edu.uwm.cs351;
synchronized class CalculatorGUI$ResultPane extends javax.swing.JPanel {
private static final long serialVersionUID = 1;
private void CalculatorGUI$ResultPane(CalculatorGUI);
protected void paintComponent(java.awt.Graphics);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/CalculatorGUI$SqrtListener.class
package edu.uwm.cs351;
synchronized class CalculatorGUI$SqrtListener implements java.awt.event.ActionListener {
private void CalculatorGUI$SqrtListener(CalculatorGUI);
public void actionPerformed(java.awt.event.ActionEvent);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/CalculatorGUI.class
package edu.uwm.cs351;
public synchronized class CalculatorGUI extends javax.swing.JFrame {
private static final long serialVersionUID = 1;
private static final int FONT_SIZE = 20;
private java.awt.Font myFont;
private Calculator calculator;
private StringBuilder builder;
private CalculatorGUI$ResultPane resultPane;
public static void main(String[]);
public void CalculatorGUI();
private void handleBuilder();
private void handleException(RuntimeException);
private long getResult();
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/Operation$1.class
package edu.uwm.cs351;
synchronized enum Operation$1 {
void Operation$1(String, int, String, int);
public long operate(long, long);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/Operation$2.class
package edu.uwm.cs351;
synchronized enum Operation$2 {
void Operation$2(String, int, String, int);
public long operate(long, long);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/Operation$3.class
package edu.uwm.cs351;
synchronized enum Operation$3 {
void Operation$3(String, int, String, int);
public long operate(long, long);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/Operation$4.class
package edu.uwm.cs351;
synchronized enum Operation$4 {
void Operation$4(String, int, String, int);
public long operate(long, long);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/Operation.class
package edu.uwm.cs351;
public synchronized enum Operation {
public static final Operation PLUS;
public static final Operation MINUS;
public static final Operation TIMES;
public static final Operation DIVIDE;
public static final Operation LPAREN;
public static final Operation RPAREN;
private final String name;
private final int precedence;
static void ();
private void Operation(String, int, String, int);
public static Operation find(String);
public String toString();
public String getId();
public long operate(long, long);
public int precedence();
public static Operation[] values();
public static Operation valueOf(String);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/util/IntMath$Test.class
package edu.uwm.cs351.util;
public synchronized class IntMath$Test extends junit.framework.TestCase {
public void IntMath$Test();
public void testFirst25();
public void testLarge();
public void testLarger();
public void testEvenLarger();
public void testLargerStill();
public void testSpecial();
public void testLargest();
public void testStochastic();
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/util/IntMath.class
package edu.uwm.cs351.util;
public synchronized class IntMath {
public void IntMath();
public static long isqrt(long);
public static long isqr(long);
public static void main(String[]);
}
77558Solution/edu.uwm.cs351/bin/edu/uwm/cs351/util/Stack.class
package edu.uwm.cs351.util;
public synchronized class Stack implements Cloneable {
private final Class clazz;
private int maxSize;
private Object[] array;
private int top;
private static final int DEFAULT_CAPACITY = 1;
private Object[] makeArray(int);
public void Stack();
public void Stack(Class);
public boolean isEmpty();
private Object element(int);
public Object pop();
public Object peek();
public boolean isFull();
public Stack clone() throws CloneNotSupportedException;
public void push(Object);
public void clear();
}
77558Solution/edu.uwm.cs351/bin/TestCalculator.class
public synchronized class TestCalculator {
private edu.uwm.cs351.Calculator calc;
public void TestCalculator();
protected String toString(java.util.function.Supplier);
protected String howStopped(Runnable);
protected void setUp() throws Exception;
public void test();
private void testcont(boolean);
private void testerror(boolean);
public void testInit();
public void testValue();
public void testAdd();
public void testAddDefault();
public void testSub();
public void testSubDefault();
public void testPrecAddMul();
public void testPrecMulAdd();
public void testAssocDiv();
public void testParenAddMul();
public void testParenMulAdd();
public void testLarge();
public void testReCompute1();
public void testReCompute2();
public void testReCompute3();
public void testReCompute4();
public void testParens();
public void testDefaultClose();
public void testClear1();
public void testClear2();
public void testClear3();
public void testClear4();
public void testSqrt();
public void testSqrtEmpty();
public void testSqrtLarge();
public void testSqrtNegativeOne();
public void testSqrtNegative();
public void testErrorClose();
public void testErrorValueValue();
public void testErrorValueOpen();
public void testErrorValueClose();
public void testErrorLParenNotBinop();
public void testErrorRParenNotBinop();
public void testErrorOpOp();
public void testErrorOpClose();
public void testErrorOpSqrt();
public void testErrorOpCompute();
public void testErrorOpenOp();
public void testErrorOpenClose();
public void testErrorOpenSqrt();
public void testErrorOpenCompute();
public void testErroClose();
public void testRecovery1();
public void testRecovery2();
public void testErrorComplexRecovery();
}
77558Solution/edu.uwm.cs351/bin/TestStack$1Hidden.class
synchronized class TestStack$1Hidden extends edu.uwm.cs351.util.Stack {
void TestStack$1Hidden(TestStack);
public boolean isEmpty();
}
77558Solution/edu.uwm.cs351/bin/TestStack$2Hidden.class
synchronized class TestStack$2Hidden {
void TestStack$2Hidden(TestStack, java.util.Collection);
protected Object clone();
}
77558Solution/edu.uwm.cs351/bin/TestStack.class
public synchronized class TestStack extends junit.framework.TestCase {
private edu.uwm.cs351.util.Stack s;
static void ();
public void TestStack();
protected void assertException(Class, Runnable);
protected void setUp();
public void test00();
public void test01();
public void test10();
public void test11();
public void test12();
public void test13();
public void test14();
public void test15();
public void test16();
public void test17();
public void test18();
public void test19();
public void test20();
public void test21();
public void test22();
public void test23();
public void test24();
public void test25();
public void test26();
public void test27();
public void test28();
public void test29();
public void test30();
public void test31();
public void test32();
public void test38();
public void test39();
public void test40();
public void test41();
public void test42();
public void test43();
public void test48();
public void test49();
public void test50() throws CloneNotSupportedException;
public void test51() throws CloneNotSupportedException;
public void test52() throws CloneNotSupportedException;
public void test53() throws CloneNotSupportedException;
public void test54() throws CloneNotSupportedException;
public void test55() throws CloneNotSupportedException;
public void test56() throws CloneNotSupportedException;
public void test57() throws CloneNotSupportedException;
public void test58() throws CloneNotSupportedException;
public void test59() throws CloneNotSupportedException;
public void test90();
public void test91();
public void test92();
public void test93();
public void test94();
public void test99();
}
77558Solution/edu.uwm.cs351/bin/UnlockTests.class
public synchronized class UnlockTests {
public void UnlockTests();
public static void main(String[]);
private static void unlock(String,...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here