jimmyjazz31 / CS665Assign4

CS665 Assing4 on Structural Design Patterns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CS665Assign4

With this assignment, starting with Part1 the use of the Decorator pattern gives some benefits in the form of being able to include other attributes of the object without altering its main behavour. So in this part, where we want to get a return of a transaction, of which there are only 2 we have been able to use decorator in order to enhance the basic no frills transaction with no descriptor to ones that have logging details, including timestamps and security and both.

For Part2, this is a composite design pattern the justification for using this is design pattern is due to the fact a heirarchical structure exists with the monthly, quarterly and 1/2 yearly statements. This assists to keep objects and composition of objects more uniform. Composite design pattern is also useful for recursion and flexiblity which we have achieved here.

For part3 the use of the Adapter pattern (structural) assists since we have different interfaces that we are wanting to link for the purpose of checking and verifying both internally whether we have an actual client and then to apply the external ID checks of name, address, etc. These identifiers in theory would be from different external API providers and therefore having an adapter that can bring together similar if not exact data and other identifying data from different systems is essential. This pattern addresses incompatibilities between classes effectively.