Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. //necessary imports for file i/o
  2. import java.io.FileInputStream; //"turns" the file into a read stream
  3. import java.util.Scanner; //reads from stream
  4. import java.io.IOException; //this exception must be caught and handled when dealing with streams!
  5. import java.io.FileOutputStream; //"turns" the file into a write stream
  6. import java.io.PrintWriter; //writes to the stream
  7. import java.io.FileNotFoundException; //this exception must be caught and handled when dealing with streams!
  8.  
  9. /**
  10. * Write a description of class Diary here.
  11. *
  12. * @author (your name)
  13. * @version (a version number or a date)
  14. */
  15. public class Diary
  16. {
  17.  
  18. public static void main(String[] args) throws IOException {
  19.  
  20. // Needed variables
  21. int mm = 0;
  22. int dd = 0;
  23. int yyyy = 0;
  24. String prose = ""; //Empty string to read prose
  25.  
  26.  
  27. PrintWriter output = null;
  28. Scanner keyboard = new Scanner(System.in);
  29.  
  30. System.out.println("Enter the date as three integers separated by spaces (i.e mm dd yyyy) ");
  31.  
  32. mm = keyboard.nextInt();
  33. dd = keyboard.nextInt();
  34. yyyy = keyboard.nextInt();
  35.  
  36. System.out.println("Enter as many lines of prose you wish (for your to-do’s list or diary entry)");
  37.  
  38. //START YOUR CODE HERE
  39.  
  40.  
  41.  
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement