Programming Assignments
Students may use computers at home, work, or at Johns Hopkins for the programming assignments.
I grade on the following aspects of your submissions.
| Design | Does the design use the patterns discussed in class properly? Does the design use abstraction effectively? Does the design fit the problem?Is the program designed with a maintenance programmer in mind? |
| Function | Does it work properly? Is all required function present? |
| Style and Coding Conventions | Is the code readable? Is the code well commented? Can I easily figure out what it's doing just by reading the code? Does the code follow the required coding conventions? |
| Timeliness | Was the assignment submitted on time?
|
Coding Conventions
All assignments must observe the following coding conventions:
- Indentation must be consistent. Use either spaces or tabs,
but not both!
- All type names must follow Upper-Camel Case
- ShoppingCart
- ObjectDrawingApplet
- All variable and method names must follow Lower-Camel Case
- drawObject()
- numberOfObjectsOnScreen
- Type, variable and method names shall be a series of full words,
not abbreviations or single letters.
Standard acronyms are acceptable (such as url), but names like "c" are generally not acceptable. If you aren't sure whether a name is acceptable, feel free to ask me, but remember the rule of thumb: it should sound exactly like what it's being used for.
Exceptions (based on common, understood usage):- integer counters in loops can be named i, j, k
- the "current number" for walking through an array or counting items can be n
- e for an exception in a catch block
- All classes and interfaces must be contained in a Java package
- All package names shall be completely lower case, starting with your assigned
package prefix.
- Name your projects lastname.firstname.xxxxx (where "xxxxx" is
whatever unique identifiers you want to use for your project). For example,
I might name my project
stanchfield.scott.counter.
This will make it much easier for me to open all of your projects when
grading them.
- Comments: This is always the #1 reason people lose points for style.
All classes and interfaces must have header comments that describe
the reason the class exists. All methods except trivial
get/set methods must have header comments and line comments as
need to describe anything non-trivial. "Trivial" get/set methods look like:
public void setName(String name) { this.name = name; } public String getName() { return name; }
Anything else is considered non-trivial and must be commented.
Tools
All programs must compile and run under Sun's Java Software Development Kit 1.6 (aka Java 6). You can download this from Java 6 Standard Edition Development Kit. Please use JDK 6 update 6. You will not need Java EE or NetBeans for the course.
You can use any Java development environment to do your work. Note that I use Eclipse and can give assistance if you use it as well.
I have several Eclipse plugins that will make your development easier if you choose to use Eclipse.
Assignments
Stick to the problem description! If you deviate from it, possibly trying to demonstrate additional knowledge, I become agitated at the extra code to read and your grade will suffer. Trust me on this...
Note that assignments will be posted below as they are assigned.