Advertisement
Guest User

PrettyDates

a guest
May 26th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. import static java.lang.System.out;
  2.  
  3. public class PrettyDates
  4. {
  5.  
  6. //methods
  7. //nameFormat
  8. public static int nameFormat(int year, int month, int day)
  9. {
  10. System.out.println("asdfhadf");
  11. }
  12. //slashFormat
  13. public static int slashFormat(int year, int month, int day)
  14. {
  15. System.out.println("Asdasd");
  16. }
  17. //dashFormat
  18. public static int dashFormat(int year, int month, int day)
  19. {
  20. System.out.println("Asdkjas");
  21. }
  22.  
  23. //given code below
  24. public static void printDate(int year, int month, int day)
  25. {
  26. System.out.println(nameFormat(year, month, day));
  27. System.out.println(slashFormat(year, month, day));
  28. System.out.println(dashFormat(year, month, day));
  29. System.out.println();
  30. }
  31. //date tests below
  32. public static void main(String[] args)
  33. {
  34. printDate(2004, 10, 4);
  35. printDate(2015, 1, 1);
  36. printDate(2013, 12, 31);
  37. }
  38. }
  39.  
  40. There isn't much here, because I keep getting stuck at "Is the data type int or void? If I pass in 3 ints, how do I return 3 ints? Do I need to return 3 ints?" I know we aren't supposed to change the code you gave us, but are we passing the 3 ints into printDate or the functions we are building?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement