









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Less side tracking (questions that are not on topic) See website for all info! You may need to practice code outside class!
(See:MySwap.java)
Conventions for identifiers: Class - Start with uppercase (e.g. StringBuffer) Object - Start with lowercase (noun) (e.g. homeworkOneGrade) Method - Start with lowercase (verb) (e.g. isEmpty() )
Java constants should be in all caps and an underscore (_) go between words Example: public static final int ROOM_CAPACITY = 246; Should declare these above main method (see JavaConstants.java)
Types of comments: // ... - One line of comment (Ctrl + /) /* ... / - Everything between is commented (even multiple lines) /* ... */ - javadoc commentation
Indent more when branching (braces) (NetBeans and many others do this automatically) Also indent when a single command takes up more than one line of code
known elephant in Cairo to ensure that the algorithm will terminate.
hands and knees. How to catch an Elephant in the Africa
If you find yourself going through the code and replacing numbers/variables/methods, then you should make a constant (or method) If you don't think carefully about variable names, you will have to go back and rename it (or have code with illogical names)