Mar 17, 2005 21:47
This is what a shitty programmer I am: it takes me this much redundant code just to check and see if there are any null spots in an array.
public int checkfull()
{
int full;
if (students[0]==null)
{
full=0;
}
else
{
if (students[1]==null)
{
full=0;
}
else
{
if (students[2]==null)
{
full=0;
}
else
{
if (students[3]==null)
{
full=0;
}
else
{
if (students[4]==null)
{
full=0;
}
else
{
full=1;
}
}
}
}
}
}
LOOK AT ALL THOSE CURLY BRACES.
I would laugh really really hard right now if this weren't due at noon tomorrow and I didn't have a prayer of getting it to work by then.
Edit: I realized what a moron I am and just put in a for loop, but as evidenced above, my brain is functioning at about 6% capacity tonight.