
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An overview of programming languages, focusing on the differences between low-level and high-level languages. It covers the basics of machine language, assembly language, and high-level languages, including their uses and examples. The document also discusses the importance of understanding programming languages and the role they play in computer programming.
Typology: Study Guides, Projects, Research
1 / 24
This page cannot be seen from the preview
Don't miss anything!

















Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Prog 102 : Procedural Programming Submission date 6/20/2021 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Student ID Class Assessor name Student declaration I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice. Student’s signature Grading grid P1 P2 P3 M1 M2 D
Grade: Assessor Signature: Date: Lecturer Signature:
Task 1:
A programming language can be defined formally as an artificial formalism in which algorithms can be expressed. It is composed of a set of instructions in a language understandable to the programmer and recognizable by a computer. Computer languages have been continuing to grow and evolve since the 1940’s. Programming languages also are two full-fledged languages that consist of a set of commands that produce numerous types of output. Programming languages are used in computer programming to implement algorithms. Most programming languages encompass commands for computers. There are programming machines that use a specific set of commands, instead of generic programming languages. Programming languages allow us to communicate with computers through computer code. Each programming language is simply a means to tell the computer what to do. It is a language that our computers understand and know how to process. When it comes to learning a particular programming language, it's just like learning any other language. we need to understand how language works and follow certain rules, just like grammar in spoken language. Each language is different and you will use them for different types of projects. (Dey, 2006)
Programming languagues include two types: Low level languages(LLL); High level languagues(HLL); o Low-Level Programming Languages are very close to the machine code (0s and 1s) and are also known as Computer-Friendly Languages.These are the Programming Languages with very less or no abstraction at all.The program instructions written in these languages are in binary form. Low-Level Programming Languages are the hardest languages to understand by programmers and need a really good knowledge of Computer Architecture and it’s working. There are 2 types of Low-Level Programming Languages available, which are discussed below: Machine Language: Machine Language is also known as the First Generation Programming Language (1GL). The instructions in machine language are written in the form of binary codes that can immediately be executed by the processor. A machine language instruction generally has three parts as shown in Fig. 4.1. Machine language is the fundamental language of the computer and the program instructions in this language is in the binary form. It is difficult to understand and develop a program using machine language. Because it is hard to understand and remember the various combinations of 1’s and 0’s representing data and instructions. The programmer has to remember machine characteristics while preparing a program.
and grammar for writing program instructions. These rules are called syntax of the language. Advantages of high-level programming languages aremany fold which are as follows. Readability programs written in these languages aremore readable than those written in assembly and machine languages. Portability high-level programming languages can be run on different machines with littl or no change. It is, therefore, possible to exchange software, leading to creation of program libraries. Easy debugging errors can be easily detected and removed. Ease in the development of software Since the instructions or statements of these programming languages are closer to the english language, software can be developed with ease. The time and cost of creating machine and assembly language programs were quite high. This motivated the development of high-level languages. The program written in high level language must be translated to machine code before to run it. Each high level language has its own translator program. The high level programming languages are further divided into: Procedural languages: Procedural languages are also known as third generation languages (3GLs). In a procedural language, a program is designed using procedures. Non procedural languages: Non procedural programming languages are also known as fourth generation languages. In non procedural programming languages, the order of program instructions is not important. Ihe importance is given only to, what is to be done. Object oriented programming languages: The object oriented programming concept was introduced in the late 1960s, but now it has become the most popular approach to develop software. (Anon., n.d.) Java Java's logo
o Java is a general-purpose programming language that is object-oriented, class-based, and made to have some implementation needs as conceivable. It is basically designed to allow the application developers to write the code in Java for once, run anywhere (WORA), it means that Java code when compiled can be executed on all podiums that support Java without any recompilation need. The applications in Java are assembled to bytecode that you can run on Java virtual machine (JVM) irrespective of the system architecture. Some of the programs in Java have a status of being sluggish and consume more memory as compared to the code written in C++ language. Illustrated image. o The Java is multi-platform programming that’s is an ideal option for networking.Obviously, typically this language is used in the web development with Java applets. Nevertheless, Java is also used to make programs that can be run on different platforms, as it is quite similar to the C++ syntax and structure. For programmers of C++, Java is an easy language to understand and learn and it also provides some benefits offered by the object-oriented programming. C++ Programming C++'s logo
In procedural programming, a program is conceived as a set of logically related instructions to be executed in order. In procedural programming, each program can be divided into small self- contained program segment, each of which performs a particular task and be re-used in the program as and when required without repeated explicit coding corresponding to the segment. These sections of code are known as procedures or subroutines or functions. It also makes it easier for programmers to understand and maintain program structure. There are mainly three classes of procedural programming languages. A procedural programming language is a PC programming tongue that obeys, all together, a great deal of requests. Here we see the examples of PC procedural languages are BASIC, C, FORTRAN and java. Procedural programming language tongues are a segment of the ordinary sorts of programming lingos used by substance and programming engineers. They use limits, unforeseen clarifications, and elements to make codes that license a PC to discover and show an ideal yield. Computer processors give gear support to procedural programming language through a heap index and rules for getting back to technique and returning from them. More significant level dialects work for individuals since they are nearer to common language, yet a PC can’t complete regulation until that correspondence has been converted into 0 and 1. This interpretation might be finished by accumulators or translators, which extraordinary projects hand crafted to suit both the language and tool being utilized. The procedural programming language is either arranged or deciphered, contingent upon the utilization for it really being made. FORTRAN, for instance, is normally actualized with an accumulator since it was made to deal with enormous projects for logical and numerical applications where speed of execution is significant. Some types of Procedural Languages : FORTRAN, ALGOL, COBOL, BASIC, Pascal, C, Ada. Here are short description of every language: FORTRAN : it stands for formula translation. It was developed in 1957 for IBM computers. It was the first earliest high level programming language used to introduce the concept of modular programming. It has been revised many times. Its commonly used version is FORTRAN 77
FORTRAN's logo ALGOL : Because numerous dialects and lingos were created somewhere in the range of 1956 and 1959 making convey ability issues, different PC bunches requested ACM to suggest activity for the production of a widespread programming tongue. Delegates from production and colleges were named to a panel that met multiple times, beginning in January, and concurred that’s new dialect would be a logarithmic tongue like FORTRAN. Be that as it may, FORTRAN couldn’t be utilized as an all-inclusive language in light of the fact that, back then, it was a formation of IBM and intently attached to IBM equipment. COBOL : it stands for common business oriented language. It was developed in 1959. this high-level language was specially developed for business and commercial applications. It was suitable for handling large amount of data such as: To prepare payroll To process credit and debit account To control inventory system and many other business applications Illustrated image BASIC : In the mid-1960s there were no PCs. In the case that you needed to register, you needed to type your code on cards, deliver them to the closest PC place, and afterward sit tight hours for the outcomes. Must be to 1964 PC reseachers planned and create a period inviting framework and built up the BASIC (Beginners All-reason Symbolic Instruction Code).
They can give commands to instruct computer to do things and describe how computer should do things. Uses of Procedural languages: Procedural programming dialects are some normal kinds of programming dialects that are used by content and programming developers. They make use of capacities, restrictive proclamations, and factors for creating programs that enable a PC for figuring and show the ideal yield. So this is known as a procedural programming language. There are mainly three classes of procedural programming languages: o Algorithmic Using this type of programming languages, the programmer must specify the steps the computer has to follow while executing a program. In these languages, a complex problem is solved using top-down approach of problem solving in which the problem is divided into a collection of small problems and each small problem is realized in terms of subprogram. o Object-oriented language The basic philosophy of object-oriented programming is to deal with objects rather than functions or subroutines as in strictly algorithmic languages. Instead of procedures, object-oriented programming relies on software objects as the units of modularity. Data and associated operations are unified grouping objects with common properties, operations and semantics. o Scripting languages Few years back, the scripting languages were not considered as the languages, but rather thought of as auxiliary tool. A scripting language may be thought of as a glue language, which sticks a variety of components written in other languages together The focal point of procedural writing PC codes is to distinguish a programming language assignment into a lot of factors. Information forms, and edit, while in object arranged programming language this is to separate a programming assignment in objects that show conduct frameworks and information individuals or traits utilizing interfaces.
Example of procedural programming **Using a procedural language for building up a program may perform by performing a programming manager, similar to eclipse, or android Studio.
Task 2 :
Main(): To declare main function in this problem; Int: Using this one to declare integer variables will be needed in the problem of the teacher: Int i: To initialize index variable which will be used in for loop; Int total: ‘total’ be initialized to assign a variable which help teacher can input the total of how many students in his class; Int IDs[] : Declare the integer array for IDs which help him enter student IDs; Int choice: Intialize this one to declare a variable will be used in menu based program. Float : Utilizing to to declare float variables will be needed in the problem: Float grades[]: Declare the float array for grades which help him enter student grades; Float max, min: they be clared to assign a highest grades value and lowest grades value can be used in the context and they will be in the menu based program. They should be declared since in case the teacher needs to know the highest grade and lowest grade, max and min variables will represent for highest and lowest grade when they’re used in ‘if’ structure in for loop; Example: we use if structure in for loop : if(max<grades[i]); Max = grades[i]; and max will be the highest grades.
Using ‘for’ loop: This iteration obviously is necessary in this problem, using it to implement the program make it has abilities to enter student IDs, student’s grades continuously and repeatedly, which meet the teacher need that he needs to enter the total of students. It also store these information into 2 separate arrays and print the full list of students IDs and grades. To illustrate: Illustrated image for using for loop to solve his problem This is a fragment of 'for' structure, its function is to enable teachers to enter IDs and grades of multiple students at once. It will be used after the declaration of all variables and data types is completed and also in the ‘switch-case’ structure.
Switch()-case(): The ‘switch-case’ structure will be utilized to make a menu based with the options based on the needs of the teacher. Example: Example of using 'switch-case' in this problem This code creates a menu option for the teacher in the small application using the 'switch-case' structure. Not only that when an option is done,the ‘switch-case’ structure will help him choose any different option in this app This one will be used in the body of programming to become a main function of the application. ‘do-while’ loop: this structure will be used in this problem to create the condition that will check that if the teacher choose the right option or he type the wrong option or he want to exit this program. If he choose the right option(which no including exit option) or wrong option, the program will go back to the main menu, so he can choose another option or even if he choose the wrong, the program will never exit. In case he want to exit program he only enter the exit option that be located in the condition of ‘while’(in the opposite sense), the program will exit right away. For example: do{ ………} While(!=4)
Task 3: The use=case of a[[lication operating
Menu operation: Menu based program of this problem.