Jeff Yan wrote:anybody?
You waited like 30 minutes--not long enough--so you get code comments.
- The use of non-standard
Java naming conventions will slow down some Java developers (like me) as they read over your code: in general, member variables should be named starting with a lower-case letter.
- Access should always be specified instead of using the default.
- The initialization you *think* you doing in your constructor isn't; those are local to the constructor.
- The class is a jumble of concerns and functionality--not necessarily an issue, but even something this short becomes more difficult than necessary to understand and debug.
- Along with that, make sure that duplicated code is identified and removed as early in the process as possible.
- Notably, the block of code for ordering copper and ordering aluminium are essentially identical: in this case, that indicates something funky in the design process.
- Note that OrderProcess is recursive: I can think of no good reason to make it so.
- Be wary of making things instance variables that don't need to be: relying on side effects can make debugging... troublesome.
- You spelled aluminum wrong. (Okay, I'm kidding with that one