1. Trang chủ
  2. » Công Nghệ Thông Tin

OOP 01

41 141 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 41
Dung lượng 509,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

FactorsCorrectness • Correctness is the ability of software products to perform their exact tasks, as defined by their specification.. Software QualityExtendibility • Extendibility is th

Trang 1

CHAPTER 1

Software Quality

Trang 2

Contents

Trang 3

and that, instead, programming is just a tool

of a computer scientist

taught the advantages and disadvantages of the different ways to write programs to solve the same problem

Trang 4

module that is supposed to maintain a

collection of people and the dogs they own

– Should the collection be a hash table or an array

or some other kind of collection?

– Should the collection contain Person objects or

maybe Person-Dog pairs of objects?

– Should a Dog object have an instance variable

Trang 5

– Should owners have an instance variable that

refers to a collection of the dogs they own? If so, what kind of collection should it be? What other data should the Person object store?

– Should you keep the collection of people sorted for easier lookup?

– If a person’s only dog dies, should that person be removed from the collection or left in as a person who owns no dogs?

Trang 6

methods and one with many, both solve a

problem, does it matter which one you use?

computation, does it matter which one you

use?

matter that one is faster than the other

Trang 7

also what makes some software “ugly” and

other software “elegant” or “beautiful.”

designs and code

Trang 8

Why Worry?

some code without considering design criteria might justify his actions by saying that he

knows what is going on in the code and so

there is no need to worry about a

misinterpretation

programs written by one person and used only once, the programmer is correct

Trang 9

Why worry?

that the programmer thought of as

“throwaway” is often not thrown away In

such cases, time devoted to make the design elegant would be time productively spent

long-term, heavy use requires a considerable

investment of time and energy

Trang 10

Why worry?

programmers are involved, it is even more

important to spend a significant amount of

time on the analysis of the problem and the design of the solution

change by one programmer in one line of

code could easily introduce bugs in the code written by other programmers

Trang 11

Why worry?

very minor to disastrous

have occurred over the years, some

catastrophic, some financially devastating, and others merely annoying:

Trang 12

Why worry?

– In I962, the Mariner I spacecraft lifted off for its voyage to Venus but was destroyed by the people running the mission because, due to a bug in the ground-based computer system.

– Between 1985 and 1988, there were six cases of patients being given massive overdoses of

radiation from a Therac25 radiation therapy

system Part of the blame is due to an error in the control software for the system.

Trang 13

Why worry?

– In 1990, a bug in some new software that had

been installed by AT&T in 114 electronic switching systems caused a 9-hour nationwide blockage,

affecting an estimated 5 million calls The bug was caused by the mistaken use of a break statement inside a switch statement in a C program.

– In 1993, a bug in the SunSoft operating system I/O library held up a $20 million sale The problem

was traced to a statement that read x == 2 instead

of x = 2 in a C program.

Trang 14

Why Worry?

launched by the European Space Agency

exploded just forty seconds after its lift-off

from Kourou, French Guiana It turned out

that the cause of the failure was a software

error in the inertial reference system

Trang 15

Why Worry?

Arianne Rocket Failure

Trang 16

Why worry?

– For a more recent example, it was reported in the online Guardian newspaper on January 16, 2003, that a software upgrade to improve security for cash machines had a flaw that allowed anyone to withdraw any amount of cash they liked using any password they wanted About £850,000 were

withdrawn before the problem was corrected.

Trang 17

Why worry?

According to a National Institute of Standards report in 2002, software bugs cost the U.S

economy $58 billion annually

Trang 19

Software Quality – Ext Factors

Correctness

• Correctness is the ability of software products

to perform their exact tasks, as defined by

their specification

– Correctness is the prime quality If a system does not do what it is supposed to do, everything else about it — whether it is fast, has a nice user

interface… — matters little.

Trang 20

Software Quality

Trang 21

Software Quality

Robustness

• Robustness is the ability of software systems

to react appropriately to abnormal conditions

Trang 22

Software Quality

Extendibility

• Extendibility is the ease of adapting software products to changes of specification

– Design simplicity: a simple architecture will always

be easier to adapt to changes than a complex one – Decentralization: the more autonomous the

modules, the higher the likelihood that a simple change will affect just one module, or a small

number of modules, rather than triggering off a

Trang 23

Software Quality

Reusability

• Reusability is the ability of software elements

to serve for the construction of many different applications

– The need for reusability comes from the

observation that software systems often follow

similar patterns

– Reusability has an influence on all other aspects of software quality.

Trang 24

Software Quality

Compatibility

• Compatibility is the ease of combining

software elements with others

– Compatibility is important because we do not

develop software elements in a vacuum: they

need to interact with each other.

– Lack of compatibility can yield disaster.

Trang 25

Software Quality

design, and in agreeing on standardized

conventions for inter-program communication Approaches include:

– Standardized file formats.

– Standardized data structures.

– Standardized user interfaces.

Trang 26

Software Quality

Efficiency

• Efficiency is the ability of a software system to

hardware resources, such as processor time, space occupied in internal and external

memories, bandwidth used in communication devices

word “performance”

Trang 27

Software Quality

attitudes towards efficiency:

– Some developers have an obsession with

performance issues, leading them to devote a lot

of efforts to presumed optimizations.

– But a general tendency also exists to downplay

efficiency concerns, as evidenced by such industry lore as “make it right before you make it fast” and

“next year’s computer model is going to be 50% faster anyway”.

Trang 28

physical hardware but more generally of the hardware-software machine.

Trang 29

Software Quality

Ease of use

• Ease of use is the ease with which people of various backgrounds and qualifications can

learn to use software products and apply

them to solve problems It also covers the

ease of installation, operation and monitoring

– User Interface Design principle: Do not pretend

you know the user; you don’t.

Trang 31

Software Quality

Timeliness

• Timeliness is the ability of a software system

it

Trang 32

Software Quality

• Other qualities

– Verifiability is the ease of preparing acceptance procedures, especially test data, and procedures for detecting failures and tracing them to errors during the validation and operation phases

– Integrity is the ability of software systems to

protect their various components (programs,

data) against unauthorized access and

modification.

Trang 33

Software Quality

• Other qualities

– Repairability is the ability to facilitate the repair of defects.

– Economy , the companion of timeliness, is the

ability of a system to be completed on or below its assigned budget.

Trang 34

Software Quality

• Documentation: The need for documentation

is a consequence of the other quality factors seen above

– External documentation

– Internal documentation

– Module interface documentation

Trang 35

Software Quality

– The need for external documentation, is a

consequence of the definition of ease of use.

– The need for internal documentation, is a

consequence of the extendibility requirement

– The need for module interface documentation, is

a consequence of the reusability requirement

extendibility

Trang 36

Software Quality

Four stand out qualities:

• Correctness and robustness: it is still too

difficult to produce software without defects (bugs), and too hard to correct the defects

once they are there

• Extendibility and reusability: software should

be easier to change; the software elements

we produce should be more generally

applicable

Trang 37

Software Quality – Int Factors

• Scalability—is the ability of a software to

perform correctly and efficiently when the

problems grow in size by several orders of

magnitude

• Readability—is the ease for another

programmer to read and understand the

design and code?

• Simplicity—the design and/or the

implementation is unnecessarily complex

Trang 38

repeated usage, and thus need not be

“maintained” the way a car or a TV set does

Trang 39

SOFTWARE MAINTENANCE

Trang 40

ways of building quality software.

• Rather than a single factor, quality in software is best viewed as a tradeoff between a set of

different goals

should be distinguished from internal factors,

perceptible to designers and implementors.

Trang 41

robustness , together with reliability , and the

factors requiring more decentralized software

architectures: reusability and extendibility ,

portion of software costs, is penalized by the

difficulty of implementing changes in software

products, and by the over-dependence of

programs on the physical structure of the data

they manipulate.

Ngày đăng: 01/12/2017, 23:59

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w