Implements and Interface

J

Jordan Smith

What is the purpose of an interface? Why would you use an interface
instead of just defining your own methods in the current class? Why is
an interface better than writing the entire method in a class?

Thanks,
Jordan
 
H

Harald Hein

Jordan Smith said:
What is the purpose of an interface? Why would you use an
interface instead of just defining your own methods in the current
class? Why is an interface better than writing the entire method
in a class?

If you post your homework her, couldn't you at least get your ass up
and read an archive of this group first? This has been discussed a
hundred times.
 
J

Joona I Palaste

Jordan Smith said:
What is the purpose of an interface? Why would you use an interface
instead of just defining your own methods in the current class? Why is
an interface better than writing the entire method in a class?

Using interfaces allows you to separate "how do you call this code" from
"how this code works when you call it". This enables better
modularisation. Your course material will explain why this is a good
idea.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top