Computer Science Canada Are YOU ready for Waterloo CS? |
Author: | Martin [ Fri Aug 20, 2004 4:24 pm ] |
Post subject: | Are YOU ready for Waterloo CS? |
http://www.cs.uwaterloo.ca/undergrad/admissions/placement/cs134.shtml This is the test to see if you are ready for CS 134 (the most advanced of the three first year choices for computer science) at the University of Waterloo. Note: don't email it to the guys unless you actually are attending the university ![]() |
Author: | Dan [ Fri Aug 20, 2004 7:11 pm ] |
Post subject: | |
dose not seem that hard to me, i think i had a question alot like that on my grade 12 compsci exame that was on java. |
Author: | wtd [ Fri Aug 20, 2004 7:35 pm ] |
Post subject: | |
It does seem pretty easy. |
Author: | Dan [ Fri Aug 20, 2004 7:50 pm ] |
Post subject: | |
Well i guse they do not expceted you to know everything, alot of poleop could have had no compsci corses during high school and/or not progaming excpicen at all. So that whould probly be a good way to weed out any one that has no progaming excpricne from going in to the highested 1st year level right away. |
Author: | wtd [ Fri Aug 20, 2004 8:00 pm ] |
Post subject: | |
And, I suppose, to figure out which people are willing to take the time to figure it out, if they didn't already know. Would it be wrong to post a solution in another language? ![]() I keep hacking stuff together to work my mind around the baroqe syntax of O'Caml. |
Author: | Martin [ Fri Aug 20, 2004 10:51 pm ] |
Post subject: | |
Post it if you want. It's not a test or anything, and anyone at this point who's in CS 134 is stuck in CS 134. Also, Dan, it's required that you have ICS 3M to get into this course (and a teacher recommendation...a joke to get). |
Author: | wtd [ Fri Aug 20, 2004 11:30 pm ] | ||||
Post subject: | |||||
The module:
A simple sample:
O'Caml: Because static typing can be useful, but explicitly stating those types is lame. ![]() |
Author: | Martin [ Sat Aug 21, 2004 12:27 am ] |
Post subject: | |
How do I do java inheritance without protected variables? |
Author: | wtd [ Sat Aug 21, 2004 2:53 am ] |
Post subject: | |
Darkness wrote: How do I do java inheritance without protected variables?
Properly. For something this simple, the child class shouldn't need to directly access the parent class' instance variables. Rather you use the interface exposed by the parent class. This is where accessors (get, set) come in handy. ![]() |
Author: | Martin [ Sat Aug 21, 2004 9:44 am ] |
Post subject: | |
The inheritence that I was using was CRentalProperty extends CProperty. Now, everything is the same as CProperty, except there is also an annual income. How do I do this (efficiently) without using protected variables? And what's so bad about protected variables anyway? |
Author: | rizzix [ Sat Aug 21, 2004 11:49 am ] |
Post subject: | |
hmm nothing?!? |
Author: | wtd [ Sat Aug 21, 2004 8:49 pm ] |
Post subject: | |
Darkness wrote: The inheritence that I was using was CRentalProperty extends CProperty.
Now, everything is the same as CProperty, except there is also an annual income. How do I do this (efficiently) without using protected variables? And what's so bad about protected variables anyway? I'm guessing they want to see if you can realize that you don't need protected variables in this case. Why would CRentalProperty need to access the instance variables of CProperty? |
Author: | wtd [ Sat Aug 21, 2004 9:42 pm ] |
Post subject: | |
Feel free to peruse the attached file and comment freely. Python version added. Ruby version added. Eiffel version added. I love demonstrating the beauty of these languages. ![]() |