Specifications

Sun Services
Java™ Programming Language
Module 2, slide 14 of 26
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
Encapsulation
Hides the implementation details of a class
Forces the user to use an interface to access data
Makes the code more maintainable
+setDay(int) : boolean
+setYear(int) : boolean
+setMonth(int) : boolean
+getDay() : int
+getMonth() : int
+getYear() : int
MyDate
-date : long
-isDayValid(int) : boolean