Docsity

Software Engineering Fundamentals: Solutions and Ethical Considerations, Study notes of Engineering

Partial preview of the text

Download Software Engineering Fundamentals: Solutions and Ethical Considerations and more Study notes Engineering in PDF only on Docsity!

Software engineering 9th

solution manual

Software should not make wasteful use of system resources

B.4 Acceptability

Software must accepted by the users for which it was designed. This means it must be understandable, usable and compatible with other systems.

A.3 What is software engineering?

Software engineering is an engineering discipline that is concerned with all aspects of software

production. A.4 What are the fundamental software engineering activities?

Software specification, software development, software validation and software evolution A.

What is the difference between software engineering and computer science?

Computer science is concerned with theory and fundamentals; software engineering is concerned

with the practicalities of developing and delivering useful software A.6 What is the difference

between software engineering and system engineering?

System engineering is concerned with all aspects of computer-based systems development including hardware, software and process engineering. Software engineering is part of this more general process.

A.7 What are the key challenges facing software engineering?

B.1 Coping with increasing diversity, demands for reduced delivery times and developing
trustworthy software
B.2 Heterogeneity
  • Developing techniques for building software that can cope with heterogeneous platforms and execution environments;
B.3 Delivery
  • Developing techniques that lead to faster delivery of software;
B.4 Trust
  • Developing techniques that demonstrate that software can be trusted by its users

A.8 What are the costs of software engineering?

Roughly 60% of costs are development costs, 40% are testing costs. For custom software, evolution costs often exceed development costs Costs vary depending on the type of system being developed and the requirements of system attributes such as performance and system reliability

Distribution of costs depends on the development model that is used A.9 What

are the best software engineering techniques and methods?

While all software projects have to be professionally managed and developed, different techniques are appropriate for different types of system. For example, games should always be developed using

a series of prototypes whereas safety critical control systems require a complete and analyzable specification to be developed. You can’t, therefore, say that one method is better than another.

A.10 What differences has the web made to software engineering?

The web has led to the availability of software services and the possibility of developing highly distributed service-based systems. Web-based systems development has led to important advances in programming languages and software reuse.

1.4Software engineering

1.4.1Software engineering is an engineering

discipline that is concerned with all aspects

of software production from the early stages

of system specification through to

maintaining the system after it has gone into

use.

A.1 Engineering discipline

Using appropriate theories and methods to solve problems bearing in mind organizational and financial constraints.

A.2 All aspects of software production

Not just technical process of development. Also project management and the development of tools, methods etc. to support software production.

1.4.2General issues that affect most software

A.1 Heterogeneity

Increasingly, systems are required to operate as distributed systems across networks that include different types of computer and mobile devices.

A.2 Business and social change

Business and society are changing incredibly quickly as emerging economies develop and new technologies become available. They need to be able to change their existing software and to rapidly develop new software.

A.3 Security and trust

As software is intertwined with all aspects of our lives, it is essential that we can trust that software.

1.4.3Software engineering diversity

B.1 here are many different types of software system and there is no universal set of
software techniques that is applicable to all of these.
B.2 The software engineering methods and tools used depend on the type of
application being developed, the requirements of the customer and the
background of the development team.

A.2 Application types

B.1 Stand-alone applications

These are application systems that run on a local computer, such as a PC. They include all necessary functionality and do not need to be connected to a network.

B.2 Interactive transaction-based applications

Ajax 包括: XHTML 和 CSS 使用文档对象模型(Document Object Model)作动态显示和交互 使用 XML 和 XSLT 做数据交互和操作 使用 XMLHttpRequest 进行异步数据接收 使用 JavaScript 将它们绑定在一起

A.2 Web-based software engineering

B.1 Web-based systems are complex distributed systems but the fundamental
principles of software engineering discussed previously are as applicable to
them as they are to any other types of system.
B.2 The fundamental ideas of software engineering, discussed in the previous section,
apply to web-based software in the same way that they apply to other types of
software system

1.5Software engineering

ethics

1.5.1Concept

Software engineering involves wider responsibilities than simply the application of technical skills. Software engineers must behave in an honest and ethically responsible way if they are to be respected as professionals. Ethical behaviour is more than simply upholding the law but involves following a set of principles that are morally correct.

1.5.2Issues of professional responsibility

A.1 Confidentiality

Engineers should normally respect the confidentiality of their employers or clients irrespective of whether or not a formal confidentiality agreement has been signed.

A.2 Competence

Engineers should not misrepresent their level of competence. They should not knowingly accept work which is outwith their competence.

A.3 Intellectual property rights

Engineers should be aware of local laws governing the use of intellectual property such as patents, copyright, etc. They should be careful to ensure that the intellectual property of employers and clients is protected.

A.4 Computer misuse

Software engineers should not use their technical skills to misuse other people’s computers. Computer misuse ranges from relatively trivial (game playing on an employer’s machine, say) to extremely serious (dissemination of viruses).

1.5.3ACM/IEEE Code of Ethics

(Association for Computing Machinery/Institute of Electrical and Electronics Engineers)

A.1 Concept

The professional societies in the US have cooperated to produce a code of ethical practice. Members of these organisations sign up to the code of practice when they join. The Code contains eight Principles related to the behaviour of and decisions made by professional software engineers, including practitioners, educators, managers, supervisors and policy makers, as well as trainees and students of the profession.

A.2 Ethical principles

C.1 PUBLIC

Software engineers shall act consistently with the public interest.

C.2 CLIENT AND EMPLOYER

Software engineers shall act in a manner that is in the best interests of their client and employer consistent with the public interest.

C.3 PRODUCT

Software engineers shall ensure that their products and related modifications meet the highest professional standards possible.

C.4 JUDGMENT

Software engineers shall maintain integrity and independence in their professional judgment.

C.5 MANAGEMENT

Software engineering managers and leaders shall subscribe to and promote an ethical approach to the management of software development and maintenance.

C.6 PROFESSION

Software engineers shall advance the integrity and reputation of the profession consistent with the public interest.

C.7 COLLEAGUES

Software engineers shall be fair to and supportive of their colleagues.

C.8 SELF

Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession.

A.3 Ethical dilemmas

Disagreement in principle with the policies of senior management Your employer acts in an unethical way and releases a safety-critical system without finishing the testing of the system Participation in the development of military weapons systems or nuclear systems

1.6Key points

A.1 Software engineering is an engineering discipline that is concerned with all aspects

of software production.

A.2 Essential software product attributes are maintainability, dependability and

security, efficiency and acceptability.

Chapter 2 (2) Software

processes

2.1Topics covered

  1. Software process models
  2. Process activities
  3. Coping with change

2.2The software process

2.2.1Introduction

A.1 A structured set of activities required to develop a software system.

B.1 Many different software processes but all involve:
  1. Specification – defining what the system should do;
  2. Design and implementation – defining the organization of the system and implementing the system;
  3. Validation – checking that it does what the customer wants;
  4. Evolution – changing the system in response to changing customer needs.

A.2 A software process model is an abstract representation of a process. It presents a

description of a process from some particular perspective.

2.2.2Plan-driven and agile processes

  1. Plan-driven processes are processes where all of the process activities are planned in advance and progress is measured against this plan.
  2. In agile processes, planning is incremental and it is easier to change the process to reflect changing customer requirements.
  3. In practice, most practical processes include elements of both plan-driven and agile approaches.
  4. There are no right or wrong software processes.

2.3Software process models

2.3.1Generic software process models

A.1 The waterfall model

Plan-driven model. Separate and distinct phases of specification and development.

A.2 Incremental development

Specification, development and validation are interleaved. May be plan-driven or agile.

A.3 Reuse-oriented software engineering

The system is assembled from existing components. May be plan-driven or agile.

A.4 In practice, most large systems are developed using a process that incorporates

elements from all of these models.

2.3.2Waterfall model

B.1 Waterfall model phases
  1. Requirements analysis and definition
  2. System and software design
  1. Implementation and unit testing
  2. Integration and system testing
  3. Operation and maintenance

Waterfall model

B.2 Waterfall model problems

Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer requirements. Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly limited during the design process. The waterfall model is mostly used for large systems engineering projects

2.3.3Incremental development

A.1 Incremental development benefits

B.1 The cost of accommodating changing customer requirements is reduced.

The amount of analysis and documentation that has to be redone is much less than is required with the waterfall model.

B.2 It is easier to get customer feedback on the development work that has been done.
B.2 Requirements elicitation and analysis

What do the system stakeholders require or expect from the system?

B.3 Requirements specification

Defining the requirements in detail

B.4 Requirements validation

Checking the validity of the requirements

2.4.2Software design and implementation

The process of converting the system specification into an executable system.

A.1 Software design

Design a software structure that realises the specification;

A.2 Implementation

Translate this structure into an executable program; The activities of design and implementation are closely related and may be inter-leaved.

A.3 A general model of the design process

A.4 Design activities

B.1 Architectural design,

where you identify the overall structure of the system, the principal components (sometimes called sub-systems or modules), their relationships and how they are distributed.

B.2 Interface design,

where you define the interfaces between system components.

B.3 Component design,

where you take each system component and design how it will operate.

B.4 Database design, where you design the system data structures and how these are

to be represented in a database.

2.4.3Software validation

  1. Verification and validation (V & V) is intended to show that a system conforms to its specification and meets the requirements of the system customer.
  2. Involves checking and review processes and system testing.
  3. System testing involves executing the system with test cases that are derived from the specification of the real data to be processed by the system.
  4. Testing is the most commonly used V & V activity.

A.1 Testing stages

B.1 Development or component testing

Individual components are tested independently; Components may be functions or objects or coherent groupings of these entities.

  1. Improved maintainability.
  2. Reduced development effort.

A.3 The process of prototype development

A.4 Prototype development

B.1 Introduction
C.1 May be based on rapid prototyping languages or tools
C.2 May involve leaving out functionality
  1. Prototype should focus on areas of the product that are not well-understood;
  2. Error checking and recovery may not be included in the prototype;
  3. Focus on functional rather than non-functional requirements such as reliability and security
B.2 Throw-away prototypes
C.1 Prototypes should be discarded after development as they are not a good basis
for a production system:
  1. It may be impossible to tune the system to meet non-functional requirements;
  2. Prototypes are normally undocumented;
  3. The prototype structure is usually degraded through rapid change;
  4. The prototype probably will not meet normal organisational quality standards.

2.5.3Incremental delivery

  1. Rather than deliver the system as a single delivery, the development and delivery is broken down into increments with each increment delivering part of the required functionality.
  2. User requirements are prioritised and the highest priority requirements are included in early increments.
  3. Once the development of an increment is started, the requirements are frozen though requirements for later increments can continue to evolve.
B.1 Incremental delivery advantages
  1. Customer value can be delivered with each increment so system functionality is available earlier.
  2. Early increments act as a prototype to help elicit requirements for later increments.
  3. Lower risk of overall project failure.
  4. The highest priority system services tend to receive the most testing.
B.2 Incremental delivery problems
C.1 Most systems require a set of basic facilities that are used by different parts of
the system.

As requirements are not defined in detail until an increment is to be implemented, it can be hard to identify common facilities that are needed by all increments.

C.2 The essence of iterative processes is that the specification is developed in
conjunction with the software.

However, this conflicts with the procurement model of many organizations, where the complete system specification is part of the system development contract.

2.5.4Boehm’s spiral model

A.1 Concept

  1. Process is represented as a spiral rather than as a sequence of activities with backtracking.
  2. Each loop in the spiral represents a phase in the process.
  3. No fixed phases such as specification or design - loops in the spiral are chosen depending on what is required.
  4. Risks are explicitly assessed and resolved throughout the process.

A.2 Spiral model sectors

B.1 Objective setting

Specific objectives for the phase are identified. Prototype 2 Prototype 3 protoype

  1. Requirements specification
  2. Requirements engineering processes
  3. Requirements elicitation and analysis
  4. Requirements validation
  5. Requirements management

3.2Requirements engineering

3.2.1What is a requirement?

B.1 It may range from a high-level abstract statement of a service or of a system
constraint to a detailed mathematical functional specification
B.2 This is inevitable as requirements may serve a dual function

May be the basis for a bid for a contract - therefore must be open to interpretation May be the basis for the contract itself - therefore must be defined in detail Both these statements may be called requirements

3.2.2Requirements engineering

The process of establishing the services that the customer requires from a system and the constraints under which it operates and is developed The requirements themselves are the descriptions of the system services and constraints that are generated during the requirements engineering process

3.2.3Types of requirement

B.1 User requirements

Statements in natural language plus diagrams of the services the system provides and its operational constraints. Written for customers

B.2 System requirements

A structured document setting out detailed descriptions of the system services. Written as acontract between client and contractor

3.2.4Functional and non-functional requirements

A.1 Functional requirements

Statements of services the system should provide, how the system should react to particular inputs and how the system should behave in particular situations.

B.1 Examples of functional requirements

The user shall be able to search either all of the initial set of databases or select a subset from it. The system shall provide appropriate viewers for the user to read documents in the document store. Every order shall be allocated a unique identifier (ORDER_ID) which the user shall be able to copy to the account’s permanent storage area.

A.2 Non-functional requirements

constraints on the services or functions offered by the system such as timing constraints,

constraints on the development process, standards, etc. B.1 Non-functional classifications
C.1 Product requirements

Requirements which specify that the delivered product must behave in a particular way e.g. execution speed, reliability, etc.

C.2 Organisational requirements

Requirements which are a consequence of organisational policies and procedures e.g. process standards used, implementation requirements, etc.

C.3 External requirements

Requirements which arise from factors which are external to the system and its development process e.g. interoperability requirements, legislative requirements, etc.

B.2 Non-functional requirements examples
C.1 Product requirement

4.C.8 It shall be possible for all necessary communication between the APSE(Ada Programming Support Environment) and the user to be expressed in the standard Ada character set

C.2 Organisational requirement

9.3.2 The system development process and deliverable documents shall conform to the process and deliverables defined in XYZCo-SP-STAN- 95

C.3 External requirement

7.6.5 The system shall not disclose any personal information about customers apart from their name and reference number to the operators of the system

B.3 Requirements measures

Example: Experienced controllers shall be able to use all the system functions after a total of two hours training. After this training, the average number of errors made by experienced users shall not exceed two per day.