Question:
Consider a workflow system supporting software developers. The system enables managers to model the process the developers should follow in terms of processes and work products. The manager can assign specific processes to each developer and set deadlines for the delivery of each work product. The system supports several types of work products, including formatted text, picture, and URLs. The manager, while editing the workflow, can dynamically set the type of each work product at run time. Assuming one of your design goals is to design the system so that more work product types can be added in the future, which design pattern would you use to represent work products? Draw a UML class diagram to connect the classes namely WorkflowSystem, WorkProduct, WorkProductContent, TextContent, PictureContent, and URLContent.
Answer:
We use a bridge pattern. The interface class stores the deadline and type of work product and provides the interface to the rest of the application. The implementor classes store the content of the work product and can be substituted at run time. All implementor classes comply to the same abstract WorkProductContent interface.
Consider a workflow system supporting software developers. The system enables managers to model the process the developers should follow in terms of processes and work products. The manager can assign specific processes to each developer and set deadlines for the delivery of each work product. The system supports several types of work products, including formatted text, picture, and URLs. The manager, while editing the workflow, can dynamically set the type of each work product at run time. Assuming one of your design goals is to design the system so that more work product types can be added in the future, which design pattern would you use to represent work products? Draw a UML class diagram to connect the classes namely WorkflowSystem, WorkProduct, WorkProductContent, TextContent, PictureContent, and URLContent.
Answer:
We use a bridge pattern. The interface class stores the deadline and type of work product and provides the interface to the rest of the application. The implementor classes store the content of the work product and can be substituted at run time. All implementor classes comply to the same abstract WorkProductContent interface.
0 comments:
Post a Comment