Class DJepApplet

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class DJepApplet extends Applet implements ActionListener
This class implements a simple command line utility for evaluating mathematical expressions. Usage: java org.lsmp.djep.DJepConsole [expression] If an argument is passed, it is interpreted as an expression and evaluated. Otherwise, a prompt is printed, and the user can enter expressions to be evaluated. To exit from the command prompt a 'q' must be entered. typing
diff(x^2,x)
will differentiate x^2 wrt 2. And
eval(x^2,x,3)
will calculate x^2 at x=3. Expresions like
eval(diff(diff(x^2+y^3,x),y),x,3,y,4)
are also allowed.
See Also:
  • Constructor Details

    • DJepApplet

      public DJepApplet()
  • Method Details

    • init

      public void init()
      Applet initialisation
      Overrides:
      init in class Applet
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Called when the Calculate button is pressed. Firsts differentiates the expresion in inputTF wrt variable in varTF, then simplifies it and puts results into outputTF.
      Specified by:
      actionPerformed in interface ActionListener
    • main

      public static void main(String[] args)
      Creates a new Console object and calls run()
    • initialise

      public void initialise()
      sets up all the needed objects.