Question: QUESTION 5 (18 marks) (a) Consider the development of a robot system with a framework for adding executable modules for specialized tasks. A third-party developer

 QUESTION 5 (18 marks) (a) Consider the development of a robot

QUESTION 5 (18 marks) (a) Consider the development of a robot system with a framework for adding executable modules for specialized tasks. A third-party developer has created modules we would like to integrate into our system and use, but these were developed for a different module framework. Modules in our framework are managed using OurModuleManager: class OurModuleManager void addModule (Our Module module) () void initAllModules() (-) void process FrameAllModules() () 1 All modules in our module framework must inherit from the following class: class Our Module OurModule(); // constructor does almost nothing void init(); // most initialitation happens here void processFrame(): execute one tick worth of work The third-party modules are developed to a different interface and cannot be changed. An example of one of these is the LowlevelVisionProvider: class LowLavel Vision Provider LowLevelVisionProvider() inste everything void update (HLinePoints. hor LinePointsOut) () void update (VLinePoints* vertLine Points out) 1 (1) Briefly explain how design patterns improve the quality of software. (11) Use the Adapter design pattern to write an adapter class to adapt LowlevelVisionProvider to a form acceptable to Our ModuleManager (Note: The work done by the update functions corresponds to the work normally done in processFrame.) Write the code to add the adapted LowLevelVision Provider to our ModuleManager (which is an instance of OurModuleManager), initialize all the modules, and process one frame for all modules

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!