[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interfaces, abstract classes. Why?
That's a loaded question. One reason for using interfaces is because java
doesn't support multiple inheritance. By using interfaces, you can
simulate it. In terms of abstract classes, think of classes for Managers
and Employees. They share alot of attributes. ie FirstName, LastName,
Telephone, etc... These common attributes (and also common methods) can be
placed in an abstract class perhaps called Person from which Managers and
Employees will inherit. That's the quick answer.
I'm sure there are a million others.
"Jennifer
Fisher" To: ajug-members@ajug.org
<jenniferfisher cc:
@programmer.net> Subject: Interfaces, abstract classes. Why?
04/02/2003 01:21
PM
Hi all. I hope someone can help me understand better.
What are the uses for interfaces and abstract classes? Why would one need
them in a project and what for?
Thank you in advance.
Jennifer Fisher
Developer, Gaye Systems
IITP 2.0
--
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup