Class Notes (1,020,316)
CA (585,795)
Trent (3,345)
COIS (152)
Lecture 8

COIS 2240H Lecture 8: WEEK 8 part 2Premium

2 pages20 viewsWinter 2018

Computing & Information Systems
Course Code
COIS 2240H
Alaadin Addas

This preview shows half of the first page. to view the full 2 pages of the document.
WEEK 8 part 2
COIS 2240
Monday, February 26, 2018
Java Interfaces
So far so good
We have defined what an interface is
How we interface
The last question is why?
Things you can do with interfaces
Achieve polymorphism
Interfaces are more flexible because a class may implement many different interfaces
Interfaces are preferably used when there is no default
Interfaces are not perfect, they have their drawbacks.
*When implementing methods that are from an interface, You always need to override them.
Java Abstract Classes
Interfaces do not actually contain any method implementations they are simply just templates
Abstract classes function like a base class for other classes
You're Reading a Preview

Unlock to view full version

Subscribers Only

Loved by over 2.2 million students

Over 90% improved by at least one letter grade.