Reference no: EM133304
QUESTION 1
(a) A design pattern can be classified by its scope, which specifies whether the pattern applies primarily to classes or objects. Differentiate between class patterns and object patterns.
(b) Explain each of the following Object Oriented Design Principles. In each case give an example of a design pattern that can be used to apply the principle.
a. Program to an ‘interface' not to an Implementation
b. Classes should be opened for extension but closed for modification (Open Close Principle)
c. Principle of Least Knowledge - Talk only to your immediate friends
(c) Developers should be encouraged to learn and use design patterns. Elucidate why.
QUESTION 2
(a) A class instance can be created using new operator. Why should we use creational design prototypes to create objects?
(b) The factory method is one of the mostly used and one of the more robust design patterns. Discuss on the factory pattern's motivation, intent, associated benefits and drawbacks. Also provide a UML diagram to illustrate a typical implementation.
(c) The Abstract Factory pattern is often makes use of Dependency Inversion principle. Explain the term Dependency Inversion.
QUESTION 3
(a) XYZ news agency is a company which gathers news and publishes them to different subscribers. You have been asked to create an application that will allow the agency to inform right away, when event occurs, its subscribers about the occurrence. The subscribers can receive the news in different ways: Emails, SMS, etc. The solution need to be extensively enough to support new types of subscribers (maybe new communication technologies will appear). Identify the most appropriate GOF design pattern for the above task. Using a UML class diagram illustrate an implementation of a possible solution for the above problem.
(b) Differentiate between the Strategy and State design patterns.
(c) The Adapters can be implemented either as Object adapters or class adapters. Briefly describe each of these adapters.
QUESTION 4
(a) Active Record is one of the two data source architectural patterns covered during the course. Describe this pattern, explaining how it works and when to use it.
(b) PHP Frameworks such as CodeIgniter and Zend are all based on the Model View Controller (MVC) pattern. Very often such frameworks make use of the Front Controllers. Using a diagram explain the purpose of Front Controllers.
(c) Briefly describe three reuse anti-patterns and their refactored solution.
What should be the required initial investment
: What should be the required initial investment at the starting of the first year if the fund earns 11%?
|
Recognize the impact of this stock transaction
: What journal entry could Albuquerque make to recognize the impact of this stock transaction?
|
Compute janice morgans 2011 federal income tax payable
: Compute Janice Morgan's 2011 Federal income tax payable. If you use tax forms for your computations, you will need Forms 1040 and 4562 and Schedules A, B, C, and SE. Suggested software: H&R BLOCK At Home.
|
What consolidation entry could be needed for these bonds
: What consolidation entry could be needed for these bonds on December 31, 2012?
|
Model view controller pattern
: PHP Frameworks, class patterns and object patterns, Object Oriented Design Principles, Program to an ‘interface' not to an Implementation, Open Close Principle, Principle of Least Knowledge, creational design prototypes, Dependency Inversion principl..
|
Create a cash budget for the months of july
: Create a cash budget for the months of July through September 2012. Show required schedules for the calculation of receivables and payables.
|
Describe why the fair value of a companys assets
: Describe why the fair value of a company's assets is used in the preparation of combined financial statement
|
Partial income statement account balances
: Prepare an amortization schedule for the Note Receivable using the subsequent columns
|
Prepare an amortization schedule
: Prepare an amortization schedule for the Note Receivable using the subsequent columns
|