COMP-202 - Introduction to Computing 1 (Winter, 2004)
Welcome
News
Syllabus
Calendar
Assignments
Office hours
Hints
Links
Resources
Resources
Exceptions
: Throwing exceptions, and user-defined exceptions.
SimpleExceptionExample.java
: Catching exceptions.
Animal.java
: An example about type casting between subclasses and superclasses.
Inheritance, polymorphism and exceptions example
.
Midterm solutions
(with detailed explanations.)
FunkyPrimes.java
implements the solution to the problem of finding how many prime numbers between 0 and a given number n are there such that the sum of their digits is also prime.
The Keyboard class
SimpleProgram.java