0% found this document useful (0 votes)
49 views21 pages

Carrano CH 1

This document discusses software engineering and object-oriented design principles. It covers key topics like modules, programming issues, development methods, and object-oriented principles. The main points are that modules should have high cohesion and low coupling, iterative development methods are better than waterfall, and the object-oriented approach uses classes and objects to encapsulate data and behavior.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views21 pages

Carrano CH 1

This document discusses software engineering and object-oriented design principles. It covers key topics like modules, programming issues, development methods, and object-oriented principles. The main points are that modules should have high cohesion and low coupling, iterative development methods are better than waterfall, and the object-oriented approach uses classes and objects to encapsulate data and behavior.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Software Engineering and Object-Oriented Design Topics:

Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles

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

documented Efficiency is one aspect of a solutions cost

A Module is a part of a program that accomplishes a

task. In procedural programming, Modules are made up of one or more functions. Large Modules may contain Sub-Modules.

Modules have two primary components: an Interface

and Internal Components.


In procedural programming, a modules interface is just

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.

Modularity Style Modifiability Ease of Use Fail-safe programming Debugging Testing

Modularity has a favorable impact on


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

Modifiability is easier through the use of


Named constants
The typedef statement

The easier a program is to use, the more impressed

users will be with it.


In an interactive environment, the program should

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

Fail-safe programs will perform reasonably no matter

how anyone uses them


Test for invalid input data and program logic errors Check invariants Enforce preconditions

Check argument values

Programmers must systematically check a programs

logic to find and correct errors Tools to use while debugging:


Single-stepping Watches Breakpoints cout statements Dump functions

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

One simple but somewhat outdated method is the

Waterfall Method.
Analysis Design

Implementation
Testing Deployment

Though it can be used modularly, this design method requires

each preceding stage to be complete before progressing to the next stage. In practice, this leads to inflexibility and a constant state of incompleteness.

Newer methods are iterative.


Many short, fixed-length iterations Each iteration builds on the previous iteration until a

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

Features of Iterative methods:


The partial system at the end of each iteration should be

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)

The most modern approach to designing modules is

the Object-Oriented approach.


Instead of creating groups of functions, create classes. Classes are combinations of data sets and methods

(functions that operate on the data set) Classes are combined and caused to interact to create solutions.

Object-oriented languages enable us to build classes

that can be used to instantiate (create) objects A class combines

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

An object is an instance of a class.


Class:

Objects:

Three principles of object-oriented programming Encapsulation


Objects combine data and operations Hides inner details

Inheritance Classes can inherit properties from other classes Existing classes can be reused Polymorphism Objects can determine appropriate operations at execution time

Object-Oriented Analysis (OOA)


Coming up with the classes that can be used to define

the problem. Emphasis on what a solution must do.


Object-Oriented Design (OOD)
Understanding how the classes can interact and what

they can do alone or together.

UML (Unified Modeling Language) is very often used

in OOA/D to define classes and their interactions.


A UML class definition: A UML interaction diagram:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy