It was the object/classes concept. I could not understand what they meant or what they did. I eventually went into Shuemue's IRC channel and a few BG people explained it to me. After their explanation, I understood it enough that I was able to finish the programs assigned, but this was after I already failed an exam and three programming projects, so there was no way I would get better than an F in that class. So I dropped it before I got another F on my record (the first time I took the class I didn't drop it and ended up with an F).
I'm not sure if it would help or not, but think of classes as a space you define, and objects as a vector in that space. Each class contains a set of function f:X -> Y where Y can be anything (X, another object, a string, a traditional mathematical object). You could also define operations to add 2 object of this space, but it's a bit more advanced, however, it works exactly like it does in mathematics (ie: for the following class R², (x1,y1) + (x2,y2) = (x1+x2,y1+y2) could be implemented easily). Methods, operations and functions are all defined in the class itself, and there isn't any difference between them.
Code:
Class R²
//Define every dimension you need to describe an element of this space.
// It could be string of text, it could be a color, it could another object.
//In this case, it's 2 integer
int x
int y
//Constructor is the default parameter to avoid a situation where
// (x,y) = ( , ). Typically, you use 0, but you can also use input
// In most language, its name is the same as the class
R²()
x = 0
y= 0
// f:R² -> R² F set x to the constant x1, and y remain unchanged
setX(int x1)
x= x1
// f:R² -> R It's pretty much a projection operator
returnX()
return x
// f:R² -> R length
length()
int d
d= sqrt(x²+y²)
return d
End Class
Thing get a bit messy in the "main" class when you interact with the user , but in overall, if you can see why a class= space, the code you write should be pretty good