Barron’s chapter 5 Software development life cycle

16
Barron’s chapter 5 Software development life cycle

description

Barron’s chapter 5 Software development life cycle. Software development life cycle. The waterfall model. Analysis of the specification. Program Design. Implementation. Testing & debugging. Maintenance. Program specification. - PowerPoint PPT Presentation

Transcript of Barron’s chapter 5 Software development life cycle

Page 1: Barron’s chapter 5  Software development life cycle

Barron’s chapter 5 Software development life cycle

Page 2: Barron’s chapter 5  Software development life cycle

Software development life cycle• The waterfall model

Analysis of the specification

Program Design

Implementation

Testing & debugging

Maintenance

Page 3: Barron’s chapter 5  Software development life cycle
Page 4: Barron’s chapter 5  Software development life cycle

Program specification

• The specification is a written description of the project. Typically it is based on a customer’s requirement.

Page 5: Barron’s chapter 5  Software development life cycle

Glucose meter• a medical device for determining the

approximate concentration of glucose in the blood.

Page 6: Barron’s chapter 5  Software development life cycle

What would be a specification for the glucose meter?

Hardware specification: weight – 0.2lbs(75g) dimension – 3.6 in x 2.3 in x0.9 in

data storage- 400 measurementsCPU - ..

Software specification:GUI – menulanguage – 26 different languageshow to conduct measurement…response time – 6 seconds

Page 7: Barron’s chapter 5  Software development life cycle

Program design• The design is a detailed plan for solving the

problem outlined in the specification.• Ex. User menu-

Main Menu

Perform a measurement

Past data

Tools

Turn off

Page 8: Barron’s chapter 5  Software development life cycle

Program implementation• The coding phase.• Based on the specification, use the operating

system, programming language and network specified and actually produce the menu functions.

• P210, Q1- if there is no specification for something you need to implement, as a programmer, what do you do?

Page 9: Barron’s chapter 5  Software development life cycle

• Bottom-Up DevelopmentThe independent classes are implemented and

tested before incorporated into the overall project, then classes that depend on just one other class are implemented and tested, and so on. Finally all classes are linked together to form the whole system

• Top-down DevelopmentAn overview of the system is formulated, specifying b

ut not detailing any first-level subsystems. Each subsystem is then refined in yet greater detail, sometimes in many additional subsystem levels, until the entire specification is reduced to base elements

Page 10: Barron’s chapter 5  Software development life cycle

• P210, Q3 – top down

• P216, Q18 – bottom up???

Page 11: Barron’s chapter 5  Software development life cycle

Testing and debugging• Not every possible input value can be tested,

so selecting a representative set of test data is important.

• Typical values• Endpoint values• Out of range values• If only positive input is required, test data

should include a negative value • Ex: a normal glucose level 50 -140• P211, Q7

Page 12: Barron’s chapter 5  Software development life cycle

Program maintenanceThis phase involves upgrading the code as circumstances change. New features may be added…So clear and precise documentation is a must.

Page 13: Barron’s chapter 5  Software development life cycle

Stub method• A stub is a dummy method that stands in for a

method until the actual method has been written and tested.

• Take the glucose meter as an example. What would a stub for it?

Page 14: Barron’s chapter 5  Software development life cycle

Assertion• An assertion is a precise statement about a program at

any given point. If an assertion is proved to be true, then the program is working correctly at that point.

p214, Q13int prev = 1, next = 1, sum =1;for(int i = 3; i <= n; i++){ sum = next + prev;

prev = next;next = sum

}return sum; }

What is a correct assertion about loop variable?

Page 15: Barron’s chapter 5  Software development life cycle

• Efficiency An efficient algorithm is one that is economical in the use of

1) CPU time2) Memory

• 3 cases- best case, worst case, average case If the algorithm used to search a list is starting at the beginning of the list…what would be the best case, worst case and average case?

Page 16: Barron’s chapter 5  Software development life cycle

Homework

• Quiz on Thursday. Study Barron’s Chapter 4-6 including all the questions handout and AP Sample test on the back of each chapters.

• The first period of Thursday review the questions with your partners, second period quiz.