FDC owns a very expensive, state of the art dental scan machine (a device far superior to a traditional dental X-ray machine) manufactured by Toshiba, Japan. FDC will be owning just one such machine in the foreseeable future. When modeling and implementing FDC system in software, you must ensure that only one instance of that machine is created. Which design pattern could come to your assistance? Justify your answer. Provide a UML diagram and an implementation for the pattern you have recommended. You may include suitable attributes for the machine such as serial number, make, country of origin and cost. Your implementation should allow the user to enter details of the dental scanner and create the sole instance of that machine. Any attempt to create more than one instance of the scanner must be prevented. Provide screen shots and source code listing as evidence of program execution. (LO 2) (LO 3) (LO 4) iii) The treatments given to patients at FDC can be of two types: elementary and complex . An elementary treatment is a single procedure such as a simple extraction or a dental filling which usually requires a single visit.
A complex treatment is a composition of several elementary treatments possibly taking several visits by the patient, for example, a tooth implant for a severely decayed tooth may require an antibiotic treatment for curing any pus accumulation, an extraction of the affected tooth and finally a dental implant of a Titanium tooth. The users of the system (mainly consultants and dentists) wish to handle both of these treatments in a uniform way. For example, the message getDetails() sent to an elementary treatment should provide details of a single procedure while the same message given to a complex treatment would list details of each elementary treatment that make up the complex treatment. Which design pattern is suitable for handling this requirement? Justify your answer. Support your answer with a context specific UML class diagram . Implement your design by using a suitable object oriented language. Provide screen shots as evidence of program execution (in addition to source code listing). (LO 2) (LO 3) (LO 4) iv) Patients who need dental scans are kept in a First In First Out queue. Assume that you have found an already developed Queue container in a software library. It provides standard queue operations to insert and remove data (known as enque and deque respectively). However, you need some specific operations such as search() to look up a particular patient and showAll() to list all the patients in the queue. These additional operations are not provided by the library unit. Which design pattern would enable you to obtain the additional functionality required by the queue? Justify your answer. Supplement your answer with a UML class diagram. Coding is NOT required. (LO 2) (LO 4)
Grading Rubric Grading Criteria Achieved Feedback LO1 Examine the key components related to the object-orientated programming paradigm, analyzing design pattern types P1 Examine the characteristics of the
You've reached the end of your free preview.
Want to read all 17 pages?
- Summer '18