Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Auto Generated Java Class.
- */
- public class Clock24 {
- public int hours;
- public int minutes;
- private boolean isAM;
- //defaults
- public Clock24()
- {
- int hours = 0;
- int minutes = 0;
- boolean isAM = false;
- }
- //parameterized constructors
- public Clock24 (int aHours, int aMinutes)
- {
- this.setHours (aHours);
- this.setMinutes (aMinutes);
- }
- //accessors
- public int getHours ()
- {
- return this.hours;
- }
- public int getMinutes ()
- {
- return this.minutes;
- }
- public boolean getIsAm ()
- {
- return this.isAM;
- }
- //mutators
- public void setHours (int aHours)
- {
- if (aHours >= 0)
- {
- this.hours = aHours;
- }
- }
- public void setMinutes (int aMinutes)
- {
- if (aMinutes >= 0)
- {
- this.minutes = aMinutes;
- }
- }
- public void isAM (boolean amIs)
- {
- this.isAM = amIs;
- }
- //other methods
- //setTime
- public void setTime (int aTime)
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement