Class COMPUTE

java.lang.Object
  |
  +--COMPUTE

public class COMPUTE
extends java.lang.Object

UD5 Example Class.

This class is provided for example purposes only.

Version:
$Revision: 1.5 $
Author:
Copyright (c) 2001 by March Hare Pty Ltd, Inc. All Rights Reserved.

Constructor Summary
COMPUTE()
           
 
Method Summary
static void ACCEPT()
          Placeholder.
static long ADD(double a, double b)
          Add two double's
static long ADD(java.lang.String a, java.lang.String b)
          Add the absolute value of the numeric portion of two strings
static void EXEC()
          Placeholder.
static java.lang.String HELLO()
          Return a test string
static java.lang.String[] HELLOA()
          Return an array of strings as a test
static void main(java.lang.String[] args)
          Test the class.
static void QUIT()
          Placeholder.
static int SUBTRACT(int a, int b)
          Subtract two integers
static int VAL(java.lang.String a)
          The absolute value of the numeric portion of a string.
static void VVAL(java.lang.String a)
          Determine the absolute value of the numeric portion of a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COMPUTE

public COMPUTE()
Method Detail

main

public static void main(java.lang.String[] args)
Test the class. Typically called from the command line to test the installation
    java COMPUTE
    Calculate 1+2= 3
 
Returns:
0 on success.
Throws:
Any -  

SUBTRACT

public static int SUBTRACT(int a,
                           int b)
Subtract two integers
Parameters:
a - first integer.
b - second integer.
Returns:
a minus b.

ADD

public static long ADD(double a,
                       double b)
Add two double's
Parameters:
a - first double
b - second double.
Returns:
a plus b.

ADD

public static long ADD(java.lang.String a,
                       java.lang.String b)
Add the absolute value of the numeric portion of two strings
Parameters:
a - first numeric string
b - second numeric string
Returns:
a plus b as a long.

HELLO

public static java.lang.String HELLO()
Return a test string
Returns:
"Hello World".

HELLOA

public static java.lang.String[] HELLOA()
Return an array of strings as a test
Returns:
"Mary had a little lamb...".

VAL

public static int VAL(java.lang.String a)
The absolute value of the numeric portion of a string.
Parameters:
a - A numeric string
Returns:
|a|.

VVAL

public static void VVAL(java.lang.String a)
Determine the absolute value of the numeric portion of a string.
Parameters:
a - A numeric string
Returns:
void.

ACCEPT

public static void ACCEPT()
Placeholder.
Returns:
void.

QUIT

public static void QUIT()
Placeholder.
Returns:
void.

EXEC

public static void EXEC()
Placeholder.
Returns:
void.