18 April 2005 - java_dev (original) (raw)
Java developers
April 18th, 2005
| | 01:18 am - ex_bluelili I need help understanding where to start with the following study question. If you could give me some tips b/c the book is very vague and I am lost...Thanks_Design a Java interface called Lockable that includes the following methods: setKey, lock, unlock, and locked. the setKey, lock, and unlock methods take an integer parameter that represents the key. The setKey method establishes the key. The lock and unlock methods lock and unlock the object but only if the key passed in is correct. The locked method returns a boolean that indicates whether or not the object is locked. A Lockable object represents an object whose regular methods are protected: if the object is locked, the methods cannot be invoked; if it is unlocked they can be invoked. Redesign and implement a version of the Coin class so that it is Lockable. Submit hard copy of a Rational Rose UML class diagram, the redesigned Coin class and test driver class._ |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
10:12 am - |
---|