Which classes do you need to show ADT's for? Well, what is the idea?
The idea here is documentation for reusability. Suppose someone else wanted to use your new class. You need to tell them what your implementation is all about.
Obviously, if you are using a pre-defined class, then you do not
need to provide ADT information, the writer of that class should have
provided it for you. In this case, you are the user and someone
else was the implementer. Now, normally you would be expected to
provide this information for only the public materials, since the user
does not see the private ones. However, in this case, I am grading
your whole submission, so I, as someone judging your design,
need to see the ADT information for each or your defined classes.
For the methods, it is necessary to give the signature so that
a user knows what to pass as parameters when they use this class.
Example: myMethod(String name)
In fact, with javadoc it provides an API page which basically gives you a nice page illustrating your "exports". Specifically, an API page shows what
class you are providing and what methods and variables are in it. You still will need to show the pre and post conditions for the methods though.
Often students seem to have a hard time when trying to concretely say
what the Pre and Post conditions of their methods should be. If you read the above, you can clearly see that Preconditions are not just the parameters passed and Postconditions
are not just the values returned! Also, if you say that a post condition for a method is "none" you are telling me that your method code does absolutely nothing and might as well not be there. Clearly something is not the same as it was when you called the method - even if you just looked at a variable or returned one (note that values returned are "necessary" in the post conditions but are not "sufficient" (i.e., there may be more that was done))
How about a nice example of how PRE and POST conditions might be useful.
precondition
Postcondition: an assertion that prevails upon completion of the
operation. A description of the results of the actions performed by the operation. It must be
accurately and precisely stated
postcondition
Notes from an MIT course about ADTs
If you use javadoc it will do this for you.
(Nice documentation pages and all it takes is
using /** and */)
Note: Each method that you provide for a class needs pre and post conditions
Another way to look at it: someone should be able to
give you PRE and POST conditions for a method and you should be able
to be clear on what exact code is expected. Think of it as
a contract. If they are vaque in the POST, then you, the programmer,
can implement anything you want. POST condiditons should say explicitly
what is expected in the method
Remember
Precondition: an assertion that must be true in order for the operation
to execute correctly
For a more rigorous discussion see ADT's: Preface