Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Thecount1

By: ace on May 5th, 2010  |  syntax: None  |  size: 1.20 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import java.util.ArrayList;
  2. /**
  3.  * Write a description of class TheCount here.
  4.  *
  5.  * @author (your name)
  6.  * @version (a version number or a date)
  7.  */
  8. public class TheCount
  9. {
  10.     // instance variables - replace the example below with your own
  11.     private ArrayList <String> counter;
  12.  
  13.     /**
  14.      * Constructor for objects of class TheCount
  15.      */
  16.     public TheCount()
  17.     {
  18.         // initialise instance variables
  19.         counter = new ArrayList<String>();
  20.     }
  21.  
  22.     private void fillCount(int index, String count)
  23.         {
  24.           counter.add(0, "one");
  25.           counter.add(1, "two");
  26.           counter.add(2, "three");
  27.           counter.add(3, "four");
  28.           counter.add(4, "five");
  29.           counter.add(5, "six");
  30.           counter.add(6, "seven");
  31.           counter.add(7, "eight");
  32.           counter.add(8, "nine");
  33.           counter.add(9, "ten");
  34.           }
  35.    
  36.     /**
  37.      * An example of a method - replace this comment with your own
  38.      *
  39.      * @param  y   a sample parameter for a method
  40.      * @return     the sum of x and y
  41.      */
  42.    public int tenTo10(String count)
  43.       {
  44.     while (return counter.indexOf(count) +1;
  45. }
  46.    
  47.        
  48.    
  49.  
  50. }