Results 1 to 2 of 2
Thread: Using Booleans for equality?
- 04-08-2011, 09:18 PM #1Member
- Join Date
- Apr 2011
- Rep Power
Using Booleans for equality?
Working on a school project and our professor has supplied us with three classes. we are to implement a fourth class called "Sprite" using a specified UML.
The UML part that I'm having trouble with looks like this:
+equals(other : Sprite) : boolean
how do i write this code? I know it needs to return a boolean, and I'm supposed to check if the sprite i have in my class equals the other sprite. I'm lost.
- 04-08-2011, 09:41 PM #2
My question to you would be:
Which part do you understand, which part not?
But you give a rather complete description of the specs in the last line so what's the problem except being lost?
- Do you understand the UML, what does it mean exactly?
- Do you have an idea of what a sprite looks like, and what makes one sprite equal to an other?
- Is the Java itself giving you trouble?
- What code did you allready come up with?
(In your next post try to answer all these questions first.)
- By hoosierfan24 in forum New To JavaReplies: 24Last Post: 10-04-2010, 02:07 AM
- By Cylab in forum New To JavaReplies: 5Last Post: 08-19-2010, 03:42 PM
- By Cylab in forum Advanced JavaReplies: 6Last Post: 08-19-2010, 03:40 PM
- By kumar080780 in forum New To JavaReplies: 4Last Post: 10-29-2008, 07:57 AM
- By trinkets in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 02-12-2008, 05:39 PM