COMPUTER SCIENCE: YOU MUST KNOW THE SOFTWARE DEVELOPMENT PHASE

 SOFTWARE DEVELOPMENT PHASE

Software engineers break the software development process into the following 4 phases:

  • Analysis
  • Design 
  • Implementation
  • Testing and Debungging


ANALYSIS

It is very important to analyse a problem first.  This can be achieved by first understanding the problem requirements.  Requirements include whether the program requires interaction with the user, whether it manipulates data, whether it produces output and what the output looks like.

Scenario: 

Let's say you decided to develop a program to make automated teller machine (ATM) operational.

Analysis: Determine the functionality of the machine.  This includes the necessary operations performed by the machine - withdraw money, deposit money, transfer money, check account balance and etc...

During this phase, it is advisable to speak with potential customers who would like to use the machine.  It is important to also make the machine user-friendly.

Important....

If the program manipulates data, the programmer must know what the data is and how it is represented by looking at the sample data. Example: If the program produces output, you must know how the results should be generated and formatted.

If the problem is complex, divide the problem into subproblems, analyze each subproblem and understand each subproblem requirements.

DESIGN

Once you have analyzed the problem, the next thing is to design the algorithm to solve the problem.  

*** If you did break the problems into subproblems, you need to design an algorithm for each subproblem.

Algorithm: A step by step problem solving process in which a solution is arrived at in a finite amount of time.

STRUCTURED DESIGN

Dividing a problem into smaller subproblem is called structured design.  The structured design approach is also known as top-down design, stepwise refinement and modular programming.

In structured design,  the problem is divided into smaller problems.  Each subproblem is analyzed and a solution is obtained to solve the subproblem.  This process of implementing a structured design is called structured programming.

Object Oriented Design

In object Oriented Design (OOD), the first step in the problem solving process is to identify the components called objects, which form the basis of the solution & determine how these objects interact with each other.  

Scenario: 

Suppose you want to write a program that automates video rental process for a local video store.  The two main objects in this problem are the video and the customer.

Once the objects are identified, the next thing you can do is to specify for each object the relevant data & possible operations to be performed on that data.

Example: 

Object: VIDEO

Data: Movie name, starring actors, producer, production company, number of copies in stock...

Operations: Checking the name of the movie, reducing the number of copies in stock by one after a copy is rented, incrementing the number of copies in stock after the customer returns the particular video.

***Remember: Each Object consists of data and operations.  The Object combines data and operations into a single unit.

In OOD, the final program is a collection of interacting objects.  The programming language that implements OOD is Object Oriented Programming.

OOD has 3 basic principles: 

Encapsulation - The ability to combine data and operations in a single unit.

Inheritance - The ability to create new data types from existing data types

Polymorphism - The ability to use the same expression to denote different operations.


*** In C++, encapsulation is accomplished through the use of data types called classes.  How Classes are Implemented?


IMPLEMENTATION

In the implementation phase,  it is important to write and compile programming code to implement the classes and functions that were discovered in the design phase.

TESTING & DEBUGGING

The term testing refers to testing the correctness of the program: making sure that the program does what is it supposed to do.  

The term debugging refers to finding and fixing errors, if they exist.

*Once a function and/or an algorithm is written, he next step is to verify that it works properly.  It is very obvious that in a large or complex program, errors almost certainly exist.

There are two types of TESTING:

Black-box testing: You do not know the internal working of the algorithm or function.  You only know what the function does. Ex: faulty photostat machine

White-box testing: Relies on the internal structure and implementation of a function or algorithm.



Comments

Popular posts from this blog

COMPUTER SCIENCE: YOU NEED TO KNOW DATA STRUCTURE...EXPLAINED

THE Big-O Notation & TIME COMPLEXITY.... Algorithm Analysis