Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: DATA STRUCTURES USING C++
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
DATA STRUCTURES USING C++

[attachment=49826]

Software Life Cycle

A program goes through many phases from the time it is first conceived until the time it is
retired, called the life cycle of the program. The three fundamental stages through which a
program goes are development, use, and maintenance. Usually a program is initially conceived
by a software developer because a customer has some problem that needs to be solved and
the customer is willing to pay money to have it solved. The new program is created in the
software development stage. The next section describes this stage in some detail.
Once the program is considered complete, it is released for the user to use. Once users
start using the program, they most certainly discover problems or have suggestions to
improve it. The problems and/or ideas for improvements are conveyed to the software
developer, and the program goes through the maintenance phase.

Analysis

Analyzing the problem is the first and most important step. This step requires you to do
the following:
• Thoroughly understand the problem.
• Understand the problem requirements. Requirements can include whether
the program requires interaction with the user, whether it manipulates
data, whether it produces output, and what the output looks like.
Suppose that you need to develop a program to make an automated teller
machine (ATM) operational. In the analysis phase, you determine the
functionality of the machine. Here, you determine the necessary operations
performed by the machine, such as withdraw money, deposit
money, transfer money, check account balance, and so on. During this
phase, you also talk to potential customers who would use the machine.
To make it user-friendly, you must understand their requirements and
add any necessary operations.
If the program manipulates data, the programmer must know what the
data is and how it is represented. That is, you need to look at sample data.
If the program produces output, you should 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’s requirements.

STRUCTURED DESIGN

Dividing a problem into smaller subproblems 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 then analyzed, and a solution is obtained to solve the subproblem.
The solutions of all the subproblems are then combined to solve the overall problem.
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, and
determine how these objects interact with one another. For example, suppose you want
to write a program that automates the video rental process for a local video store. The
two main objects in this problem are the video and the customer.
After identifying the objects, the next step is to specify for each object the relevant data
and possible operations to be performed on that data. For example, for a video object, the
data might include the movie name, starring actors, producer, production company,
number of copies in stock, and so on. Some of the operations on a video object might
include checking the name of the movie, reducing the number of copies in stock by one
after a copy is rented, and incrementing the number of copies in stock by one after a
customer returns a particular video.

Algorithm Analysis: The Big-O Notation

Just as a problem is analyzed before writing the algorithm and the computer program,
after an algorithm is designed it should also be analyzed. Usually, there are various ways to
design a particular algorithm. Certain algorithms take very little computer time to
execute, whereas others take a considerable amount of time.