Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Application of Software Development Process
The following gives you an example on how to complete a software project by
following the Software Development Process (SDP) step by step. This is also what you
should follow to write up your assignment reports.
Example: (for each assignment, you will be given an assignment sheet similar to this)
Write a C program which takes a depth into the earth, given in units of kilometers, as the
input data and compute and display the corresponding temperature at this particular depth
in two formats, namely, degrees Celsius and degrees Fahrenheit. The relevant formulas
are given as follows:
Temperature in degrees Celsius given the depth in kilometers:
Celsius = 10 * depth + 20
Temperature in degrees Fahrenheit is obtained by converting temperature in degrees
Celsius:
Fahrenheit = 9/5 * Celsius + 32
Software Development Process
1) Problem statement:
In this part, your job is to fully understand the requirements of this project, as proposed by
the user of this software (your customer) so that all the functionalities this software needs
to provide are clearly understood and stated. Given the above example, you may list all the
functionalities this program should offer as follows:
1) Provide an interface through which the user can input a number which is a real number
and represents a legal depth in kilometers.
2) The execution of the program will be terminated if an illegal input is detected. Being
illegal may be defined as follows:
The input depth is out of the legal range (if we know the legal range and, here, it
is left out of our considerations for simplicity).
The input contains non-numerical characters.
3) The program should display two outputs: degrees Celsius and degrees Fahrenheit.
These two temperatures should have an accuracy of 2 digits after the decimal point
(Note: the original statement did not specify this, common sense is applied by the
programmer and agreed with the customer following production of the problem
statement).
4) The program exits.
2) Analysis
In this part, your job is to analyze all the requirements listed in above section to decide the
entire software architecture and chose the best data structure as well as the most suitable
algorithm.
For the example at hand, it is clear that we need to deal with the Input/Output and turn the
mathematical equations into C codes.
On an input:
Firstly, a message needs to be printed on the screen to let the users know what
data/action this program expects. Because the execution is terminated upon the
detection of an illegal input, we can specify the desired data type in the c code used to
read the input off the keyboard.
On Outputs:
Given a legal input, two temperatures can be easily calculated and printed on the
screen along with an explanatory message.
Data structure:
Only single data is involved. So there are no complex data structure issues here.
Algorithm:
Evaluating the above two equations is straight forward. So there are no algorithm
issues here either.
3) Design
In this part, you need to give a relatively detailed procedure, on which the implementation
of the code can be based. In this example, a very detailed design is given just because this
example is extremely simple. In the future, as the complexity of the assignments goes up
significantly, you can give an overview on your entire software architecture just by using
a flow chart or other means instead of giving a detailed design description like this.
1. Declare three variables of type “float” and name them appropriately e.g. depth, celsius
and fahrenheit, respectively:
depth – to store and represent the input depth in kilometers.
celsius - to store and represent the temperature in degrees Celsius.
fahrenheit - to store and represent the temperature in degrees Fahrenheit.
2. Print a message on the screen to ask the user to input a real number representing the
depth in kilometers.
3. Read the input real number from the keyboard and assign this value to the variable
named depth.