Tuesday, March 15, 2011

INTERFACES!!!

So today we learned about interfaces. We started off class with the do now, which was to explain how you "drive a car." The people who participated explain more in details what the driver does and not explaining about the kind of car. I really didn't get what he meant by that, but since there's different kind of cars they word differently? O.o
Interfaces is an area between 2 systems, where they interact with each other. This ties in with the do now because to drive a car you need two things, a driver and a car of course. They both work together, sorta,to make the car move.


Benefits of Interfaces
- each system works only on its itself and doesn't care about other systems
- they're all independent so its easier to use and more flexible, whatever that means.
There are certain things that interfaces can and can not do, which is all on the website so I won't bother re-writing it.
check it out!!!!! -----------> http://web.aprchs.net/jacoby/mj2x_2011
Another thing I can sorta explain more on is comparing interfaces.
ComparableInterface
It "marks" classes that are comparable, this means you can decide to sort objects in whichever way you want.
EX.
public int compareTo(T obj)
This is going to compare T to an object but using int O.o yea idk
the way I worte it is -int/<, 0/= and +int/>



ok, well im done now. hopefully I didn't confuse anybody! :)
and there's tutoring 4th & 8th for those who need help! be there or be square xD

No comments: