Cuprins
- 1 TASK Procedural Programming languages 3
- 1.1 Level languages 3
- 1.2 Procedural languages - non-procedural 3
- 1.3 Competitive languages 3
- Low-level languages 3
- 1.4 Repetitive Do -While Loop instruction 5
- 1.4.1 The for Loop 5
- 1.5 Procedural Programming 5
- 1.6 Object Oriented Programming 7
- 1.7 Event-driven programming 8
- 2 PROGRAMING TOOLS 9
- 2.1.1 DATA TYPES 9
- 2.1.2 LOGICAL OPERATOR 9
- 2.1.3 Array 9
- 2.1.4 Locale and global variables 9
- 2.2 FLOW-CHART DESIGN PROGRAM 12
- 3 TASK IMPLEMENTATION 15
- 3.1 STRUCTURES, PROCEDURES AND METHODS IN C# 15
- 3.1.1 Decision statements 15
- 3.1.2 Stored Procedures in C# 16
- 3.2 PASSING PARAMETER MECHANISM 17
- 3.2.1 Functions 17
- 3.3 DESIGN PROGRAM 18
- 4 TASK: TESTING PROGRAM 23
- 4.1 SOFTWARE VERIFICATION 23
- 4.2 TEST PLAN 27
- 4.3 Personal Feedback 33
- 4.4 STEPS TO USE THE PROGRAM 33
- 4.5 Program documentation 35
- 5 Bibliography 36
Extras din proiect
It is a systematic notation that describes a computation process. The role of a programming language is to provide syntactic constructors for organizing calculations. The calculation process consists of a lot of steps a machine can execute to solve a problem, which are expressed in basic commands (arithmetic and logic operation, functions) that the machine (computer) knows to execute. To describe the calculation process, it is necessary to know the set of commands (instructions) of the machine which we refer. Machine language is the mother tongue of a computer that the computer responds in a direct way (Oros, 2017).
The languages used to program a computer are extremely similar to natural languages. They consist of:
- Words (reserved);
- punctuation;
- sentences and phrases;
- syntactic rules, etc.
1.1 Level languages
A low-level language is almost the same with the machine language; it handling physical hardware (registers, microprocessor, memory location, input / output). The more advanced language, the better the computer understands the instructions to execute.
1.2 Procedural languages - non-procedural
The two types of languages, procedural and non-procedural are differentiated by the level of organization (structuring) of a program. Non-procedural languages are designed to think of a program at the instructional level, while the procedural ones force the programmer to conceive programs at the block level. In a procedural language (also called structured language), the programs are written instruction with instruction, but they are logically organized into blocks (instruction groups) that perform a well-determined action. Generally, a block has an entry point and exit point - no more.A procedural language offers the possibility to use a high level of program design and leads to coherent and error-prone programs. By contrast, unprocessed languages do not favour the programmer to deviate from the "instruction" level and often lead to programs that are hard to control - especially in the case of large-scale programs. Unprocessed languages are still preferred by some users due to the very short time they are learning and using them (http://net-informations.com/).
1.3 Competitive languages
A concurrent language can define processes (processing) parallel execution to be branched at a certain time. In contrast, non-competing languages (most languages) have a linear development, with only one process active at a time. Competing processes necessarily involve a multi-tasking system that can handle multiple "tasks" at a time (http://net-informations.com/).
Low-level languages
This category of languages has an authoritative representative, namely: the assembly language. Differences that can be done for low-level languages are as follows (http://net-informations.com/):
A) - By type of machine;
The rules complied with the assembly language versions are:
- a new version completely includes the previous one
- the new version offers additional features and makes the old ones faster.
B) After the programming environment provided.
1.4 Repetitive Do -While Loop instruction
Repeating the execution of the body of the Do -While repetitive statement is conditioned by the logical value of the stop phrase: for logical "True" iteration the structure sub-diagram is resumed: the logical value "False" determines the completion of the instruction (http://csharp-station.com/Tutorial/CSharp/Lesson04).
The Do While Loop statement has the following syntax:
Do While condition
Bloc_instruction
Loop
1.4.1 The for Loop
The repetitive instruction "For Loop" ensures that instructions repeat, which make up the body of the cycle a number of times (http://www.c-sharpcorner.com/UploadFile/8a67c0/oops-vs-procedural-programming/).
1.5 Procedural Programming
It is a step by step programming approach to perform some logic. It is a set of instruction which tell the OS to perform the logic. Procedural programming is based on routines or subroutines. It contains the steps or we can say series of logic [functions] to be carried out. It is also known as top-down language. Also, it is known as Linear Programming (http://codingmakesyouhappy.com).
Figure 1- source google.com
Procedural programming is the part of imperative programming. In imperative programming, we tell the computer “how to do” rather than “what to do”. In procedural programming, we use statements to change the state of the program. Statements include the lines of code which are instructions telling the machine “how” something should be done. As we would need to write hundreds of code to perform the tasks, sometimes it becomes necessary to carefully select those lines of code or statements that are used excessively within a same program and then copy it somewhere and then paste on those places where they are required. Thankfully, procedural programming provides procedures, also known as subroutines or functions, which can be used to hold the commonly repeated lines of code, and then use it whenever you require it in your programs. Procedures are routines / functions that hold several lines of code, which can be placed whenever you need to do something instead of writing the same lines of code again and again. Thus, it’s a way to organize the code to reduce duplication. Procedures can be called in other procedures and even in themselves (http://codingmakesyouhappy.com). In procedural programming, we create / define different procedures (i.e., printName, changeColor, etc.) and call them whenever we like to perform a required task. Following is the example of the program in C, which is enough to show the procedural programming style (http://codingmakesyouhappy.com):
void printNumber(int num)
Bibliografie
http://asq.org/learn-about-quality/process-analysis-tools/overview/flowchart.html. (n.d.). Retrieved 2017
http://codingmakesyouhappy.com. (n.d.). Retrieved 2017, from http://codingmakesyouhappy.com.
http://csharp-station.com/Tutorial/CSharp/Lesson04. (n.d.). Retrieved 2017, from http://csharp-station.com.
http://elf.cs.pub.ro/poo/laboratoare. (n.d.). Retrieved 2017, from http://elf.cs.pub.ro/.
http://knowledgehills.com/csharp/csharp-decision-statements.htm. (n.d.). Retrieved 2017 , from http://.
http://net-informations.com/. (n.d.). Retrieved 2017, from http://net-informations.com.
http://www.c-sharpcorner.com/article/C-Sharp-and-its-features/. (n.d.). Retrieved 2017, from http://www.c-sharpcorner.com.
http://www.c-sharpcorner.com/UploadFile/8a67c0/oops-vs-procedural-programming/. (n.d.). Retrieved 2017, from http://www.c-sharpcorner.com.
http://www.internetdict.com. (n.d.). Retrieved 2017
http://www.shiva.pub.ro/PDF/TEST/Black_Box_Testing.pdf. (n.d.). Retrieved 2017, from http://www.shiva.pub.ro.
http://www.softwaretestingclass.com/gray-box-testing/. (n.d.). Retrieved 2017, from http://www.softwaretestingclass.com.
http://www.softwaretestingclass.com/white-box-testing/. (n.d.). Retrieved 2017, from http://www.softwaretestingclass.com.
http://www.vcskicks.com/csharp_data_structures.php. (n.d.). Retrieved 2017, from http://www.vcskicks.com.
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/methods. (n.d.). Retrieved 2017, from https://docs.microsoft.com.
https://msdn.microsoft.com/en-us/library/0f66670z(v=vs.71).aspx. (n.d.). Retrieved 2017, from https://msdn.microsoft.com.
https://msdn.microsoft.com/en-us/library/aa691170(v=vs.71).aspx. (n.d.). Retrieved 2017, from https://msdn.microsoft.com.
https://msdn.microsoft.com/en-us/library/aa691310(v=vs.71).aspx. (n.d.). Retrieved 2017, from https://msdn.microsoft.com.
https://ocw.cs.pub.ro. (n.d.). 2017.
Preview document
Conținut arhivă zip
- Procedural programming.docx