Question: QUESTION 2 (a) Consider the following description of the problem domain for a hospital (15 marks) management system. A ward is a division of a
QUESTION 2 (a) Consider the following description of the problem domain for a hospital (15 marks) management system. A ward is a division of a hospital shared by patients who need a similar kind of care. In a hospital, there are a number of wards. Each ward has a unique name and may be empty or have patients on it. Wards are differentiated by the gender of its patients, i.e. male wards and female wards. A ward can only have patients of the appropriate gender admitted to it. Furthermore, every ward has a fixed capacity (determined by the number of beds in the ward) but different wards may have different capacities. Doctors in the hospital are organised into teams. Each team has a unique name or code (eg. Orthopaedics or Paediatrics) and is led by a consultant doctor with the appropriate speciality. She/he can supervise fellows, residents, and medical students. The rest of the team are all junior doctors. Each doctor can be a member of no more than one team. Document the domain model for this domain. (b) Consider the following code: (18 marks) 01. void deleteArrayElement(int array[], int arraySize, 02. Int value) 03. \& 04. int i; 05. int found = arraySize +1; 06. 07. for ( i=0; ii++) 08. If (array[i] = a value) 09. 10. found = i; 11. break; 12. \} 13. if (found +1 ) // really found? 15. \{ 16. for (i=found; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
