Ryerson Polytechnic University Ryerson University
School of Computer Science

CPS109 Computer Science 1

Class Notes Weeks 5 and 6

High Speed Internet!


Read Chapter 5 and 6 and read the announcements.



Pointless Media for CPS109

THE END

Naughty Chalkboard Demonic Choir Boy


How about some review...


"if" explained


"switch explained"


An example program illustrating selection and Iteration


Some Typical loop examples

A typical example employing a while loop.

A typical example employing a do while loop.

A typical example employing a for loop.


Looper the Movie image
"Looper" the movie:
In 2074, when the mob wants to get rid of someone, the target is sent 30 years into the past, where a hired gun awaits. Someone like Joe, who one day learns the mob wants to 'close the loop' by transporting back Joe's future self. Watch the trailer.

"Looper" the code:
In the early 21st century a class called "Looper" is created that makes objects capable of creating 'hired gun' objects that fire "null" bullets to kill other Looper objects. Watch how young Joe become wealth in silver while dealing with the stiffs they send to him, finally he deals with old Joe and, ultimately, himself. See the code plus lots and lots of examples of loops.

HEY! Test yourself. 

WHAT DOES THIS JAVA PROGRAM OUTPUT (hand execute it first and run it live afterwards)?

A bit of review before the test can be fouknd in MidReview. java and MidReviewDriver.java (it is insufficient to pass the midterm but may help).


email:aferworn@scs.ryerson.ca