comp 245 data structures software engineering. what is software engineering? most students obtain...

10
Comp 245 Data Structures Software Engineering

Upload: logan-mcdonald

Post on 11-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

Comp 245Data Structures

Software

Engineering

Page 2: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

What is Software Engineering?

Most students obtain the problem and immediately start coding the solution.

What if you are faced with a problem that will require a “large” coding solution?

Usually requires a team and an organized plan of attack.

A branch of computer science called SOFTWARE ENGINNEERING exists which provides techniques and methodologies for the construction of computer programs.

Page 3: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

What is the purpose of a Computer Program?

To SOLVE A PROBLEM! There are usually two parts to a program

1. An algorithm2. Data (how do you store and manipulate the data?)

What makes a good program?1. Meets it’s specifications2. Cost is minimal over the course of its life cycle3. Efficient4. Maintenance friendly5. Reliable

Page 4: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

The Software Life Cycle

The development of good software involves a lengthy and continual process called the software life cycle.

Specification – WHAT is the software to do? Design – HOW will it be done? Coding – includes syntax debugging Testing – purpose is to find errors; it is not to prove

your code works Refinement – fix errors in logic (recode, retest) Production – people start using it Maintenance – fixing errors and enhancing

Page 5: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

RUP – Rational Unified Process

Solution is developed incrementally! An iterative solution – timeboxes. Phases:

Inception – feasibility, time and cost estimates Elaboration – more specific, determine

iterations, core architecture Construction – iterative development Transition – testing and deployment of system,

beta testing More complete information

Page 6: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

Software Engineering ConceptAchieving a Modular Design

Consider a “sort” function; if you did not write the function – you only know WHAT it does – not HOW it is done! We know its purpose not its implementation. “Abstraction” is the separation of purpose from implementation.

The sort function example is an example of functional abstraction. In the beginning, we are always concerned more with WHAT we want to do; not HOW we are going to do it.

Page 7: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

Software Engineering ConceptAchieving a Modular Design

There is also data abstraction. This is what this course is concerned with. A program has data; WHAT do does the program need to do with the data?

We will develop ADT’s in this class – Abstract Data Type (abstract: existing in thought or as an idea but not having a physical or concrete existence)

This is the combination of data and the operations that surround the data – the operations obviously are WHAT we want to do with the data.

An ADT is a way to modularize our code!

Page 8: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

Key Issues in Programming

Modularity Helps in program construction; facilitates a team

of programmers in development Easier to isolate and fix errors Easier for someone else to read your code Eliminates redundant code

Modifiability Use Functions – just “plug” in Constants Typedef statements (C++)

example: typedef int value;

Page 9: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

Key Issues in Programming

Ease of use if program is interactive Style

Use Functions Use private data members Avoiding global variables if possible Know when to use value and reference

parameters (input to / output from a function) Error handling (return a value or throw

exception) Write readable code (descriptive identifiers,

consistency, identation, blank lines, etc…)

Page 10: Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution

Key Issues in Programming

Documentation It is to help you! In a professional setting; it is to help

those who must maintain your code. Debugging

Syntax errors (language proficient) Logic errors (DESIGN!!)