login name ______________________________Name ________________________________
This space reserved for the grader
1 2 3 4 5 6 total /15 /10 /15 /15 /25 /20 /100
If you need more space than I have allowed for an answer, turn the paper over and use the other side. Indicate when you have done that.
Iterator i = myWords.keySet().iterator();
iterator
declared?
iterator
method.
i
".
i
a good name in each case?
% java WordList zero one two three
Discuss this assertion, using
at least two examples
from the Bank,
Shapes and Juno packages. Be sure your discussion makes clear your
understanding of
polymorphism,
inheritance and
collections.
finger
command
behaves:
% java Juno Welcome to notMars running Juno version 6 help, register,At the end of this exam you will find a stub version of file, exit Juno login: register jill Jill Q. Public Juno login: jill notMars> finger jill jill Jill Q. Public notMars> finger root root Rick Martin notMars> logout goodbye Juno login: exit
FingerCommand.java
. Complete it.
Since you don't have access to the rest of Juno on this exam, here is
some of the API (generated with grep
) that you may find useful:
class method Juno public User lookupUser( String username ) Shell public User getUser() Shell public Directory getDot() Shell public Terminal getConsole() Shell public Juno getSystem() User public String getName() User public String getRealName()
% java Juno Juno login: register jack John Q. Public Juno login: jack notMars:/users/jack> newfile .cshrc this is my .cshrc file notMars:/users/jack> newfile memo.txt Here is my memo
jfiles
field of each
Directory
and the parent
field of each
JFile
. You need not show owners or dates or the
contents of text files.