




















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
Your next task is to do the analysis for the scenario mentioned above by doing the following subtasks. Analysis the problem and explain: - List variables, data types, data structures needed in the problem - Conditional statements needed in the problem - Loop statement needed in the problem
Typology: Assignments
1 / 28
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 Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Le Thi Phuong Anh 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
I.1 Programming language Nader (2020) commented that Programming Language could be a programming dialect is the set of informational through which humans interact with computers. In other words, according to Beal (2021, a programming dialect is the language of a computer, having a place to a framework that permits its clients to type in particular computational programs or algorithms. When individuals communicate with each other, we utilize language to communicate information. In any case, computer systems and program don't get it our language, so they require another dialect to function, making these devices' get it ' and work concurring to our wishes. Those are programming languages. Research by Nader (2020) shows that the uncommonly most reliable computers were truly adjusted by changing ones and zeros physically, substituting the circuit and the wiring. Of course, it was not straightforward to create various programs as most were utilized for specific applications because it were, and they were colossal in degree so they were exceptionally confined. It is fought that’s why the creation of programming lingos was a dynamic step that took the field to another level and not at all like standard tongues, watchwords in programming lingos are constrained, and by combining these watchwords, architects are able to create assorted sorts of programs. There are unprecedented pieces of computer program that turn the code you sort in into machine lingo that the machine gets it. So, what is programming tongue? In brief, a programming tongue is the set of educational through which people related with computers. Today in the world, there are many programming languages, each with its own characteristics and properties leading to different advantages and disadvantages. We can understand that there will be no language that can be used. There is no such thing as "the best programming language" and there is no such thing as "the worst language" because each language has its own tasks and unique features. Over time, languages have changed and upgraded to suit the environment. So, we need to learn many different languages so that we can keep up with the times and apply it to our lives
I.2 Procedural Programming I.2.1 General concepts According to a study by Harvey (2013) Procedural Programming could be a term utilized to represent the way in which a computer software engineer composes a program. This strategy of creating program, which too is called an application, revolves around keeping code as brief as conceivable. It moreover centers on an awfully particular conclusion result to be accomplished. Bhatia (2021) states that essentially put, Procedural Programming includes composing down a list of instructions to tell the computer what it ought to do step-by-step to finish the errand at hand. As the name suggest, the procedural programming the program code is organized within the shape of strategies. These procedures are moreover called as subroutines or function. I.2.2 Characteristics In a recent study by Learn Computer Science (2021), insights appear estimations showed up the procedural programming focuses at apportioning the tremendous program into smaller programs called strategies. The strategies are additionally at that point once more insinuated to as subprograms, subroutines, techniques of capacities. And a in that the program code is organized as set of strategies called work. These capacities work on the program data called the variables. Data to boot inside the outline of variables. The capacities work on the program data. Each work comprises of computational clarifications and understands a parcel of the issue. Image 3 : Function
Image 4: Function declaration Learn Conputer Science( 2021 ) noted that The procedural programming code is composed as course of action of subroutines ( work or strategies). They can either be definded into the most program code or outside the foremost program code into a disconnected header record. Other than, in procedural programming , when the program appraise is becom gigantic at that point the program code is portion into bunch of humbler programs called methods or subroutines. Image 5: Programming Organization
Example of procedural programming: Image 6: Structure of Procedural programming The C procedural language is extensively used in the industry for the system programming. Image 7: Hello world - programming Language C
I.3 Problem statement A teacher needs to manage the grades of students in the class. To avoid data confusion, student omission or time-consuming problem retention, we should design a program. Thus, through that program, teachers will easily manage students without worrying about problems. At the same time, you can also edit and search for student information in the fastest way. I.4 Problem solving To solve the problem, a program will be designed to help math teachers manage students' grades. He just needs to enter the student's information including ID, name, gender, age, grades. The program will display the entered information on the screen. At the same time, some basic functions appear on the screen such as searching for the student with the highest score, the student with the lowest score, calculating the average score and displaying a list of students by average score and deleting students by ID. Thus, there is no need to spend a lot of time and effort on entering scores and storing information. I.5 Application of procedural programming to this program Based on procedural programming, a program will be designed according to the struct structure in C programming language to help math teachers manage students' grades. Procedural programming is a complete option in setting up a student score management program.
II.1.2 Data types, data structures Within the C programming language, data types sorts constitute the semantics and characteristics of capacity of data elements. They are communicated within the language structure in frame of statements for memory areas or factors. Data types too decide the sorts of operations or strategies of preparing of data elements. Here are a few fundamental data types
Explain why use data types for each variable: Data type Variables Value int ID, age We see that ID (identification) are integers (example: 200052) so we will use int data type char name, gender The name with gender is a array of characters (LeMinhPhuong or female), so we choose char data type float assignment, test, exercise, average, max, min For variables like assignment, test, assignment, average, min, max, it's the student's score. It can be stored as real numbers (example: 2.5, 9.0, 7.9, ...) so we use float data type bool true Use in switch-case function. After input info of students first, we set it is true , so that, another case can use. If we were not input info first, check would be false , so one notification will warn you to input info first. II.2 Conditional statements needed in the problem Conditional Statements in C programming are utilized to create choices based on the conditions. Conditional statements execute consecutively when there's no condition around the statements. On the off chance that you put a few conditions for a block of statements, the execution stream may alter based on the result assessed by the condition. This prepare is called decision making in 'C'. In 'C' programming there are two common constructs:
Image 1 3 : Example about nested if-else statement The if..else..if articulation permits executing a piece of code between different choices. But on the off chance that we checking the esteem of a single variable in an if...else..if articulation, the switch case could be a way better choice. Employing a switch case will make our code less demanding to type in and simple such as selecting the case to print to the screen Image 1 4 : Example of Switch Case The switch - case branching structure is often used to replace the if - else structure when there are too many options to choose from, especially in the situation that there are 7 choices in the menu of the program. So this means we will have 7 simple if statements or multiple if - else statements nested together. This causes complexity, confusion and verbosity of a program. So here we can use the switch - case statement to overcome this situation.
II.3 Loop statement needed in the problem Agreeing to Union of essential circles in C (2018) when programming we definitely execute a block of code numerous times and the articulations are executed successively: The first statement in a function is executed to begin with, the next statement is the second and so on. Thus, the circle in C issues a case to provide the following types of loops to handle the above repeated requests. Loop can execute a block of code as long as an indicated condition is come to. Loop are convenient since they save time, diminish mistakes, and they make code more discernable. So, I select while loop to make menu choice. While loop will assess the condition. In case the condition is true, the code inside the while loop is executed. The condition is at that point assessed once more. This prepares proceeds until the condition assesses is false. When the condition isn't met, the loop closes. Image 15 : Example of while loop The loop structure causes the program to rehash a sequence of articulations until a certain condition is now not satisfied. In circle structure we utilize do/while. The do/while circle could be a variation of the while loop. To guarantee that there are no blunders this loop will execute the code block once piece once, before checking if the condition is true, then it will repeat the loop as long as the condition is true. Check the expression, in the event that true, repeat execution of the block, if false, end the loop (block is executed once) Image 1 6 : Example of do/while loop
Explain about my program:
III.2.2 Flowchart This is the flowchart in the student score management program Image 18 : Flowchart for main menu