Make More Cohesive class!!!

Hello friends!!!

I am new in this board and i am little confused with this question. Please help me out...

Consider the following Class, a student claims that the class is poorly (low) cohesive, device more cohesive class(s) out of this class (along with proper methods and attributes).

PatientManager
----------------------------
String patientName;
String patientAdmissionDate;
String PhysicianName;
String OperationDate;
----------------------------
setPatientData();
admitPatient();
dischargePatient();
getPhysicianAvailability()
getPhysicianWeekSchedule()
scheduleOperation()
----------------------------


This is low cohesive class please make it more cohesive with proper methods and attributes... I am waiting for your response(s)

Thanks in Advance...
Well, I don't think I can answer without a definition of cohesive. If it is an OOP term, this is the very first time I have ever seen it. If it is not, please define more clearly what you mean about cohesive.

One thing to note, though: I would remove all but the first method. There should be Hospital class (or maybe a Ward class?) that would have the methods to admit a patient, discharge him/her, assign a doctor and schedule an operation. Those are actions performed over the patient object by another object. True objects like "Lamp" can turn themselves on and off and it is a natural thing to code, but I just don't see a patient operating themselves, or discharging themselves.
Topic archived. No new replies allowed.