Question: Assignment # 5 : Structural and Behavioral Design Patterns [ 4 % ] This assignment relates to the following Course Learning Requirements: CLR 1 -
Assignment #: Structural and Behavioral Design Patterns
This assignment relates to the following Course Learning Requirements:
CLR Implement an objectedoriented program design incorporating the use of best practice design patterns using the JAVA programming language.
Objective of this Assignment:
The objective of this assignment is to demonstrate the skills required to:
a Apply thru practical application the following design patternsstrategies: Adapter and Proxy.
b Apply thru practical application the following design patternsstrategies: Observer.
Instructions
To prepare you for this assignment, read the module and content and follow the embedded learning activities.
Tasks:
The first task of this assignment is to read the scenario below. It is a continuation from the previous assignment.
Code&Code Scenario
Code&Code is a small company dedicated to Software Development. Their engineering team, to which you belong, is working on writing a Web Application as an MVP for a new customer.
The code name for this App is Loggy which is meant to offer functionality for a personal journal where users can log their daily activities through text, voice and video.
Your team was assigned to write the main functionality, which is essentially a Microblogging System where all the posts can be annotated with voice, video, images or text.
In the second iteration you created the skeleton of the backend service for performing the automatic closed captioning under these assumptions:
The closed captioning is performed through an external service AWS or Google Cloud
There should be an internal controller that:
o Receives the recordings to be processed from a requester
o Sends the recordings to the external service
o Receives its response
o Updates the recoding with the resulting closed captioning and
o Responds back to the requester
The recordings can be processed simultaneously, but there is a limit of only concurrent processes that can be handled by the sender
Therefore, there should be a queue that will act as a buffer for the overhead.
Once the recording is processed, the external service responds with a callback, therefore a listener should be ready to receive that request and update the object with a text file containing the strings for the closed captioning.
Only audio and video can be processed.
The processing time depends of the length of the recording.
You also modified the class for the Worker so they can process the same recording on two different external services for closed captioning eg AWS and GCloud
Once you have familiarized yourself with the scenario provided above, you must review the code from the previous iteration provided and proceed with code refactoring by applying Design Patterns in order to improve the general design.
The two pieces missing are:
a An interface for accessing the external service API. And finally, you connected the Workers to the API through a Proxy andor Adapter.
b A Notifier acting on a callback that triggers an event when the closedcaptioning process is completed, and the recording is updated.
Part I:
Proxy Pattern
The current code includes two classes that represent the APIs for Google and AWS services, but only a subset of the methods implemented are required for application. Because we want to expose the application only, the methods that are really required are as follows:
Implement a Proxy named GoogleSpeechTextProxy for the Google API
Implement a Proxy named AWSTranscribeProxy for the AWS API.
Update the CCWorker class accordingly.
Adapter Pattern
We want to make use of the same interface therefor the same method for accessing the two Proxies.
Implement a CCGoogleAdapter and CCAWSAdapter that have the same method although different logic for triggering the closedcaptioning process.
Update the CCWorker class accordingly keep the cc triggering using local methods
Part II:
Observer Pattern
We want to have notifications that can be sent to the Console to simulate an external Event Logging System that may be used for Analytics and Live Monitoring.
Implement Observer pattern being the Recording class, the Observable Subject, and a new Notifier class, the Observer.
The event should be triggered when the Recording is updated with the transcript or result from the closed captioning process and the message generated should include information from the recording itself.
Update the Main class accordingly.
Submission:
Your submission for this assignment should include:
Java code of your final solution.
Report of your observations on the changes you had to do to your code while following the recommended steps. Add snippets of code or screen captures to the report to show intermediate steps.
a Your report should not exceed pages in length.
b Note: This report can be anywhere from to pages depending on
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
