Barron’s chapter 5 Software development life cycle

Post on 07-Jan-2016

40 views 0 download

Tags:

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

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

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

Glucose meter• a medical device for determining the

approximate concentration of glucose in the blood.

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

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

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?

• 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

• P210, Q3 – top down

• P216, Q18 – bottom up???

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

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

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?

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?

• 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?

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.