Should I omit CSC 108 and CSC 148, and take only CSC 150?

If you are considering omitting CSC 108 and taking CSC 150, then you should be able to learn quickly, be very organized and be a hard-worker. If you are considering taking CSC 150, then you should have a good programming background. In CSC 150, you will be introduced to object-oriented programming in Java and learn the material that is covered in CSC 148.


Topics

If you are considering taking CSC 150, then you should have a strong programming background and a good understanding of the following topics:

  • Writing, compiling and running programs
  • variables (declaration, initialization, assignment)
  • types (int, char, boolean, double, float,...)
  • strings
  • methods (procedures, functions)
  • parameters
  • loops (for, while)
  • if statements
  • one and two dimensional arrays

Exercises

In order to take CSC 150, you will need a strong programming background and you should be able to complete ALL of the following exercises, using your favourite programming language.

  1. In 15 minutes or less, write and debug a program to read a list of numbers and then print all the numbers, with an asterisk beside the largest one.
  2. A palindrome is a word that reads the same forward as it does backwards. Examples of palindromes are hannah, bob, did, peep and noon. Write and debug a program that takes a word (as a string) and returns true if the word is a palindrome, and returns false otherwise. (You can assume that a word that is a single character is a palindrome.)
  3. Write and debug a program that takes a list of characters, and prints the elements with even indices on a single line with a space between characters.

Quiz

If you think that you know most of these topics and you can do the exercises, then you may want to take the quiz below to test your knowledge. It order to omit CSC 108 and CSC 148, and take only CSC 150H, it is not enough to have just heard of these topics. You should thouroughly understand the topics and be able to apply them. Try the quiz (give yourself 1 point for each correct answer):

1.

What does it mean to compile a program?

Show Answer

Translate the source code of a program into machine language so that it can be executed.

2.

What is an argument?

Show Answer

A data value or reference that is passed to a method by the caller.

3.

What value does height have after the following code has executed?

int width = 4;  
int height = 7;  
if (width >= 3)    
  height = width * 2;  
else    
  height = width + 2;

Show Answer

height has the value 8.

4.

What value does now have after the following code has executed?

int now = 0;  
for(int then = 10; now < then; then++) {    
  now = now + 2;  
}

Show Answer

now has the value 20.

5.

What value does x have after the following pseudocode has executed?

int x = 7;  
while x > 0 {    
  if x is even      
    x = x/2;    
  else if x > 5      
    x = x - 6;    
  else      
    x = x + 3;  
}

Show Answer

The loop is an infinite loop, so it will never stop executing.


Scoring

Give yourself 1 point for each correct answer.

  • 4 to 5: You are probably ready to take CSC 150.
  • 1 to 3: You should take CSC 108 followed by CSC 148.

If you know the topics and you have done well on the exercises and the quiz, then you may want to omit CSC 108H and take CSC 150H.

If you are not famililar with these topics or if you did not do well on the exercises or the quiz, then you should take CSC 108.

   
           
University of Toronto DCS Home Faculty of Arts and Science Contact Us Site Map