Software Engineering - III Unit PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This document is a set of questions and answers covering software engineering topics focused on architecture and design. The document includes questions about architectural design, client-server models, sub-systems and modules.
Full Transcript
Software Engineering – III UNIT 2 marks: 1) What is architectural design? Architectural design is a creative process where we try to establish a system organisation that will satisfy the functional and non-functional system requirements. Because it is a creative process, the activities within the p...
Software Engineering – III UNIT 2 marks: 1) What is architectural design? Architectural design is a creative process where we try to establish a system organisation that will satisfy the functional and non-functional system requirements. Because it is a creative process, the activities within the process differ radically depending on the type of system being developed, the background and experience of the system architect, and the specific requirements for the system. 2) What are the major components of client-server model? A set of servers that offer services to other sub-systems. A set of clients that call on the services offered by servers. A network that allows the clients to access these services. 3) Expand APSE. Ada Programming Support Environment 4) Give the layered model of a version management system. Configuration Management System Layer Object Management System Layer Database System Layer Operating System layer 5) Write the distinction between sub-systems and modules. A sub-system is a system in its own right whose operation does not depend on the services provided by other sub-systems. Sub-systems are composed of modules and have defined interfaces, which are used for communication with other sub-systems. A module is normally a system component that provides one or more services to other modules. It makes use of services provided by other modules. It is not normally considered to be an independent system. Modules are usually composed from a number of other simpler system components. 6) Name the two main strategies while decomposing a sub-system into modules. (i) Object-oriented decomposition - decompose a system into a set of communicating objects. (ii) Function-oriented pipelining - decompose a system into functional modules that accept input data and transform it into output data. 7) Write any 2 advantages of function-oriented pipelining architecture. It supports the reuse of transformations. Evolving the system by adding new transformations is usually straightforward. 8) Write the stages of object-oriented design process. (i) Understand and define the context and the modes of use of the system. (ii) Design the system architecture. (iii) Identify the principal objects in the system. (iv) Develop design models. (v) Specify object interfaces. 9) What is the use of static model and dynamic model w.r.t. system context? The system context is a static model that describes the other systems in that environment. The model of the system use is a dynamic model that describes how the system actually interacts with its environment. 10) What is object identification? Object identification is concerned with identifying object classes. The design is described in terms of these classes. We have to refine the object classes that we initially identify and revisit this stage of the process as we develop a deeper understanding of the design. 11) What is grammatical analysis of a natural language? Grammatical analysis of a natural language description of a system is used to identify object class. Objects and attributes are nouns; operations or services are verbs. 12) What is behavioural approach? Behavioral approach is an approach where the designer first understands the overall behaviour of the system. The various behaviours are assigned to different parts of the system and an understanding is derived of who initiates and participates in these behaviours. Participants who play significant roles are recognised as objects. 13) What is scenario-based analysis? Scenario-based analysis is an analysis where various scenarios of system use are identified and analysed in turn. As each scenario is analysed, the team responsible for the analysis must identify the required objects, attributes and operations. A method of analysis called CRC cards where analysts and designers take on the role of objects is effective in supporting this scenario-based approach. 14) What is the use of design models w.r.t. object oriented design? Design models show the objects or object classes in a system and, where appropriate, the relationships between these entities. They are the bridge between the requirements for the system and the system implementation. 15) Name the types of design models that describe an object oriented design. (i) Static models (ii) Dynamic models 16) What is the function of static model and dynamic model w.r.t.object oriented design? Static models describe the static structure of the system using object classes and their relationships. Important relationships that may be documented at this stage are generalisation relationships, uses/used-by relationships and composition relationships. Dynamic models describe the dynamic structure of the system and show the interactions between the system objects (not the object classes). Interactions that may be documented include the sequence of service requests made by objects and the way in which the state of the system is related to these object interactions. 17) What is the use of subsystem model and sequence models? Subsystem models show logical groupings of objects into coherent sub-systems. These are represented using a form of class diagram where each sub-system is shown as a package. Subsystem models are static models. Sequence models show the sequence of object interactions. These are represented using a UML sequence or a collaboration diagram. Sequence models are dynamic models. 18) Name the four elements of design patterns. (i) A name that is a meaningful reference to the pattern. (ii) A description of the problem area that explains when the pattern may be applied. (iii) A solution description of the parts of the design solution, their relationships, and their responsibilities. (iv) A statement of the consequences—the results and trade-offs—of applying the pattern. Long answer questions: 1. What are the various points that are considered while developing architectural model? (4) (1) Is there a generic application architecture that can act as a template for the system that is being designed? (2) How will the system be distributed across a number of processors? (3) What architectural style or styles are appropriate for the system? (4) What will be the fundamental approach used to structure the system? (5) How will the structural units in the system be decomposed into modules? () What strategy will be used to control the operation of the units in the system? (7) How will the architectural design be evaluated? (8) How should the architecture of the system be documented? 2. Write the advantages and disadvantages of a shared repository model. (4/6) (i) It is an efficient way to share large amounts of data. There is no need to transmit data explicitly from one sub-system to another. However, sub-systems must agree on the repository data model. Inevitably, this is a compromise between the specific needs of each tool. Performance may be adversely affected by this compromise. It may be difficult or impossible to integrate new sub-systems if their data models do not fit the agreed schema. (ii) Sub-systems that produce data need not be concerned with how that data is used by other sub- systems. However, evolution may be difficult as a large volume of information is generated according to an agreed data model. Translating this to a new model will certainly be expensive; it may be difficult or even impossible. (iii) Activities such as backup, security, access control and recovery from error are centralised. They are the responsibility of the repository manager. Tools can focus on their principal function rather than be concerned with these issues. However, different sub-systems may have different requirements for security, recovery and backup policies. The repository model forces the same policy on all sub-systems. (iv) The model of sharing is visible through the repository schema. It is straightforward to integrate new tools given that they are compatible with the agreed data model. However, it may be difficult to distribute the repository over a number of machines. Although it is possible to distribute a logically centralised repository, there may be problems with data redundancy and inconsistency. 3. Explain client-server model with an example diagram. (4/6) The client-server architectural model is a system model where the system is organised as 2 set of services and associated servers and clients that access and use the services. The major components of client-server model are: A set of servers that offer services to other sub-systems. A set of clients that call on the services offered by servers. A network that allows the clients to access these services. Clients may have to know the names of the available servers and the services that they provide. However, servers need not know either the identity of clients or how many clients there are. Clients access the services provided by a server through remote procedure calls using a request- reply protocol such as the http protocol used in the WWW. Essentially, a client makes a request to a server and waits until it receives a reply. Eg : The architecture of a film and picture library system In this system, several servers manage and display the different types of media. Video frames need to be transmitted quickly and in synchrony but at relatively low resolution. Still pictures, however, must be maintained at a high resolution, so it is appropriate to maintain them on a separate server. The catalogue must be able to deal with a variety of queries and provide links into the web information system that includes data about the film and video clip, and an e-commerce system that supports the sale of film and video clips. The client program is simply an integrated user interface, constructed using a web browser, to these services. 4. Explain layered model with a diagram. (4/6) The layered model of an architecture (sometimes called an abstract machine model) organises a system into layers, each of which provide a set of services. Each layer can be thought of as an abstract machine whose machine language is defined by the services provided by the layer. For example, a common way to implement a language is to define an ideal 'language machine' and compile the language into code for this machine. A further translation step then converts this abstract machine code to real machine code. Example : Layered model of a version management system Configuration Management System Layer Object Management System Layer Database System Layer Operating System layer The configuration management system manages versions of objects and provides general configuration management facilities. To support these configuration management facilities, it uses an object management system that provides information storage and management services for configuration items or objects. This system is built on top of a database system to provide basic data storage and services such as transaction management, rollback and recovery, and access control. The database management uses the underlying operating system facilities and file store in its implementation. Advantages: The layered approach supports the incremental development of systems. When layer interfaces change or new facilities are added to a layer, only that layer is affected. Disadvantages: Structuring systems in this way can be difficult. Performance can also be a problem because of the multiple levels of command interpretation that are sometimes required. 5.Write a note on object-oriented decomposition. (4) An object-oriented decomposition is concerned with object classes, their attributes and their operations. When implemented, objects are created from these classes and some control model is used to coordinate object operations. Example : An object model of an invoice processing system This system can issue invoices to customers, receive payments, and issue receipts for these payments and reminders for unpaid invoices. Here, object classes have names and a set of associated attributes. Operations, if any, are defined in the lower part of the rectangle representing the object. Dashed arrows indicate that an object uses the attributes or services provided by another object. Advantages: The implementation of objects can be modified without affecting other objects. As the real-world entities are used in different systems, objects can be reused. Disadvantages: To use services, objects must explicitly reference the name and the interface of other objects. More complex entities are sometimes difficult to represent as objects 6. Explain function-oriented pipelining with an example. (4) In a function-oriented pipeline or data-flow model, functional transformations process their inputs and produce outputs. Data flows from one to another and is transformed as it moves through the sequence. Each processing step is implemented as a transform. Input data flows through these transforms until converted to output. Example: Pipeline model of an invoice processing system An organisation has issued invoices to customers. Once a week, payments that have been made are reconciled with the invoices. For those invoices that have been paid, a receipt is issued. For those invoices that have not been paid within the allowed payment time, a reminder is issued. Advantages: It supports the reuse of transformations. Evolving the system by adding new transformations is usually straightforward. Disadvantages: There has to be a common format for data transfer that can be recognised by all transformations. 7. Write a note on object oriented design process with an example. (4/6) The general process for object-oriented design has a number of stages: (i) Understand and define the context and the modes of use of the system. (ii) Design the system architecture. (iii) Identify the principal objects in the system. (iv) Develop design models. (v) Specify object interfaces. All of the above activities are interleaved and so influence each other. Objects are identified and the interfaces fully or partially specified as the architecture of the system is defined. Example : System for creating weather maps using automatically collected meteorological data. An overall system architecture can be developed from a relatively brief system description: A weather mapping system is required to generate weather maps on a regular basis using data collected from weather stations. Weather stations transmit their data to the area computer. The area computer system validates the collected data and integrates the data from different sources. Using the integrated data, a set of local weather maps is created. Maps may be printed for distribution or may be displayed in a number of different formats. Figure below illustrates a possible system architecture that can be derived from this description. This is a layered architecture that reflects the stages of processing in the system, namely data collection, data integration, data archiving and map generation. A layered architecture is appropriate in this case because each stage relies only on the processing of the previous stage for its operation. 8. Explain system context and models of use with a use-case diagram. (4/6) The first stage in any software design process is to develop an understanding of the relationships between the software that is being designed and its external environment. It helps to decide how to provide the required system functionality and how to structure the system to communicate with its environment. The system context and the model of system use represent two complementary models of the relationships between a system and its environment: (i) The system context is a static model that describes the other systems in that environment. (ii) The model of the system use is a dynamic model that describes how the system actually interacts with its environment. Example : The use-case model for the weather station This shows that weather station interacts with external entities for startup and shutdown, for reporting the weather data that has been collected, and for instrument testing and calibration. Each of these use-cases can be described in structured natural language. This helps designers identify objects in the system and gives them an understanding of what the system is intended to do. The context model of a system may be represented using associations where a simple block diagram of the overall system architecture is produced. 9. Briefly explain architectural design with an example. (4) Architectural design is a creative process where we try to establish a system organisation that will satisfy the functional and non-functional system requirements. Because it is a creative process, the activities within the process differ radically depending on the type of system being developed, the background and experience of the system architect, and the specific requirements for the system. Example : The weather station architecture The three layers in the weather station software are: (i) The interface layer that is concerned with all communications with other parts of the system and with providing the external interfaces of the system. (ii) The data collection layer that is concerned with managing the collection of data from the instruments and with summarising the weather data before transmission to the mapping system. (iii) The instruments layer that is an encapsulation of all of the instruments used to collect raw data about the weather conditions. 10. Explain the various proposals mode to identify object classes. (4/6) (i) Use a grammatical analysis of a natural language description of a system. Objects and attributes are nouns; operations or services are verbs. (ii) Use tangible entities (things) in the application domain such as aircraft, roles such as manager, events such as request, interactions such as meetings, locations such as offices, organisational units such as companies, and so on. (iii) Use a behavioural approach where the designer first understands the overall behaviour of the system. The various behaviours are assigned to different parts of the system and an understanding is derived of who initiates and participates in these behaviours. Participants who play significant roles are recognised as objects. (iv) Use a scenario-based analysis where various scenarios of system use are identified and analysed in turn. As each scenario is analysed, the team responsible for the analysis must identify the required objects, attributes and operations. A method of analysis called CRC cards where analysts and designers take on the role of objects is effective in supporting this scenario-based approach. 11. Explain sequence model that shows the operations involved in collecting the data from a weather section with a diagram. (4/6) Sequence models are dynamic models that document, for each mode of interaction, the sequence of object interactions that take place. Figure below is an example of a sequence model that shows the operations involved in collecting the data from a weather station. (i) An, object that is an instance of CommsController receives a request from its environment to send a weather report. It acknowledges receipt of this request. The half-arrowhead on the acknowledge message indicates that the message sender does not expect a reply. (ii) This object sends a message to an object that is an instance of WeatherStation to create a weather report. The instance of CommsController then suspends itself (its control box ends). The style of arrowhead used indicates that the CommsController object instance and the WeatherStation object instance are objects that may execute concurrently. (iii) The object that is an instance of WeatherStation sends a message to a WeatherData object to summarise the weather data. In this case, the squaredoff style of arrowhead indicates that the instance of WeatherStation waits for a reply. (iv) This summary is computed and control returns to the WeatherStation object. The dotted arrow indicates a return of control. (v) This object sends a message to CommsController requesting it to transfer the data to the remote system. The WeatherStation object then suspends itself. (vi) The CommsController object sends the summarised data to the remote system, receives an acknowledgement, and then suspends itself waiting for the next request. 12. With a statechart diagram, explain how WeatherStation object responds to requests for various services? (4/6) (i) If the object state is Shutdown then it can only respond to a startup() message. It then moves into a state where it is waiting for further messages. The unlabelled arrow with the black blob indicates that the Shutdown state is the initial state. (ii) In the Waiting state, the system expects further messages. If a shutdown() message is received, the object returns to the shutdown state. (iii) If a reportWeather() message is received, the system moves to the Summarising state. When the summary is complete, the system moves to a Transmitting state where the information is transmitted through the CommsController. It then returns to the Waiting state. (iv) If a calibrate() message is received, the system moves to the Calibrating state, then the Testing state, and then the Transmitting state, before returning to the Waiting state. If attest() message is received, the system moves directly to the Testing state. (v) If a signal from the clock is received, the system moves to the Collecting state, where it is collecting data from the instruments. Each instrument is instructed in turn to collect its data. 13. Write a note on object interface specification. (4/6) Object interface specification is the specification of the interfaces between the components in a design. We need to specify interfaces so that objects and sub-systems can be designed in parallel. Object interface design is concerned with specifying the detail of the interface to an object or to a group of objects. This means defining the signatures and semantics of the services that are provided by the object or by a group of objects. Interfaces can be specified in the UML using the same notation as in a class diagram. There is not necessarily a simple 1:1 relationship between objects and interfaces. The same object may have several interfaces, each of which is a viewpoint on the methods that it provides.. Equally, a group of objects may all be accessed through a single interface. Example: An array representation of a stack may be changed to a list representation without affecting other objects that use the stack. 14. Write a note on design patterns. (4/6) Design patterns are proven solutions to common problems encountered in software design. They're like blueprints or templates that you can adapt to solve specific problems in your code. Design patterns are usually associated with object-oriented design. Published patterns often rely on object characteristics such as inheritance and polymorphism to provide generality. The four essential elements of design patterns are: (i) A name that is a meaningful reference to the pattern. (ii) A description of the problem area that explains when the pattern may be applied. (iii) A solution description of the parts of the design solution, their relationships, and their responsibilities. (iv) A statement of the consequences—the results and trade-offs—of applying the pattern. Gamma and his co-authors break down the problem description into motivation (a description of why the pattern is useful) and applicability (a description of situations in which the pattern may be used). Under the description of the solution, they describe the pattern structure, participants, collaborations, and implementation. This pattern can be used in situations where different presentations of an object’s state are required. It separates the object that must be displayed from the different forms of presentation.