当前位置:首页 >> 其它课程 >>

软件体系结构考试


CS6075 Final Take-Home Exam Answers
9:00am – 3:00pm, May 19, 2013 1. (8%) Answer the following questions about the big idea of software architecture in software engineering: a) What are

the principal insights from the discipline of building (conventional) architecture that are applicable to the construction of software systems? Ans:We all live in them. We know how they are built:Requirements, Design (blueprints), Construction, Use. Satisfaction of customers? needs. Specialization of labor. Multiple perspectives of the final product. Intermediate points where plans and progress are reviewed. Architecture is different from, but linked with the product/structure. Properties of structures are induced by the design of the architecture. The architect has a distinctive role and character. Process is not as important as architecture. Design and resulting qualities are at the forefront. Process is a means, not an end. Architecture has matured over time into a discipline. Architectural styles as sets of constraints. Styles also as wide range of solutions, techniques and palettes of compatible materials, colors, and sizes. A distinctive role and character in a project. Very broad training. Amasses and leverages extensive experience. A keen sense of aesthetics. Deep understanding of the domain: Properties of structures, materials, and environments and Needs of customers. Even first-rate programming skills are insufficient for the creation of complex software applications. b) Lists 5 or more differences between tasks of a software architect and a building architect. Explain your answer. Ans:The nature of software is different from that of building architecture. They are different things in different areas. Software is much more malleable than physical materials.When a building is built, it can?t be changed. However, software can be updated and rebuilt. The two “construction industries” are very different.The two whole industries have no similarity. Software deployment has no counterpart in building architecture. Software is a machine; a building is not. Software can be easily copied; a building is not. 2. (8%) Answer the following questions about the software architecture centric approach in software life cycle: a) The architecture-centric approach emphasizes that software architecture is artifact, not software development phase. Explain that if we only consider software architecture as a development phase, what the role of software architecture is in

software life cycle. Explain that if we consider software architecture as development artifact, what the role of software architecture is in software life cycle. Ans:As a phase:Treating architecture as a phase denies its foundational role in software development. It is more than “high-level design”. Architecture is also represented, e.g., by object code, source code,... As a artifact:The role is in the whole software life cycle, containing Requirements, Design, Implementation, Analysis and Testing, Evolution and Development Process. Requirements:Traditional SE suggests requirements analysis should remain unsullied by any consideration for a design. However, without reference to existing architectures it becomes difficult to assess practicality, schedules, or costs. In building architecture we talk about specific rooms? ?rather than the abstract concept “means for providing shelter”. In engineering new products come from the observation of existing solution and their limitations. Existing designs and architectures provide the solution vocabulary. Our understanding of what works now, and how it works, affects our wants and perceived needs. The insights from our experiences with existing systems helps us imagine what might work and enables us to assess development time and costs. Requirements analysis and consideration of design must be pursued at the same time. Design:Traditional design phase suggests translating the requirements into algorithms, so a programmer can implement them. Architecture-centric design stakeholder issues decision about use of COTS component overarching style and structure package and primary class structure deployment issues post implementation/deployment issues. Implementation:The objective is to create machine-executable source code. That code should be faithful to the architecture. Alternatively, it may adapt the architecture. How much adaptation is allowed? Architecturally-relevant vs. -unimportant adaptations. It must fully develop all outstanding details of the application Analysis and Testing:Analysis and testing are activities undertaken to assess the qualities of an artifact. The earlier an error is detected and corrected the lower the aggregate cost. Rigorous representations are required for analysis, so precise questions can be asked and answered . Evolution:Motivation. Evaluation or assessment. Design and choice of approach Action includes preparation for the next round of adaptation Development Process:Traditional software process discussions make the process activities the focal point. In architecture-centric software engineering the product becomes the focal point. No single “right” software process for architecture-centric software engineering exists. b) Explain that, in terms of unit tests of a software system, based on the system’s software architecture models, what black-box test cases can be designed? What white-box test cases can be designed? Ans: 3. (20%) Answer the following questions about the concepts of software architecture: a) Give 2 or more reasons that potentially cause a software system’s prescriptive and descriptive architectures mismatch? Ans:A system’s prescriptive architecture captures the design decisions made

prior to the system ’ s construction. It is the as-conceived or as-intended architecture A system’s descriptive architecture describes how the system has been built It is the as-implemented or as-realized architecture Reasons:The nature of the components The nature of the connection The global nature of the architecture Construction processes b) Use one sentence to explain each of the following elements of a software system’s architecture: component, connector, and configuration. Ans:Component:encapsulate processing and data in a system’s architecture Connector:an architectural building block tasked with effecting and regulating interactions among components Configuration:a set of specific associations between the components and connectors of a software system’s architecture c) Software architecture is a set of principle decisions on a software system in 4 aspects: structure, behavior, interaction, and non-functional properties. You are asked to design a software system for a user to manage his contact list with the following functionality: add a new contact, delete a contact, update a contact, search a contact, and view a contact. The software architecture must be based on MVC architectural pattern. · Draw a UML class diagram, with classes and their relationships, to show the structure of the system architecture. For each class in the diagram, just give its name and operations without signature. · Draw a UML sequence diagram to show the collaborative object behaviors that implement one of the above operations. · Describe your choice of connectors that implement communications between system components. · Give one example required non-functional property of the system. Ans:

Class diagram

Sequence diagram

4. (12%) Answer the following questions about software architectural styles: a) Use one sentence to explain each of the following categories of architectural styles: layered, data flow, shared memory, interpreter, implicit invocation, and peer-to-peer. Ans:layered:Hierarchical system organization. “Multi-level client-server”. Each layer exposes an interface (API) to be used by above layers data flow:Separate programs are executed in order; data is passed as an aggregate from one program to the next. shared memory:memory that may be simultaneously accessed by multiple programs with an intent to provide communication among them or avoid redundant copies Interpreter:Interpreter parses and executes input commands, updating the state maintained by the interpreter implicit invocation:a term used by some authors for a style of software architecture in which a system is structured around event handling, using a form of callback. peer-to-peer:a distributed application architecture that partitions tasks or work loads between peers. b) What is in common between virtual machine style and interpreter style? What is the deference between the two? Explain your answer. Ans:A virtual machine (VM) is a software implemented abstraction of the underlying hardware, which is presented to the application layer of the system. Virtual machines may be based on specifications of a hypothetical computer or emulate the computer architecture and functions of a real world computer. Interpreter parses and executes input commands, updating the state maintained by the interpreter Components: Command interpreter, program/interpreter state, user interface. Connectors: Typically very closely bound with direct procedure calls and shared state. Highly dynamic behavior possible, where the set of commands is dynamically modified. System architecture may remain constant while new capabilities are created based upon existing primitives. Superb for end-user programmability; supports dynamically changing set of

capabilities Lisp and Scheme c) When you use an object-oriented programming language, such as Java, to develop a software system, the system implicitly applies object-oriented architectural style. Applying any additional architectural style results in that the system architecture will be based on a combination of two or more styles. Use an example to show how to design a software system or program using both object-oriented style and pipe & filter style? Ans:An object-oriented program usually contains different types of objects, each corresponding to a particular kind of complex data to manage, or perhaps to a real-world object or concept such as a bank account, a hockey player, or a bulldozer. A program might contain multiple copies of each type of object, one for each of the real-world objects the program deals with. 5. (12%) Answer the following questions about software connectors: a) In architecture-centric approach, software connectors are considered as first class entities which should be implemented separately in the program that implements the architecture. For a program unit, such as class, of a program that implements a software connector, by reading its source code, how do we tell that this implemented connector is for the transfer of control or the transfer of data? Ans: Very simple connectors such as module linkers, provide their service simply by forming ducts between components. Other connectors augment ducts with some combination of data and control flow to provide richer interaction services. Very complex can also have an internal architecture that includes computation and information storage. b) Procedural call connector type can support two connector roles: communication and coordination. Use an example to explain in what case a procedural call connector only plays communication role. Use an example to explain in what case a procedural call connector only plays coordinator role. Use an example to explain in what case a procedural call connector can play both communication and coordinator roles. Ans:Main role associated with connectors Supports Different communication mechanisms e.g. procedure call, RPC, shared data access, message passing Constraints on communication structure/direction e.g. pipes Constraints on quality of service e.g. persistence Separates communication from computation May influence non-functional system characteristics e.g. performance, scalability, security Determine computation control Control delivery of data Separates control from computation Orthogonal to communication, conversion, and facilitation Elements of control are in communication, conversion and facilitation

c) For a software system that is designed based on the 3-tier architectural pattern, what are the typical connector types used in the system architecture? Explain your answer. Ans:Presentation tier:The user interface of the application, assume the function of the dialogue between the user and the application, the ships using the graphical user interface. Logic tier:The body of the application resides on the application server business process. Provide a variety of services for a variety of clients on the application.The server can be an integral part of the network or a distributed network Data tier:Database management system, is responsible for managing the database to read and write. Most update and retrieve large amounts of data using SQL language. 6. (12%) Answer the following questions about modeling and visualization of software architecture: a) Using an example to explain the relationship between views and viewpoints in architectural modeling. Ans:Generally, it is not feasible to capture everything we want to model in a single model or document. The model would be too big, complex, and confusing So, we create several coordinated models, each capturing a subset of the design decisions. Generally, the subset is organized around a particular concern or other selection criteria We call the subset-model a ?view?and the concern (or criteria) a ‘viewpoint’

Deployment view of a 3-tier application

Deployment view of a Lunar Lander system Both instances of the deployment viewpoint

b) Give one or more advantage of textual visualization over graphical visualization of architectural models. Give one or more advantage of graphical visualization over textual visualization of architectural models. Explain your answer. Ans:1.Depict entire architecture in a single file Good for linear or hierarchical structures Hundreds of available editors Substantial tool support if syntax is rigorous (e.g., defined in something like BNF) 2.Symbols, colors, and visual decorations more easily parsed by humans than structured text Handle non-hierarchical relationships well Diverse spatial interaction metaphors (scrolling, zooming) allow intuitive navigation c) Can the following UML diagrams be used to model structure related viewpoints or behavior related viewpoints of software architecture? Explain your answer. · Class diagram · Sequence diagram · Activity diagram · State machine diagram · Deployment diagram Ans:Class diagram: to model structure related viewpoints. Class diagram describes the types of objects in the system and the various kinds of static relationships that exist among them. Sequence diagram: to model structure related behaviour related viewpoints. Activity diagram: to model structure related behaviour related viewpoints. State machine diagram:to model structure related behaviour and viewpoints. Deployment diagram: to model structure related viewpoints. Deployment diagrams show a system’s physical layout, revealing which pieces of software run on what pieces of hardware. 7. (8%) Answer the following questions about analysis of software architecture a) Briefly describe the differences between the following architectural analysis techniques: inspect/review-based, model-based, and simulation-based. Ans:software must be built on a solid foundation. Failing to consider key scenarios, failing to design for common problems, or failing to appreciate the long term consequences of key decisions can put your application at risk. Modern tools and platforms help to simplify the task of building applications, but they do not replace the need to design your application carefully, based on your specific scenarios and requirements. The risks exposed by poor architecture include software that is unstable, is unable to support existing or future business requirements, or is difficult to deploy or manage in a production environment. Systems should be designed with consideration for the user, the system (the IT infrastructure), and the business goals. For each of these areas, you should outline key scenarios and identify important quality attributes (for example, reliability or scalability) and key areas of satisfaction and dissatisfaction. Where possible, develop and consider metrics that measure success in each of these areas.

b) ATAM based architectural analysis of a software architecture produces the following results: sensitivity points, trade-off points, non-risks, risks, and risk themes. Describe the relationships among these results. Ans:Software architecture is the fundamental organization of a system, it is implied in the system components, the relationship between components, components and environmental relationship to each other, and present and design and evolution of the principle of. Software architecture is a description of the overall structure of the system design, including the global organization and control structure, communication, synchronization between components and data access, function allocation design elements, physical distribution. 8. (8%) Answer the following questions about implementation of software architecture: a) In software development, what is forward engineering? What is reverse engineering? What is round-trip engineering? Ans:Forward engineering is the process through to language mapping model is converted to code. Reverse engineering is the process of discovering the technological principles of a device, object, or system through analysis of its structure, function, and operation. Round-trip engineering (RTE) is a functionality of software development tools that synchronizes two or more related software artifacts, such as, source code, models, configuration files, and other documents. b) In implementing a software architecture which is designed based on an architectural style, what is the advantage to select and use an architecture implementation framework that implements the style than direct programming based on the architecture? Ans:This is rarely easy or trivial. Few programming languages have explicit support for architecture-level constructs. Support infrastructure (libraries, operating systems, etc.) also has its own sets of concepts, metaphors, and rules To mitigate these mismatches, we leverage an architecture implementation framework 9. (8%) Answer the following questions about deployment and mobility of software architecture: a) What are the challenges in determining optimal deployment for a software system? How can software architecture aids in addressing those challenges? Ans:Widely distributed target processors Target processors embedded inside heterogeneous devices Different software components may require different hardware configurations System lifespans may stretch over decades Software system evolution is continuous (requiring redeployment) Mobile code may mandate that running, stateful components be redeployed b) Using examples to explain stateless mobility and stateful mobility? Why stateful mobility is more difficult than stateless mobility?

Ans:If a software module that needs to be migrated contains runtime state, then the module’s migration is known as stateful mobility. If only the code needs to be migrated, that is known as stateless mobility. 10. (8%) Answer the following questions about non-functional properties of software architecture: a) For the contact management system, draw 2 UML class diagrams to show two different architecture designs both of which support all the required functionality. Explain one or more difference between the two architecture designs in terms of their non-functional properties or quality attributes. Ans:

Linux – “as-documented” architecture

Linux – “as-implemented” architecture Only partially understood in many domains E.g., MS Windows and security

Qualitative vs. quantitative Frequently multi-dimensional Non-technical pressures E.g., time-to-market or functional features


相关文章:
软件体系结构考试参考试题
软件体系结构考试参考试题_IT认证_资格考试/认证_教育专区。软件体系结构常考题型,考试必过 1 壹 . 名词解释(参考斯佳分享的名词解释文档) 1.ADL(Architecture ...
软件体系结构试题(试题+答案)
软件体系结构试题(试题+答案)_工学_高等教育_教育专区。1、设计模式一般用来解决什么样的问题( a) A.同一问题的不同表相 B 不同问题的同一表相 C.不同...
软件体系结构考试要点
软件体系结构考试要点_工学_高等教育_教育专区。软件体系结构考试要点,西安科技大学,期末考试,期中考试 一、名词解释 1、B/S 浏览器/服务器,是三层应用结果的一...
软件体系结构试题库
软件体系结构试题库_工学_高等教育_教育专区。软件体系结构试题库(软件工程) 一、判断题 1、软件重用是指重复使用已有的软件产品用于开发新的软件系统,以达到提高...
软件体系结构期末考试复习资料
构件图、部署图)(活动图、状态图、协作图、顺序图) 、 3、 体系结构描述语言 ADL: 在底层语义的支持下, 为软件系统的概念体系结构建模提供了具体语法和结构框架...
软件体系结构(考试习题集含答案)
软件体系结构(考试习题集含答案)_计算机软件及应用_IT/计算机_专业资料。软件体系结构(考试习题集含答案)1.面向对象的方法优势体现在( ABD ) A. 简化软件开发过程...
2015软件体系结构复习大纲答案
2015软件体系结构复习大纲答案_IT认证_资格考试/认证_教育专区。2015软件体系结构复习大纲答案《软件设计与体系结构》 复习提纲 Chapter 1: 1. Web 的发展历程 ? ...
软件体系结构试题库试题和答案
依据页码:P31 8、软件体系结构的生命周期模型主要分为需求分析阶段,建立软件体系结构阶段()和实 现阶段。 答:设计阶段 依据页码:P38、39 9、软件体系结构应建立...
软件体系结构期末考试
软件体系结构组件间的连接方式如图表示,则图A的连接方式称为 ___ 连 接体系结构;图B的连接方式称为基于 ___ 连接体系结构。 A X A X 软件工厂 M M ed ...
软件设计与体系结构考试
软件设计与体系结构考试_工学_高等教育_教育专区。真题 第一章 1. 软件危机的概念、产生的原因、解决方法。 答:软件危机是指在计算机软件的开发和维护过程中所...
更多相关标签:
软件体系结构考试题 | 软件体系结构期末考试 | 软件体系结构的考试 | 软件体系结构 | 软件体系结构风格 | 软件体系结构设计 | 软件设计与体系结构 | 软件体系结构期末试题 |