1. When should methods of a class use the access modifier private?
2. The class CupDispenser has a private data field, numberOfCups, which tracks the number of cups currently in the dispenser. Define the method isEmpty for this class. The method should return true if a CupDispenser object contains no cups, or false otherwise.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here