CMSC 1041 Algorithms II Software Development Life-Cycle.
Transcript of CMSC 1041 Algorithms II Software Development Life-Cycle.
![Page 1: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/1.jpg)
CMSC 104 1
Algorithms II
Software Development
Life-Cycle
![Page 2: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/2.jpg)
CMSC 104 2
Problem Solving
• Problem solving is the process of transforming the description of a problem into the solution of that problem by using our knowledge of the problem domain and by relying on our ability to select and use appropriate problem-solving strategies, techniques, and tools.
![Page 3: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/3.jpg)
CMSC 104 3
Why Use Computers
• Use a computer to solve a problem if:– It has extensive input.– It has extensive output.– Its method of solution is too complicated to
implement manually.– If done manually, it takes an excessively
long time to solve.– We expect to use the same method often.
![Page 4: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/4.jpg)
CMSC 104 4
Software Development Life Cycle
• Requirements specification• Analysis• Design• Implementation• Testing and verification• Documentation• Maintenance and Enhancement
![Page 5: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/5.jpg)
CMSC 104 5
The Problem - QuikTax
The phone rings one day and we get an offer from QuikTax, a local federal income tax preparation service to
“Develop a computer program to compute income tax from tax schedules for the tax year 1999.”
![Page 6: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/6.jpg)
CMSC 104 6
Requirements Specifications
• One of the most important steps in problem solving is understanding exactly what the problem is, what is needed to solve it, what the solution should provide, and if there are constraints and special conditions.
• In this step you eliminate ambiguities in the problem statement.
![Page 7: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/7.jpg)
CMSC 104 7
Analysis
• In this phase we identify:
– Inputs to the problem and their form
– Outputs expected from the solution and their form
– Special Constraints
– Assumptions
– Formulas
![Page 8: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/8.jpg)
CMSC 104 8
Inputs
• What items must be provided to be able to get a solution?
– Taxable income$0.00 to $1,000,000,000.00
– Filing statusSingle, Married/Jointly, Married/Separate, Head of household
– Number of dependents0 - 99
![Page 9: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/9.jpg)
CMSC 104 9
Output
• Intermediate results• Final results
– Completed tax information
![Page 10: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/10.jpg)
CMSC 104 10
Constraints
• What are the limits on the data?– Income can not be a negative number.– Number of dependents must be zero
or positive, but not more than what number ?
– Filing status must be one of a set of values
![Page 11: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/11.jpg)
CMSC 104 11
Assumptions
Problem deals in $US Only for 1999 What’s implied by the Requirements?
![Page 12: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/12.jpg)
CMSC 104 12
Formulas
• For income tax, it is the tax tables.• For determining the area, it is
length x width• For grades, it is:
>90.0% A
80.0% - 89.99% B
70.0% - 79.99% C
60.0% - 69.99% D
>60.0% F
![Page 13: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/13.jpg)
CMSC 104 13
Design
• Develop a series of steps with a logical order which, when applied to the input would produce the specified output. (does this sound like an ALGORITHM?)
• This phase is when you think about how to solve the problem!!
• This phase can take forty per cent of the effort.
![Page 14: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/14.jpg)
CMSC 104 14
Implementation
• Implementation is the phase where the design is transformed into code.
• This is the only portion of the process that is computer and compiler specific.
• This should be approximately ten per cent of the effort.
![Page 15: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/15.jpg)
CMSC 104 15
Implementation Errors
• Design errors• Syntax errors• Run-time errors
![Page 16: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/16.jpg)
CMSC 104 16
Testing and Verification
• Once the code is developed:– Prove the program produces correct
results.– Prove that the program that was built
solves the problem that was described in the requirements specification.
• Manually solve the problem with a data set, then compare that to the program’s output!
![Page 17: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/17.jpg)
CMSC 104 17
Documentation
• Consists of– A concise requirements specification– Description of inputs, outputs, constraints, and
formulas used– Pseudocode or flowchart of the algorithm– Source code listing– Hard copy of a sample of data and the output– User’s guide explaining how to use the
program
![Page 18: CMSC 1041 Algorithms II Software Development Life-Cycle.](https://reader036.fdocuments.us/reader036/viewer/2022082611/56649efa5503460f94c0c095/html5/thumbnails/18.jpg)
CMSC 104 18
Maintenance and Enhancement
• Environments change, so programs must be changed
– Tax tables change
– Name of organization changes• Users want (or need) the program to do
more
– New tax credits
– Elimination of old tax credits.