Thread: Java Assignment Question
April 25th, 2009, 03:13 PM #1
- Join Date
- Apr 2009
Java Assignment Question
I've been staring at this UML for the past hour and cant seem to figure it out..
The problem I'm having is interfacing the sensor with the probs. I can't seem to wrap my head around how the sensor class can check the prob class through just an interface. The full problem description is here CS2043 Project Plan - Iteration 1 . If anyone can provide any insight into this it would be fantastic!
April 25th, 2009, 07:29 PM #2
- Join Date
- Jun 2004
Prob is an entire class that does something, not just an interface. In OOP you can define an interface that a class implements. This is just a list of method names & arguments without implementation. When they talk about the Prob class interface though they're not talking about it as a code construct like described above. They're just talking about the list of methods that the class implements. Remember EVERY class has an interface, which is the list of methods it implements. Writing an interface explicitly in java is just a way of forcing the same interface on multiple classes.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By vikeor in forum Applications and Operating SystemsReplies: 3Last Post: February 23rd, 2005, 09:56 AM
By bdj in forum Applications and Operating SystemsReplies: 5Last Post: November 18th, 2004, 08:27 AM
By hawkman2 in forum Webmastering and ProgrammingReplies: 3Last Post: July 27th, 2002, 03:42 PM
By jgargac in forum Webmastering and ProgrammingReplies: 4Last Post: March 8th, 2002, 06:58 PM
By Tekk in forum Webmastering and ProgrammingReplies: 7Last Post: February 8th, 2002, 09:30 PM