1 package tableapp.business; 2 3 import tableapp.spec.Access; 4 import java.util.Date ; 5 import java.text.DateFormat ; 6 7 15 16 public class AccessImpl 17 implements Access { 18 public int noAccesses; 19 public String sDate; 20 21 public AccessImpl() { 22 sDate=DateFormat.getTimeInstance(DateFormat.MEDIUM).format(new Date ()); 23 } 24 25 public String getDate() { 26 return sDate; 27 } 28 public int getNoAccesses() { 29 return noAccesses; 30 } 31 32 public void setNoAccesses(int num) { 33 this.noAccesses = num; 34 } 35 public void setDate(Date date) { 36 this.sDate = sDate=DateFormat.getTimeInstance(DateFormat.MEDIUM).format(date); 37 } 38 39 public String toString(){ 40 return "STRING VALUE: "+noAccesses+ " "+sDate; 41 } 42 } | Popular Tags |