Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Testmain {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- IntCalculator x;
- try{
- x = new IntCalculator (8,6);
- x.displayDetail();
- }
- catch (CEDNumberException e){
- System.err.println (e.getErrorMessge());
- }
- catch (CEDDividedByZeroException e) {
- String msg = e.getErrorMessge();
- System.err.println(msg);
- }
- }
- }
- //int add = x.add();
- // int subtract = x.subtract();
- // int multiply = x.multiply();
- // int divide = x.divide();
- // System.out.println ("X="+x.getX());
- // System.out.println ("Y="+x.getY());
- // System.out.println ("add+ x+y=" + add);
- // System.out.println ("subtractx x-y = "+subtract);
- // System.out.println ("multiply x*y = "+ multiply);
- //System.out.println ("divide x/y =" +divide);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement