How To Create A Program On A Computer

Table of contents:

How To Create A Program On A Computer
How To Create A Program On A Computer

Video: How To Create A Program On A Computer

Video: How To Create A Program On A Computer
Video: How To Learn Programming for BEGINNERS! (2019/2020) 2024, November
Anonim

There are a lot of programs for the Windows operating system. Nevertheless, sometimes the user needs such a specific program that he cannot find it on the Internet. In this case, you can try to write the program yourself.

How to create a program on a computer
How to create a program on a computer

It is necessary

Computer, specialized programs, textbooks, video courses

Instructions

Step 1

To write a program, you need a programming environment. One of the easiest to learn and use is the Borland C ++ Builder development environment. By installing it on your computer, you can write programs in C ++. This language is quite easy to learn and is widely used by programmers.

Step 2

Start the installed programming environment. A form will appear in front of you - a template for the future program. You can arbitrarily change its size in accordance with your ideas about how the interface of your future program will look like.

Step 3

The program window assumes the presence of any elements on it - buttons, windows, inscriptions, etc. At the top of the screen is the Component Palette. Opening certain sections of it, add buttons and other components you need to the form (drag with the mouse). You can arbitrarily position them on the form, resize them, add labels, etc. By these actions, you create the interface of the future program - that is, you define its appearance and controls.

Step 4

By clicking the green arrow, you can see how your program will look at runtime. But if you try, for example, to press a button, nothing happens. You've created an interface, but for the button to work, you need to create an event handler for it.

Step 5

Close the running program, then double-click the button on the form. A window will appear with a code blank - the cursor will be located where you need to enter a specific line of code indicating what exactly should happen when the button is pressed. To understand what exactly should be entered, refer to the C ++ programming textbooks. A video course on working with Borland C ++ Builder can also be of great help, where you can master the basics of programming using specific examples of creating simple programs.

Step 6

While creating the interface of the program, you roughly imagine how it should work, what should happen when you press certain buttons. Now you need to write down in detail the algorithm of its operation - that is, draw up a step-by-step scheme for performing operations.

Step 7

Draw the diagram by hand on a piece of paper, preferably vertically. Select individual blocks with squares, rhombuses, circles, this will facilitate the creation of the algorithm. Use arrows to mark transitions from one block to another. The more you write down the algorithm, the easier it will be for you later to translate it into lines of program code.

Step 8

Having created an algorithm, proceed directly to programming. Do not forget to prescribe error handling - the program must know what to do in case of an error. If you do not do this, then any failure will result in a critical error message. Error handling helps eliminate such situations.

Step 9

After the program is written, start debugging it. The debugging process consists in checking the correctness of the program and testing it for "vandal resistance" - you must torture your creation in every possible way, looking for and eliminating errors. The program must be resistant to any incorrect user actions.

Step 10

Debugging is complete. You just have to perform the final operation - compilation of the program, as a result you will get the usual executable file with the *.exe extension. To run the program on any computers without additional libraries, uncheck the "Use dynamic RTL" checkbox in the Linker properties and "Build with runtime packages" in the Packages properties in the compilation settings.

Recommended: