Programming mark woes <rant>

You can post anything you want in here! Woohoo!

Moderators: beyonder, Pez-Man

Post Reply
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Programming mark woes <rant>

Post by Twilkitri »

I just got my first CP527 (Java Programming 2) assignment back.
I got 16½/20.

Now, for some of you, this may seem like a good mark. But not for me.

What I'm really annoyed about is that there was only 1 actual mistake in my coding. The rest of the marks were lost due to them not agreeing with the _way_ I coded.

For example. We had to empty out 2 vectors in the constructor of a class. I did it like this:

public Library()
{
books = new Vector(1);
borrowers = new Vector(1);
}

Which means, for those of you who don't know programming, I am creating new (and thus empty) Vectors and copying them over the top of the old ones. Thus accomplishing the task, to empty the Vectors.
However, I lost marks. All because they wanted me to do

public Library()
{
books.removeAllElements();
borrowers.removeAllElements();
}

What this does is nulls out all the objects in the Vector. It doesn't actually empty it (there are the same number of nulls as there were objects, whereas my way kicks it back down to one null) but the end result is the same, an empty Vector.
And I lost marks for this?!? When they didn't actually _say_ to use the function?!? (They said remove all the elements. They didn't say you had to do it in a certain way)

Another thing that I got downmarked for was not having default constructors in my classes (that's a constructor which doesn't take any parameters). Yay. I didn't actually have to _use_ them anywhere in the assignment, but I lose marks for not having them.

And there was more things like this.

If I don't go well on the second assignment, due to crap like this, I am going to be severely annoyed. At least I didn't go as bad as the lowest person in the class (they got 6½/20. Dunno who it was, though).

</rant>

While I'm on this topic, how about a programming section.
Pez-Man
Pez-Man
Posts: 3427
Joined: Sat May 18, 2002 6:54 pm
Contact:

Post by Pez-Man »

What's a vector? Don't answer that.
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

A Vector is a Java class which is basically a dynamic array.
An array is like a list of objects. BUT when you make it you have to tell it how many objects it can hold, and it cannot be enlargened to hold more than that.
A Vector is the class you use if you want an array that can change size.

A vector is also the mathematical term for a quantity which consists of an amount and a direction. Unlike a scalar, which is just an amount. So, speed is a scalar, whereas velocity is a vector. Of course, this has nothing to do with programming, but I'm supposed to be doing Maths work at the moment and my mind is trying to get me out of it by making me do stuff I don't need to do (like explaining what a vector in Maths is).
Pez-Man
Pez-Man
Posts: 3427
Joined: Sat May 18, 2002 6:54 pm
Contact:

Post by Pez-Man »

Did you read the whole post? I also put "Don't answer that".
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

I read up to 'What's a vector?' then my monitor blew up. Knowing that you would die without knowledge of what vectors were, I blindly tabbed my way to the post reply button and typed in my response, all the while hoping that I had correct spelling. Then I blindly tabbed my way to the submit button and hit enter. In hindsight, I guess I should have just pushed enter, 'cause now the keyboard is broken too, except the numpad and the ALT key. I have to use ASCII codes to do all this, and it's even harder having no monitor to see if I'm using the right ones.
User avatar
beyonder
Webmaster
Webmaster
Posts: 672
Joined: Mon May 20, 2002 7:53 pm
Location: my house.
Contact:

Post by beyonder »

I got 10% off for not having an algorithm once. And another 10% for not commenting my code.
Post Reply