Instructions: Answer the following questions one at a time. After answering each question, check your answer (by clicking on the check-mark icon if it is available) before proceeding to the next question.
Getting Ready: Before going any further, you should:
Rooter.java
in the editor.
Rooter
.
Rooter
.
Rooter
.
Rooter
from the terminal window using the
command:
java Rooter
Note: If you are using an IDE that keeps the source code and
the .class
files in different directories, you will
need to be in the directory that contains the .class
files
(e.g., the bin
directory).
Remember
and compile Remember
.
Remember
from the terminal window using the
command:
java Remember < birthdays.txt
Note: If you are using an IDE that keeps the source code and
the .class
files in different directories, you will
need to save the .txt
files to the the directory that
contains the .class
files
(e.g., the bin
directory).
Remember
from the terminal window using the
command:
java Remember < anniversarys.txt
File
variable named
dates
to main()
.
What change(s) did you make?
dates
passing
the constructor command-line argument 0.
What change(s) did you make?
main()
so that dateScanner
uses dates
and the application will compile and execute
properly.
What changes did you need to make?
Remember
from the terminal window using the
command:
java Remember birthdays.txt
main()
so that it will process multiple files
when their names are passed-in as command-line arguments.
What changes did you need to make?
Remember
from the terminal window using the
command:
java Remember birthdays.txt assignments.txt
birthdays.txt
and assignments.txt
to your project.
Remember
with the
command-line arguments birthdays.txt assignments.txt
.
Remember
using these
command-line arguments from within your IDE.
Remember
so that it checks the dates when it
reads them and writes invalid dates to a file with the same name
as the input file but with a file type of ".err".
Remember
so that it checks for the existence
of the error log and prompts the user before overwriting it.
Untab
that is passed
a file name as a command-line argument, renames that file so that
it has an extension of ".tmp" reads the ".tmp" file,
replaces all of the tab characters with four spaces, and writes the
result to a file with the original name.
Locale
in the call
to screen.printf()
that prints the
variable today
in various ways. Try to achieve the
same results using a Formatter
object and the
println()
method. Now, try to achieve the
same results using a DateFormat
object and the
println()
method.
Remember
that uses a
StringTokenizer
rather than a Scanner
to tokenize/parse the dates.
Scanner
and PrintWriter
in Remember
be static attributes? Why or why not?
Remember
have a main()
method,
or should there be a distinct driver? Why or why not?
Remember
be static? Why or why not?
Copyright 2019