Double Check Feasibility Of Implementing The Program

Print   

02 Nov 2017

Disclaimer:
This essay has been written and submitted by students and is not an example of our work. Please click this link to view samples of our professional work witten by our professional essay writers. Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of EssayCompany.

Knowing the objective is the first consideration and who will be the end user is also important. Determining the inputs and outputs is next. How will the program operate and what data is needed to make it happen. After this has been decided feasibility is the next consideration. How many programmers will it take to create a project within budget, does the project have realistic outline. Finally, if the project goes well, then one must take measures to ensure the project is properly documented and analysed.

i) Program objectives

Objectives are the problems you are trying to solve.

You need to make a clear statement of the problem you are trying to solve with this program.

ii) Desired output

It’s best to start with the outputs BEFORE you list the inputs.

Once you have the output, then you do the input, and finally the process to convert inputs to output.

A sketch of a report is good starting point.

iii) Input data

List the inputs data and the source of this data

A sketch of a form may be helpful.

iv) Processing requirements

List the steps to convert the input into the output.

v) Document the program specification

All the documents created above need to be combined into one portfolio for future reference.

Much of this documentation is possible to do electronically using CASE tools.

There are six mini steps:

Clarify objectives and users

Clarify desired outputs

Clarify desired inputs

Clarify desired processing

Double-check feasibility of implementing the program

Document the analysis

STEP 2: Design the program

Program use algorithms which are equations that tell the computer what task to be perform. The aim of the programmer is to create algorithms that are clear and simple. Algorithms are expressed first in logical hierarchical form known as modularization. Using modules or ( a complete thought) the programmer creates a logical thought process for the computer to follow. After that the program, is broken down in greater detail using pseudocode. Pseudocode uses terms like if, else, and, then to relate the programs rules to the computer.

In this step, a solution is created using programming techniques such as top-down program design, pseudocode, flowcharts and logic structures.

i) Top-down program design

Top-down program design is used to identifying the program’s processing steps.

These steps are called program modules

Each module is broken down into smaller sets of modules, until it has a single function.

The program must pass in sequence from one module to the next until all have been processed.

The three principle computer system operations include input, process, and output.

ii) Pseudocode

Pseudocode (pronounced "soo-doh-code") is an outline of the logic of the program you will write

It may be done in place of a program flowchart, depending on the design standards the organization follows

iii) Flowcharts

Program flowcharts graphically present the detailed sequence of steps needed to solve a programming problem

Typical flowchart symbols include:

Processing – rectangles

Input/Output – parallelograms

Decisions – diamonds

Connectors – circles

Terminal (start or end point) - oval

iv) Logic Structures

Three standard logic structures include sequence, selection, and loop

A fourth structure, the case structure is often mentioned in program design literature, but can be thought of as a special format of the selection structure

a) Sequence Structure

One program statement just follows the previous

b) Selection Structure

One of two processing paths can be followed depending on a condition

For example, the condition may test if an employee worked any overtime hours – if they did, you calculate the overtime pay, otherwise, you set overtime pay to zero

This is known as an IF-THEN-ELSE structure

c) Loop Structure

Describes a process that may be repeated as long as certain conditions remain true

The structure is called a loop (or iteration) because the program literally loops around and performs the same code over and over again until a condition changes

If for some reason the condition never changes, a program can get caught in an "infinite loop" which is a failure in the program (the program will "lock up")

Two forms of a loop structure include

DO UNTIL – condition tested at end of loop – loop statements will be executed at least once

DO WHILE – condition tested at beginning of loop – loop statements may not be executed if condition is never true

STEP 3: Code the Program

After the program has been designed it must be the coded or written. Using the pseudocode and logic requirements from step two an appropriate programming language must be selected. As stated in the introduction, coding languages differ in specifications and usability. Once the appropriate code language has been chosen, it is imperative that the programmer follow the syntax rules with as little deviation as possible.

Two mini steps:

• Select the appropriate high-level programming language

• Code the program in that language following the syntax carefully

i). The Good Program

Good programs should be reliable: they should work under most conditions.

They should catch obvious and common input errors.

It should be well documented and understandable by programmers other than the person who wrote it.

They should be structured programs, using the logic structures described previously

ii) Coding

Formatting or Presentation Languages use symbols, words, and phrases to instruct a computer as to how to display information to the user.

HTML – Hyper Text Markup Language is an example. HTML is used to code web pages.

Programming languages use a collection of symbols, works and phrases to instruct a computer to perform specific operations.

Programming languages focus on processing data for a wide variety of different types of applications

Examples of programming languages include C, C++, C#, Java, JavaScript, and Visual Basic

STEP 4: Test the Program

Testing the program comes in two phases, alpha and beta.

Alpha testing is the process of reading through the program in search of errors in logic. The second step is to run a diagnostic program to search for syntax or input errors.

Beta testing involves using the program in the real world to see if it contains any bugs or other deficiencies.

Debugging is a programmer’s word for testing and then eliminating errors ("getting the bugs out").

Two types of programming errors include syntax errors and logic errors

i) Syntax Errors

A syntax error is a violation of the rules of the programming language, for example, if you leave a semicolon (;) off the end of a C++ programming statement, it would result in a syntax error

ii) Logic Errors

A logic error occurs when a programmer uses an incorrect calculation or leaves out a programming procedure.

An example of a logic error is a payroll program that did not compute overtime errors

iii) Testing Process

Several methods for finding and removing errors include:

a) Desk checking

A programmer sitting at a desk checks (proofreads) a printout of the program.

The programmer goes through the listing line by line looking for syntax and logic errors

b) Manually testing with sample data

Using a calculator and sample data, the programmer follows each program statement and performs every calculation.

Looking for programming logic errors, the programmer compares the manually calculated values to the correct values.

c) Attempt at translation

The program is run through a computer, using a translator program.

The translator program tries to convert the program from source code to machine language.

Before the program can run, it must be free of syntax errors.

d) Testing sample data on the computer

After all syntax errors have been removed, a sample run is made to test for logic errors

e) Testing by a select group of potential users

Sometimes called Beta testing, it is usually the final testing of a program

STEP 5: Document and Maintain

Documentation should be ongoing from the very beginning because it is needed for those involved with program now and future. Upon completion User Documentation for commercial use, Operator Documentation for people who run computer systems, and Programmer Documentation for programmers charged with maintenancing the program are all issued.

Four mini steps:

Write user documentation

Write operator documentation

Write programmer documentation

Maintain the program

Let us turn to the programming process.

The Programming Process

Developing a program involves steps similar to any problem-solving task. There are five main ingredients in the programming process:

1. Defining the problem

2. Planning the solution

3. Coding the program

4. Testing the program

5. Documenting the program

Question 2

There are three tools to develop a program solution which is:

i) Algorithm

An algorithm is the sequence of instruction to solve a given problem. Each instruction clearly defines a task to be performed. The instruction need to be written in the correct logical order. Algorithms can be represented by flowcharts or pseudocode.

ii) Flowcharts

A graphical tool that represent diagrammatically depicts the steps and structure of an algorithm or symbols. There are symbols used to draw flowcharts:

i) Terminal – indicates start or end of the program or algorithm.

ii) Flow of control – use arrowheads to connect individual symbols.

iii) Input / Output – input or output of data.

iv) Process – Any type of internal operation: data transformation, data movement, and logic operation.

v) Decision – A diamond to represent a program branch point. The only symbol that can contain a question. If you have a question in a flowchart, you need to use this symbol.

vi) Connector – connects section of the flowcharts, so that the diagram can maintain a smooth and linear smooth.

iii) Pseudocode

A detailed yet readable description of what a computer program or algorithm must do, expressed in a formally-style natural language rather that a programming language. A pseudocode is sometimes used as detailed step in the process of developing a program. It allows designers or lead programmers to express the design in great details or provides programmers a detailed template for the next step of writing code in a specific programming language.

Question 3

Input

#include <stdafx.h>

#include <stdio.h>

#define vowel1_one 'a'

#define vowel2_two 'e'

#define vowel3_three 'i'

#define vowel4_four 'o'

#define vowel5_five 'u'

int main(void)

{

const int even1=0,even2=2,even3=4,even4=6,even5=8;

int odd1 =1, odd2=3,odd3=5, odd4=7, odd5=9;

// defined constant

printf("%c\t%c\t%c\t%c\t%c\n",vowel1_one,vowel2_two,vowel3_three,vowel4_four,vowel5_five);

// memory constant

printf("%d\t%d\t%d\t%d\t%d\n",even1,even2,even3,even4,even5);

// literal consant

printf("%d\t%d\t%d\t%d\t%d\n",odd1,odd2,odd3,odd4,odd5);

return 0;

}

Output

Question 4

Input

#include "stdafx.h"

#include <stdio.h>

int main (void)

{

int a= '1';

int b= '10';

int c= '100';

int d= '1000';

printf ("This is integer value %d\n",'a','b','c','d','e');

printf ("This is float value %f\n",'a','b','c','d','e');

return 0;

}

Output

Question 5

Input

#include "stdafx.h"

#include <stdio.h>

int main (void)

{

int digit;

float number;

printf ("Enter a floating point number: ");

scanf_s ("%f", &number);

digit = ( (int)number / 10 ) % 10;

printf ("\nSecond rightmost digit is %d\n", digit);

return 0;

}

Output

Question 6

Input

#include <stdio.h>

#include "stdafx.h"

#include<conio.h>

int main (void)

{

int length, width, perimeter, area;

printf (" enter lenght of rectangle " ) ;

scanf_s( "%d", &length);

printf(" enter width of rectangle " ) ;

scanf_s( "%d", &width);

area = width * length ;

printf( "\n The area of the rectangle is = %d\n" , area );

perimeter = 2*width+2*length;

printf( "\n The perimeter of a rectangle is = %d\n" , perimeter);

getchar();

}

Output

Question 7

The purpose of functions is to make the programmer's life easier.

Write code once, and call it from many places. This insures consistency, and reduces the cost of writing and debugging.

A function allows code to be parameterized by passing values to it.

Functions can be collected in libraries and reused in other programs.

Functions create new conceptual units that form the units that programmers use in thinking about a problem.

The general way to activate a function is to use the function name in an expression. The function name is followed by a list of inputs, also called arguments, enclosed in parenthesis:

answer = functionname (argumentl, argument2, . . .

Functions will help you to organize your code into smaller units or modules that provide a sort of outline for the program. A program that has been broken down into function calls will read much easier and be more understandable to anyone reading the code. The details of the code for any one function will then be hidden, not viewed unless needed.

Functions allow the programming of very large projects to be done by teams of programmers. The larger programs may run into many hundreds of thousands of lines of code and take many months to complete. Furthermore, the expertise of some programmers can be applied in different parts of the project. Thus, the entire project can be coded by many programmers, each working on their own set of functions.



rev

Our Service Portfolio

jb

Want To Place An Order Quickly?

Then shoot us a message on Whatsapp, WeChat or Gmail. We are available 24/7 to assist you.

whatsapp

Do not panic, you are at the right place

jb

Visit Our essay writting help page to get all the details and guidence on availing our assiatance service.

Get 20% Discount, Now
£19 £14/ Per Page
14 days delivery time

Our writting assistance service is undoubtedly one of the most affordable writting assistance services and we have highly qualified professionls to help you with your work. So what are you waiting for, click below to order now.

Get An Instant Quote

ORDER TODAY!

Our experts are ready to assist you, call us to get a free quote or order now to get succeed in your academics writing.

Get a Free Quote Order Now