Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package vending;
- /**
- *
- * @author prof.missiroli@gmail.com
- */
- public class Coin {
- int value;
- public Coin(int value) {
- this.value = value;
- }
- public int getValue() {
- return value;
- }
- public boolean isValid() {
- if ( (value==200) || (value == 100) || (value == 50) || (value == 20) || (value ==10) )
- return true;
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement