WMT.in - Webmaster Forum  

Go Back  »  WMT.in - Webmaster Forum » Web Development Forum » Programming Talk


Welcome to the WMT.in - Webmaster Forum forums. WMT.in is a Revenue Sharing forum where you can Earn Money just for participating in WMT!

WebmasterTalk.in discussion forum is the fastest growing and active group of Webmasters from all over the world. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.



learn c++(2)


Post New Thread Reply
 
LinkBack Thread Tools Search this Thread Display Modes

Old 12-13-2005, 03:55 AM   #1 (permalink)
nesrelshark
Newbie
 
This is nesrelshark's avatar
 
Status: Offline
Join Date: November 2005
Posts: 6
 
Reply With Quote
Default learn c++(2)

Steps of Program Development

In the world of computing, the job of a computer programmer is to create programs that solve specific problems. The problems that programmers encounter may be as simple as printing a billing summary for customers at a store, or they can be as complex as performing financial calculations for a bank. Whatever the problem may be, programmers follow a multi-step process called program development in order to create successful programs. Program development is a five-step process requiring understanding of the problem at hand, developing a solution, writing a program, testing the program, and maintaining it.

The first step in the program development process is to understand the problem. This step is critical because a programmer cannot solve a problem until he fully understands it. During this step, the programmer carefully analyzes the problem in order to form a precise specification that includes the input required and the type of output needed. Input refers to the specific data that is put into a problem in order for it to be solved. Output refers to the exact answer that must be produced from the problem. Before the programmer can do anything else, it is vital that he fully understands the problem.

After he fully understands the problem, his next step is to develop a solution. It is important that the solution is developed before writing any type of computer code. When developing the solution, the programmer must devise an algorithm, which is a step-by-step plan for solving a particular problem. An algorithm can be displayed on paper in one of three ways: a flowchart, a structure chart, or pseudocode. Most programmers choose to use pseudocode, which is a verbal description of the solution involving a mixture of English and a programming language. During this step, the programmer must also make sure he is solving the problem correctly, and he is solving the correct problem (verification and validation).

After a solution has been developed, the next step of the process is to write the program code. Writing the code essentially means taking the algorithm and converting it into a computer programming language. The programmer must first pick an appropriate programming language to use, such as BASIC, Pascal, Ada, and C. When writing the code, the programmer starts at the beginning of the algorithm and works his way down to the end. He must make sure his program code is well-structured and includes adequate documentation. Documentation is statements written in the program code that does not affect the code itself, but lets the programmer know what specific parts of the code is supposed to do.

The next step in the process is to test the code. Testing can be done by running the program and manually checking the results. Two types of testing take place during this step: white box testing and black box testing. White box testing, commonly called glass box testing, refers to testing done by the person who wrote the program code. In other words, the person doing the testing knows everything about the program code. Black box testing, on the other hand, refers to testing done by someone who has no idea of how the program code is written. Documentation is especially important so other programmers (including yourself) can analyze your code easily in the future and may even help you find and correct mistakes.

After the code has been thoroughly tested, the fifth and final step is maintaining the completed program. The programmer maintains it by updating the code and editing the code in order to make it more efficient. During this maintenance phase, programmers also may have to correct “bugs”, which are errors in code that were not recognized during testing.

Every time a programmer is given a problem to solve, he calls upon the program development process for help. Every step in the process must be completed in order for the programmer to create a successful solution. If the problem is not understood, a solution will not be developed, and a program will not be written. If a program is successfully written but not maintained, the program will eventually become obsolete. Every step is critical towards the overall success of the program. Although the problems programmers encounter may change, the process of developing a solution will remain the same.

Here is an outline of each step in the program development process. Note what each step requires the programmer to do.

Understand the Problem
- You can't solve a particular problem unless you understand it.
- Form a precise specification, including the input required for the program and the output needed.

Develop an Algorithm
- You should develop a plan before writing any type of program code.
- Check verification : Are you solving the problem correctly?
- Check validation: Are you solving the correct problem.
- Ways to display algorithms: structure chart, pseudocode, flowchart [see also Introduction to CS]

Write the Program Code
- Essentially converting an algorithm into a computer programming language such as C++.
- Be sure to use meaningful identifiers, which are the names you will give the variables you use.
- Be sure to include adequate documentation, which are comment statements written in your program code that do not affect the code itself, but explain what
specific code fragments are suppossed to do.

Test the Program
- Run the program and manually check the results.
- Be thorough:
- Test all possiblities
- Test extreme data (invalid data, limit values, empty/null values)
- Begin BlackBox testing
- Begin WhiteBox testing

Maintenance
- Normally geared toward programming in the real world (careers)
- Update Code
- Correct "bugs"
- Edit code to make it more efficient.
With the program development process out of our way, we can now look at the different levels of computer languages. Read on for more...

Levels of Computer Languages

In order to write a program, you must use a computer language. There are three levels of computer languages: machine, symbolic, and high level.

Machine language dates back to the 1940's and is the only language that is directly understood by a computer. All of the code written in machine language is based on binary code, which makes it extremely difficult and time-consuming for writing large programs. Binary code is composed of streams of 1's and 0's. This makes perfect sense considering that the internal circuit of a computer is made of switches, transitors, and other devices that can only be in one state: on or off. The off state is represented by 0, and the on state is represented by 1. A program that took hours to write in machine language could possibly be written in a couple of minutes using a high-level language.

Thanks to the work of mathmatician Grace Hopper in the early 1950's, a new language was developed and named symbolic, or commonly referred to as assembly. Symbolic language made it possible to use commands such as MOV and ADD instead of having to rely primarily on binary code for every command. The symbols represented various machine language instructions, but the symbols still had to be converted to machine language for a computer to understand. A program called an assembler was developed and used for these purposes.

In the late 1950's, a major breakthrough was made and high-level languages were developed. High-level languages broke free of depending directly on the hardware of a computer. Instead, these languages concentrate on the problem being solved.. Program code is written with symbolic names, but the names actually represent memory addresses in the computer. When the program code is run, a compiler translates the code into binary code (internally) so the computer can understand it. High-level languages make it extremely easier to write and understand program code than machine and symbolic languages. Similar to symbolic language, high-level languages require a translator, normally called a compiler, to convert their code into machine language for the computer to interpret.

Examples using machine and high-level languages:

Write a code segment that will add 2 integers and store the result.

**** NOTE: This machine language code segment will not work. It is meant to show what binary code looks like. ****

Machine language code:

0000000 1101001 0010011 0001010
1111011 1010100 1010010 1011101
0000100 1110111 1110111 1010101
0001001 0011001 1111111 1010000
High level code:

sum = firstValue + secondValue;

Ok, so programmers use computer languages to tell a computer what to do, but exactly how do computers work? How do they think, and how do they know how to understand data? The next section deals with the internal representation of data in computers. Read on for more...

Old 01-18-2006, 12:10 AM   #2 (permalink)
mourya
Banned
 
mourya's Avatar
 
Status: Offline
Join Date: January 2006
Posts: 167
 
Reply With Quote
Default

you should have uploaded the articles into one post


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

You're Invited!

WebmasterTalk.in is an active Webmasters Discussion forum having over 1000 members discussing Webmaster related topics like Hosting, Control Panels, Programming, Webdesinging, SEO, Advertising. Please join our community today. Registration is free, easy and takes only a few seconds. Don't just browse, participate!



Similar Threads
Thread Thread Starter Forum Replies Last Post
i wanna learn PHP westhaven PHP & MySQL 31 08-11-2006 12:08 PM
learn c++(1) nesrelshark Programming Talk 0 12-13-2005 03:53 AM
How did you learn how to code lyouts? NickRac Programming Talk 16 07-13-2005 03:20 PM
Learn how to slice and code your layout like a pro! Jmz Web Designing and Graphics Talk 2 07-12-2005 03:20 PM
Is there a better way to learn photoshop? acne Web Designing and Graphics Talk 0 03-29-2005 03:18 PM


All times are GMT +1. The time now is 06:04 PM.

Our Partners
» PHP Web Hosting
» Mobile Phones
» Runescape
» World of Wacraft

Latest Projects
»
»
»
»
» Account Suspended
»