Carrano CH 1
Carrano CH 1
A solution is good if: The total cost it incurs over all phases of its life cycle is minimal The cost of a solution includes: Computer resources that the program consumes Difficulties encountered by users Consequences of a program that does not behave correctly Programs must be well structured and
task. In procedural programming, Modules are made up of one or more functions. Large Modules may contain Sub-Modules.
header of the function that you call to start the module. Internal Components are the sub-modules/functions that do the task the module is designed to do.
Cohesion
A highly cohesive
Coupling
Modules with low
module performs one well-defined task Leads to modular solutions Reduces Coupling
coupling are independent of one another Modules shouldnt affect other modules when changed. Low coupling increases Cohesion.
1.
2.
3. 4. 5. 6. 7.
Constructing programs Debugging programs Reading programs Modifying programs Eliminating redundant code Reuse of code
Programming Style can enhance code with: 1. Use of private data members 2. Proper use of reference arguments 3. Proper use of functions 4. Avoidance of global variables in modules 5. Error handling 6. Readability 7. Documentation
prompt the user for input in a clear manner A program should always echo its input The output should be well labeled and easy to read
Levels Unit testing: Test functions, then modules Integration testing: Test interactions among modules System testing: Test entire program Acceptance testing: Show that system complies with requirements
Waterfall Method.
Analysis Design
Implementation
Testing Deployment
each preceding stage to be complete before progressing to the next stage. In practice, this leads to inflexibility and a constant state of incompleteness.
complete solution is achieved Each iteration cycles through analysis, design, implementation, testing, and integration of a small portion of the problem domain Early iterations create the core of the system; further iterations build on that core
functional and completely tested Each iteration makes relatively few changes to the previous iteration End users can provide feedback at the end of each iteration
One specific iterative method is the Rational Unified Process (RUP)
(functions that operate on the data set) Classes are combined and caused to interact to create solutions.
Attributes (characteristics) of objects of a single type Typically data Called data members Behaviors (operations) Typically operate on the data Called methods or member functions
Objects:
Inheritance Classes can inherit properties from other classes Existing classes can be reused Polymorphism Objects can determine appropriate operations at execution time