Comments
on Lab 5
- 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
- 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
- see my
answer for question 3.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().
- you
not only need @author and @version - date, you need a description of what
the class and/or method does. -1
each missing part.
- 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.
- 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.
- You do
not have enough explanatory comments inside your program
- You
were asked to write your name and Lab5 under user comments and you
didn't. -3
- 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.
- 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
- Your
program Remember doesn't
compile because you keyed in arg instead of args.
- Your
Rooter.java didn't compile because you had a statement at the top package Lab5;
- Why File dates; and
not private
static File dates?
- 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.
- Why did you choose to throw the exception instead of
handling it?
- In 5.2
there's a better way than allowing an ArrayIndexOutOfBoundsException and handling it.
- 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.
- WHY didn't you put processDate inside
the same for loop?
- 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
- For 3.6,
you are not writing a java statement, you're in a terminal window
so you need to hit keys.
- dates
is a File, not a String.
- 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.
- 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
- In 3.4, there was no need to change PrintWriter
to PrintStream… Look at the API and at my answers.
- In 2.3 it
asked for the first error.