Comments on Lab 5

 

  1. for question 3.5, substituting  System.out.println (" Enter a number")  or System.out.prinf (" Enter a number") for the line screen.println (" Enter a number "); although it will produce the desired output does not show your understanding of how PrintWriter works and that's what the lab was about.         -4
  2. for question 4.9, although File    Date;  is not incorrect, it's not clear why you didn't make it static and private like the other attributes.  If you have a reason, let's talk about it.     -1
  3. see my answer for question  3.4
  4. for question 4.9 you were not asked to fix the problem that occurred in 4.7, you were asked to tell what changes you needed to make to add a declaration of a File variable named dates to main().
  5. you not only need @author and @version - date, you need a description of what the class and/or method does.   -1 each missing part.
  6. Your Remember.java didn't compile because you used a FileWriter instead of a File and didn't have an exception handler for it...You didn't want to WRITE to dates, you wanted to read from it.
  7. Your Remember.java didn't compile because you didn't understand what you were to do… Please see me during lab period and we can go over it together.
  8. You do not have enough explanatory comments inside your program
  9. You were asked to write your name and Lab5 under user comments and you didn't.  -3
  10. I don't know why you put a statement on the top of your public class Rooter of  package Lab5; it keeps it from compiling in jGrasp.  You don't explain WHY you did it.  You'll have to test your code in jgrasp in the future before submitting it to avoid future problems..  It compiles if I comment the statement out.
  11. You failed to instantiate  (create an instance of) dates after declaring it so when you went to use it, you got a compiler error message
  12. Your program Remember doesn't compile because you keyed in arg  instead of args. 
  13. Your Rooter.java didn't compile because you had a statement at the top  package Lab5;
  14. Why  File dates;  and not private static File dates?
  15. I believe that you got this error message: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0   at Remember.main(Remember.java:30) because you tried to run it from within jGrasp instead of running it from the command line.
  16. Why did you choose to throw the exception instead of handling it?
  17. In 5.2 there's a better way than allowing an ArrayIndexOutOfBoundsException and handling it.
  18. In 4.4, you output the date but not the birthday information (also in 4.15, and 5.4). You need to figure out WHY or see me about it.
  19. WHY didn't you put processDate inside the same for loop?
  20. In 5.4 you output the date and the assignment but not the birthday info. You need to figure out WHY or see me about it.  -2
  21. For 3.6, you are not writing a java statement, you're in a terminal window so you need to hit keys.
  22. dates is a File, not a String. 
  23. In question 3.6 you were  not supposed to modify the program so that you could choose a value to end the program from the terminal window.  You were supposed to figure out or learn that <ctrl> C would do the job.
  24. In 5.4 you output the date and the birthday info but not the assignment info.  You need to figure out WHY or see me about it.  -2
  25. In 3.4,  there was no need to change PrintWriter to PrintStream… Look at the API and at my answers.
  26. In 2.3 it asked for the first  error.