Class ExceptionDemoApp

java.lang.Object
  |
  +--ExceptionDemoApp

public class ExceptionDemoApp
extends java.lang.Object

ExceptionDemoApp.java Created: Sat Jan 11, 2003

Author:
Stuart C. Shapiro Demonstrates the usefulness of Java assertions and exceptions.

Constructor Summary
ExceptionDemoApp()
           
 
Method Summary
static void CheckPhoneNumber(java.lang.String n)
          Prints n, formatted as a 10-digit phone number, with the comment that it is a possible phone number.
static void main(java.lang.String[] args)
          Driver for ExceptionDemoApp, demonstrating an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionDemoApp

public ExceptionDemoApp()
Method Detail

CheckPhoneNumber

public static void CheckPhoneNumber(java.lang.String n)
Prints n, formatted as a 10-digit phone number, with the comment that it is a possible phone number.

pre: n.length == 10.

post: n is printed as a 10-digit phone number, formatted as a phone number, with the comment that it is a possible phone number.

Parameters:
n - a 10-digit String.

main

public static void main(java.lang.String[] args)
Driver for ExceptionDemoApp, demonstrating an exception.