so, I know a few of you have said you’re taking the ap comp sci test. how do think it was? i thought it wasn’t really bad, but still don’t know if i’ll get a 4 or 5 ( but i’m fairly certain i’ll get one of them). the free response wasn’t bad either, i actually kind of liked that last one on the huffman encoding, made for a simple recursive algorithm (compared to the ugly iterative solutions for all the other problems). i’m reminded of a quote “to iterate is mortal, to recurse divine” ahh, i love geeky computer quotes
Well since I don’t really like computer programming and I had to take it cuz it’s part of the “CAT” curriculum and all I thought it was bad. Rather, I got most of the multiple choice, probably like 30/40 but the free-response I could only get the first two for certain and then guessed on the rest… tried to get those 1/2 points n all. BTW… I only took the A not AB test.
ahh, ok. i took the ab test, and if you can’t already tell, i love programming i enjoyed the survey at the end the best, actually. you see, my shcool doesn’t offer the course so i took the test without having taken the course (i knew c++ before this year from self-study). well, when they asked ‘how many hours per week does your class meet’ and i answered 0, i figured i was skewing their data
oh my god, the programming A test killed me today. THe part ones werent that bad, but I only understood 2 of the part 2’s they sucked! Ill be happy if i even get a 2
On this test, much like any other standardized test, I did not finish. The portions I did complete were manageable, so I think I did ok. Time will tell…
*Originally posted by srawls *
**ahh, ok. i took the ab test, and if you can’t already tell, i love programming i enjoyed the survey at the end the best, actually. you see, my shcool doesn’t offer the course so i took the test without having taken the course (i knew c++ before this year from self-study). well, when they asked ‘how many hours per week does your class meet’ and i answered 0, i figured i was skewing their data **
My friend took the test without taking the class too. I don’t know how well he thinks he did on it yet, but we both looked at the free response questions from previous years and it seemed pretty easy. I would have taken it too but I decided I might as well wait and spend the $80 on the test after I take the class next year.
yeah i dont like aqua fish we spent 2 months on it our teachers name happens to be mr. fisher hes a stupid stupid man i think i got at least a 4 though
I think AB was alright, I was finished early with both parts. I liked their idea for Free Response Number 3 and free response problem by itself. It was a lot less enervating than Calc BC, where I just ralleyed through the Free Response.
I teach the AP CS course at my school. We just teach the AB program. My students call the case study the DAF. That’s short for Dumb %%% Fish so apparently they are not impressed with it. Still they all think they got the case study questions right. We’ll see.
well, yours looks better than mine, but mine is more efficient. considering the ap people probably don’t care anything about efficiency, i probably should have done like you and not worried about checking if the left subtree matched or not.
I aced the multiple choice part, but more then likely completely failed the 2nd part. You see, we never bothered to learn the AP classes or study the case study ( our teacher had never done ap before). It sucks because all of us in there couldve easily done all the required programming using standard c++ functions and variables. The functions they had your write were all rather simplistic and silly…they really need to redesign those tests.
The question is long so I will sumarize. There are 4 questions on the test and the test booklet is 16 pages long just to give you an idea.
The kids are talking about part b of the fourth question on the AB exam. There is an A exam and an AB exam. The AB covers a lot more matterial than the A exam.
In any case. The method CharToBitsHelper for the CodeTree class returns a binary representation of the the path to a specific letter in a binary tree of letters. Taking the left branch is indicated by a 0 and takingthe right branch is indicated by a 1. So if you take a left and two rights to find the letter CharToBitsHelp returns “011”.
The actual method prototype (I have it in front of me) is
apstring CodeTree::CharToBitsHelper(char ch, Node * T, const apstring & pathSoFar) const
// postcondition: if ch is in subtree T, return code for ch
I’ll post my solution shortly. I want to read part A before I start.
The last bit is importent because you have to handle the case where the char is not found in the tree. My guess is that you will lose at least one point (of 4/5 for part b) if you leave that out.
You will probably also lose a point if you did not create your own temp pointer for the traversal. But that’s just a guess.
Visual Basic is a great language. But I’m biased as our school uses a VB text book I wrote.
BTW I think there is a problem with my solution to the AP question. I realized that there isn’t a letter in the nodes only the leaves. So you have to recursively search each path and return the one that is good. A whole different set of code. Back to the drawing board.
Basically, they constructed a huffman encoding tree, and they asked us to write a function, that given a letter and the tree (and a third argument, string_so_far, which is initially empty), we return the path to that letter. Of course, them being the ap people, they don’t expect us ‘dumb’ kids to know what huffman encoding is, so they never actually called it huffman encoding, and they gave us hints in the question in how to answer it (like ‘we suggest you use string_so_far in a recursive algoritm …’).
Oh, and yep, Mr. Thompson, you’re right, the letters are only in the leaves. You can look at my solution or Rucky G’s solution for a right anser. The only difference between ours is that I check to see if the letter is found in the left subtree before I look in the right subtree, he looks in every node of the tree in all cases. So, mine is more effecient, but I think his looks more elegant, since he takes advantage of the fact that if the letter is not found, he returns the empty string, and thus can be appended to the answer without changing it.