Date post: | 24-Dec-2015 |
Category: |
Documents |
Upload: | patience-wilcox |
View: | 233 times |
Download: | 3 times |
Internal structures, components and deployment
Practice 3
Basic terms Classifier is an element of the model, which
specifies some general features for a set of objects. Features of the classifier can be behavioural, structural or connection.
Class is a classifier, which describes some the concept of the modeled area.
Basic terms Structured classificator Port Connector Assembly connector Delegate connector Component Colloboration Role Artefact Node
Structured classificator
Connectors
Composition
Task 1
The colloboration “Sales” includes the role of the seller “Salesman” and the buyer “Customer”. Show that the buyer and the seller can interact with
each other. Using the collaboration “Sales”, create a model of
the sale with the mediator “BrokeredSale”, in which the buyer interacts with the mediator “Broker” and the mediator as a customer interacts with the seller.
Task 2
The therapist receives visitors “Person” and writes prescriptions “Subscriptions” for “Medicine”; visitors carry out medicines. Build a structural model, which includes classes
Therapist, Medicine and Person, and the relationship between them.
Using cooperation show during the visit “Visit”, the therapist performs the duties of the doctor “doctor”, the visitor is a patient “Patient”, the medicines are offered in the form of recipes “Subscription”.
Task 3
The automobile “Car” consists of the engine “Engine”, a pair of “front” and “rear” wheels of a class “Wheel”. Add the connector of a type “drivetrain” so that the
car has a front wheel drive. Expand the model so that along with front wheel
drive cars there four-wheel drive cars are described as a private case of front wheel drive. Add the required elements, use the engine “DoubleEngine” with two drives of a type “powertrain”.
Task 4
The collaboration of handling an event “EventsHandling” includes roles “event”, “eventSource” and “eventListenter”. One source can have several listeners. Show this collaboration on the class diagram.
Task 4
Implement the behavior of events manager with the help of the collaboration “EventsHandling”. Reflect the participation of classes “EngineSource”, “EngineHandling”, “EngingListener” in the collaboration “EventsHandling” with designated roles “eventSource”, “event” and “eventListenter” under cindition that “EngineSource” is connected with the class “EngineLictener” by the association of the type “one-to-many”.
Task 5
The elevator “Elevator” consists of the cabin of a class “Cage”, remote control of a class “ControlUnit” and several panels for calling from the floors of the class “FloorControls”. The connector between the remote control and the cabin is of a type “cageWire”, between the remote control and panels – “floorWare”. This remote control is connected to each panel individually.
Task 5
Add to the model the engine of a class “Engine” as an integral part of the elevator. The engine is connected with the cabin by the cable “cable” and with the remote control by the scheme “controls”.
Modify the model so that the interaction between the elevator with external classes take place only through the interface buttons of the cab “CageControls”, of the elevator’s control “Operations” and the interfaces with floors “FloorButtons”. Commands taken through the interfaces are sent to the relevant parts of the Elevator.
Task 5
Specify that for working the elevator needs to be connected to the power.
List the names and types of all elements of the namespace of the class “Elevator”.
How are the ports of the class “Elevator” implemented in the code?
Task 6
Subsystem for data preparation of the morphology module “MorphologyDBS” consists of the database “Database”, the client for the data modification “DataClient”, the component of export “Export” and the data compiler “Compiler”.
Task 6
The database provides an interface for the data changing “IMorphologyData” and interface for the data exporting “IDataExport”. The client requires the interface for the data changing, the component of export requires an interface for the data export. The compiler does not require external interfaces, but implicitly depends on the database. Specify how the components are related in this subsystem.
Task 6
Place the database on the server “MorphoDB”, and all other components - on the linguist’s computer “LinguistPlace”.
Check the internal structure of the compiler in the following way. The compiler uses the interface “Imorphology” of the component “MorphoModel”. The compiler consists of the parser “Parser”, error message handler “Handler” and model builder “Builder”. Components which implement the parser and the builder of the model, report about errors through the interface “IErrorHandler” of the component Handler in the compiler. The builder requires the external interface “Imorphology”.
Task 7
The application of the class “Application” contain plug-ins. The plug-in of the class “Bean” is either the processing module “ProcessBean” or the algorithmic module “ComputeBean”. The processing module is connected by “ComputeLink” with plug-ins for performing calculations. Using the representation of the internal structure,
specify that the specialization “MainApp” of the application “Application” includes one process module and two related with it algorithmic modules.
Task 7
Modify the model, specify that the application “MainApp” consists of two connected processing modules, one of which is the main module “main”.
Show that the main processing module of the application “MainApp” implements the interface of the configuration “Configuration” through the port “ConfigurationEndpoint”.
Using the assembly connector, show that the main processing module “MainApp” can refer through interface “Computation” to the application “SecondApp”.
List all the features of the application “MainApp”.
Task 8
File “Morphology.dll” materializes the component “MorphoEngine”, which provides an interface “IMorphology”. Component “MorphoEngine” for working needs a component “RootObjects” and files of dictionaries. The files of dictionaries have names <ISO_639-1_code_of_language>.lng. For example, «ru.lng», «eng.lng». Component RootObjects is materialized in the library RootObject.dll.
Task 8
Display in a model all artifacts and the relationships between which are necessary for the launching of the morphological module working with the French and the German languages.
Specify that for the localization of the messages, component “MorphoEngine” uses the interface “IMorphoLocalize”. This interface has already been implemented for Russian and English languages by components “MorphoLicalize.dll”. Add to the model the dependence of the Russian localization component.
Mark, that for the correct functioning the morphological module needs a library “RootObjects.dll” of the version 4.0.1.157.