60 likes | 185 Vues
This tutorial explores the composition of software components in two scenarios: a Data Collector component using services from a Sensor component for Sensor Management and Sensor Data, and a Photo Library system consisting of components like Photo Library, Image Manager, and User Interface. We analyze types of component composition, identifying hierarchical composition and potential interface incompatibility such as operation incompleteness and operation incompatibility. The exercise entails correct composition techniques for effective integration of the specified components.
E N D
IT323 Software Engineering II Tutorial#5 CBSE
Q1 • Consider the two components below: Data collector and Sensor. The Data collector component requires the services provided by Sensor component to get the SensorManagement and SensorData. From the above specification, compose the two components. • Which type of component composition used? Is there any type of interface incompatibility?
Q1 Type of Composition: Hierarchical composition Type of interface incompatibility: Operation incompleteness & operation incompatibility
Q2 • In a photo library system, components are used to implement a system that download images from a digital camera and stores them in a photograph library. The components are: Photo Library, Image Manager, and User interface. Each component provides the following services: • Photo Library:public void addItem (Identifier pid ; Photograph p; CatalogEntryphotodesc) ; • Image Manager:public Photograph retrieve (Identifier pid) ; • User interface:public CatalogEntrycatEntry (Identifier pid) ; • Compose the components using the right composition type?