Skip to content

Instantly share code, notes, and snippets.

@0x000000AC
Created January 20, 2013 21:49
Show Gist options
  • Save 0x000000AC/4582019 to your computer and use it in GitHub Desktop.
Save 0x000000AC/4582019 to your computer and use it in GitHub Desktop.
/***********************************************************************
* Title: AaronClarkProg1.java
* Description:
* This program is the driver for APDissector.java and was created to
* fill partial requirements for CS219 at Park University. The basic
* ideas is that this driver instantiates a new APDissector object with
* the input shown below.
*
* Expected output:
* 1:919:882:5000
* 5000
* 1
* 882
* 919
*
* Company: Park University
* Author: Aaron P. Clark
* Email: aaron.clark@park.edu
* Date: 1/19/2013
* Last Change: 1/19/2013
***********************************************************************/
public class AaronClarkProg1
{
public static void main(String[] args)
{
ACDissector phone = new ACDissector("1:919:882:5000"); // Instantiates a new ACDissector object
System.out.println(phone.getPhoneNumber()); // calls no argument getPhoneNumber accessor in ACDissector class
System.out.println(phone.getPhoneNumber(4)); // returns the number: 5000
System.out.println(phone.getPhoneNumber(1)); // returns the country code: 1
System.out.println(phone.getPhoneNumber(3)); // returns the prefix
System.out.println(phone.getPhoneNumber(2)); // returns the area code
} // end main
} // end class AaronClarkProg1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment