dcsimg
law of Demeter.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   aobakwe_kobedi
Posted On:   Thursday, June 11, 2009 09:23 AM

The following fragments of Java code are part of a Clinic system. For each fragment a. to d. below discuss briefly whether or not it is consistent with the Law of Demeter.
a.
this.setDoctor(″Fabian Romanesco″);
b.
Patient p1 = new Patient(″Eleni Smith″, 26172); p1.setDOB(21/07/46);
c.
Clinic patientList = this.getDoctor().getClinic().getPatientList();
d.
System.out.println(this.dob);

About | Sitemap | Contact