Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Due date//me of Long Assignment 5 extended to tomorrow, Wednesday 23/Nov, at 5pm Long Assignment 6 will go out tomorrow, due next Tuesday 29/Nov Long Assignment 7 will go out Tuesday 29/Nov, due Tuesday 6/Dec (last day of class) Quiz 9 (10 points) this Thursday, 24/Nov Quiz 10 (20 points) next Thursday, 1/Dec
Announcements
Today
Introduc/on
to
Polymorphism
(Chapter
8)
Tomorrow
Introduc/on
to
Inheritance
(Chapter
8)
Friday
Introduc/on
to
File
I/O
and
Excep/ons
(Brief
excerpts
from
Chapters
9
&
10)
Next
week
Introduc/on
to
GUIs
and
Java
Swing
(Brief
excerpts
from
Graphics
Supplements
of
various
Chapters)
Following
Tuesday
(last
day
of
class)
Wrap-up
&
Presenta/on
by
Kobla
about
his
experience
working
at
Google.
Polymorphism
Ac/vity
Download
the
provided
code:
Drawable
interface,
Rectangle
class
(this
implements
the
Drawable
Interface)
and
Picture
class
(this
is
an
Applet)
Do
the
following:
Implement
the
init()
method
of
the
Picture
class
Add
code
to
the
init()
method
of
the
Picture
class
to
create
an
array
of
Drawable
items
Instan/ate
2
or
more
Rectangle
objects
and
add
them
to
the
array
Create
a
new
class
of
your
choice
(e.g.
a
Circle/Triangle/Pyramid/Cup)
that
also
implements
Drawable
Modify
the
init
method
to
add
objects
of
this
new
class
to
the
array
(in
addi/on
to
the
Rectangles).
You
should
no/ce
that
the
paint()
method
now
draws
both
types
of
objects
G.
Ayorkor
Korsah,
Ashesi
University
College,
Programming
II
-
First
Semester
2011
6