Parameter passing mechanisms
pass by value
pass by reference
pass by value-result
(pass by name will NOT be on the test)
Scoping: static vs. dynamic
Object oriented programming and design, with a Java focus
OO topics include, but are not necessarily limited to: inheritance,
polymorphism, encapsulation, classes and interfaces, the Java memory
model, packages, visibility modifiers, static vs. non-static, shadowing
and overriding, etc.
Grammars
Please check back by Sunday at noon to see if I've forgotten anything.
Note also that you aren't required to do this; we just wanted to point out that you've removed any need for the Driver to know anything about the Clothes class and its subclasses.
submit -N b1 csc324h csc324/*/*.java
A copy of unshar.zip is located @
ftp://garbo.uwasa.fi/pc/unix/
To unshar the assignment do the following:
1. unzip unshar.zip with your favourite zip utility..
2. rename 1b.shar 1b.sh
(my system at home doesn't handle long file names)
3. unshar 1b.sh
Note that you must still go to tutorial to hand your assignment in, by 6:10pm next Tuesday.
String line;
try {
// Read a line of input all the way to the RETURN.
line = in.readLine();
} catch( Exception e ) {
e.printStackTrace();
}
It's a bit ugly, but you won't have to deal with headaches so much.
Another suggestion: don't worry about the details. If you can't get something to work, like making sure a price is valid, skip that bit and go on to the next.
That's the best way to get partial credit. Even if you only get your hierarchy working, without ever dealing with input and output, you'll get some marks. So get the clothes hierarchy started, and write a simple main program that creates one of each type of clothing, and *then* work on the Driver and any inventory classes you need.
If you have trouble with it, trace it through in a debugger. I can't emphasize that enough. Debuggers are your friend; take time to learn one.
To help even more, do the first two Online homeworks.