//File: ArithmeticDriver.java import CSLib.*; public class ArithmeticDriver { public static void main (String [] args) { OutputBox out = new OutputBox("Arithmetic"); out.setSize(150,100); int x = 7, y = 3; //Since add() was not declared static in Arithmetic, //it is an instance method and so requires that we //instantiate an object of the Arithmetic class here. Pretty ridiculous //and cumbersome, isn't it? Arithmetic guy = new Arithmetic(); out.println (x + " + " + y + " = " + guy.add(x, y)); //Since subtract(), multiply(), and divide() are declared static //in Arithmetic, they may be accessed as class methods as follows. //This is exactly the way in which Math class methods are accessed; e.g., //Math.sqrt(), Math.abs(), etc. out.println (x + " - " + y + " = " + Arithmetic.subtract(x, y)); out.println (x + " X " + y + " = " + Arithmetic.multiply(x, y)); out.println (x + " / " + y + " = " + Arithmetic.divide(x, y)); } }