How can I pass my Java class?

My professor is such a bitch. She makes the concepts seem so easy during the lecture and even gives a lot of time for the labs. But we have to hand it in by the end and we're graded with what we wrote. It wouldn't be a problem if she actually stayed true to her words, but she doesn't.

Early on, she claims to give out easy marks so long as students try their best. That clearly wasn't the case since I've done poorly for almost all my lab sessions so far. Then, she claims that I should go to her for help to prevent getting a bad lab mark. Either there's too many students that take up her time, or when I did constantly go to her for help, she didn't offer much help at all.

As of yesterday, she gave me a poor grade and when I requested she raise it a little, she refused. Her justifications was I didn't complete it (I did most of it) and the code had too many errors (all my previous lab files had them). She's also recommended me to get the textbook, which I've gotten an online acquaintance to pirate for me lol. I doubt relying on the textbook will yield much help based on her lies.

What do you think I should do to improve my grade for this class and not fail? There's 10 labs, 4 assignments, and 2 exams. So far only 4 labs have been completed while the midterm is coming up in 2 or 3 weeks. My course average so far is 61% or C- based on my lab marks of 66.667%, 50%, 93.333%, and 33.333%.
How can I pass my Java class?
Post Opinion