Advertisement
calcpage

APCS2012_C4X17_MonthConverter.java

Oct 19th, 2012
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.49 KB | None | 0 0
  1. /*
  2. MonthConverter.java     MrG 2012.1019
  3. purpose:    translates numbers to month names
  4. required files: MonthConverter.java     main class
  5.         Month.java          derived class
  6. translator: javac MonthConverter.java
  7. interpreter:    java MonthConverter month
  8. */
  9.  
  10. //main class
  11. public class MonthConverter
  12. {
  13.     public static void main(String[] args)
  14.     {
  15.         int month = Integer.parseInt(args[0]);
  16.  
  17.         Month harinee = new Month(month);
  18.  
  19.         System.out.println("month # " + month + " is " + harinee.getName());
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement