My final Java assignment. Criticise, criticise, criticise...

http://members.optusnet.com.au/ksaho/work/java/ass2_2311AQUA/scm2311.zip

I have javadoc, documentation and class diagrams. I forgot to do a use case diagram. Too late now.

Seeing as most of the people on these boards are professionals, I think I will get some good criticism and advice.
I’m not an egotistical person and I wont get offended by any critique that anyone takes on my work.

Also if possible by looking at my assignment what do you guys rate it out of 100?

Thanks.

Hey kiler,

While browsing through your javadocs I found your method-names are a bit off sometimes.


Aquarium.size() -> returns fish-count…
Aquarium.getWaterSurfaceY() -> “Surface of the water” / “Returns: maximum y value” … ?

Fish.findPath() -> returns boolean. You’d expect a Path object, or another method name

Entity.move(x, y) -> moves entity
Entity.translate(x, y) -> sets position?? translating means ‘moving’ too.

More:
addGenericSprite(java.lang.String[] imgLoca, java.lang.String[] spriteName, int[] imgTileW, int[] imgTileH, boolean isAnimated)
This is very likely to cause errors. You should make a class that holds this data for every ‘frame’, like:
addGenericSprite(SpriteInfo[] sprite, boolean isAnimated)


Remember that the way you name your methods will become very important when your application becomes bigger. The method-name should describe exactly what it does.

I won’t give you a score between 0 and 100 because I only checked the javadoc which might not be representative for the whole assignment.

I also read your readme.doc:

You are basicly saying you didn’t do this and that for several reasons. (including threading)

For the sole reason of not following the requirements of the assignment your score will most likely be significantly reduced.

As Riven said, you’re likely to be heavily marked down for not following the requirements. IMHO, almost all of (formal) education are jumping though the correct hoops as asked, deviate this and you will loose out because of it. If you really want to do things differently, always do it the required way first. Then submit your ‘better’ way as a seperate app (or toggle with a compile time switch - defaulting to the required behaviour).

Remember that for most programming projects the uni/whatever doesn’t even care if your code is any good. It can crash, it can leak memory, it can have a god-awful interface. But it’d better bloody well follow the requirements and have good documentaion.

Try to imagine what would be the answer your teachs want to see in your exercise. That would be the smart thing to do.

There is a solution to your problem - make your application run both in threaded and non-threaded modes. That way you can do what the assignment asks, as well as offer a different solution. Instead of insulting your proff you’ll probably impress him and maybe get extra credit.

SO a quick story…

Once upon a time when I was in college I had an assignment to write a 2 terminal line-by-line chat program ona bare PDP10 (don’t ask… this was a long time ago.)

For 10 poinst etxra you could make it ring a bell whenb a message arrived. (ctrl-g, big deal, right?)

Being bored, my programming partner and I wrote a fully windows split-screen chat program that allowed full duplex simulatenous chat.

We got no extra credit, because it didn’t ring a bell.

Morale: DO the assignment. As assigned. AFTER you’ve done that if you want to do more go ahead but it is a RARE instructor that will reward you for not doing whats been taught or assigned however good your reasons.

Undergrad education isnt about being inventive-- thats for grad students and up. Its for going through the same learning hoops everyone else has.

Thanks guys.

I will definitely remember this advice. (I already handed in my assignment).
Yes, last year I did lose several marks for doing things my own way rather than following the teacher’s guidelines.

I’m always trying to innovate.

Nothing wrong with innovation! Keep it up! Just, as with the real world, the requirements are the requirements and need to be met. Anything else is chaos. :slight_smile:

Kev

Actually, in the real world, you can usually get away with implementation differences, as long as you meet the business requirements.

In school, as others said, ALWAYS JUST DO what the teacher wants you to, nothing more, nothing less and nothing different… nothing more, because you wont ‘get’ anything out of it anyway, and it just complicates your design document… nothing less and/or different, because even though you might have a good reason to, the teachers don’t care and will lower your grade.

I’ve looked at your program, and to be honest I don’t care about the implementation, but what I miss is the design document. I don’t know in what year you are, but know this: you will score TOP grades if you include a proper design document. A class diagram is not a design document. A design document tells the teacher your way of thinking: why did you create this and that class, why did you choose this and that method. etc. etc. google for it. Also, your class diagram is not annotated and your relational diagram is not accounted for, why does class A have 1…n instances of class B? it might be obvious, but if it is, it’s also easy to write down. If it’s not obvious, then you REALLY need to account for your choices. Sorry to be a bitch, but if I knew then what I know now, I would have done things differently and have gotten higher marks, so I’m trying to warm you up to a) what the teachers really want from you and b) what you really wish you would have practiced in school once you get into the real world ™. 8) Good luck with your future projects.

Oops, if only you made your post a day earlier.

I forgot about design documentation. I did it for the last assignment but forgot about it on this one.

hmm… isn’t that a TON of classes just to have 3 fish move in a rectangle? Your teacher seems to overkill on OOP dude…