


























































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 introduction to procedural programming, discussing its principles, characteristics, and features. It includes a guide on programming in general with an emphasis on procedural programming, as well as tasks requiring the creation of design diagrams and evaluating the design against procedural programming features.
Typology: Assignments
1 / 66
This page cannot be seen from the preview
Don't miss anything!



























































Qualification BTEC Level 5 HND Diploma in Computing Unit number and title Unit 0: IT Fundamental & Procedural Programming Submission date Date Received 1st submission Re-submission Date Date Received 2nd submission Student Name Duong Trong Qui Student ID GBS Class GCS1005A Assessor name Phan Minh Tam 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 Qui Grading grid P1 P2 P3 M1 M2 D
ASSIGNMENT 1 BRIEF Unit Number and Title Unit 0: IT Fundamental & Procedural Programming Academic Year 2021 Unit Tutor Assignment Title Assignment 1: Analysis and Design a solution for procedural programming problem Issue Date Submission Date IV Name & Date Learning Outcomes and Assessment Criteria Pass Merit Distinction LO1 Understand the principles of procedural programming LO2 Be able to design procedural programming solutions P1 Provide an introduction to procedural programming M1 Discuss on characteristics and features of procedural programming D 1 Critically evaluate the design of your solution against the characteristics and features of procedural programming. P2 Identify the program units and data and file structures required to implement a given design M2 Review the design of a procedural programming solution. P3. Design a procedural programming solution for a given problem Assignment Brief Scenario: A math teacher wants to manage grades of a class. He asks you to help him to write a small application to do that. He needs to enter student IDs, student’s grades and store these information into 2 separate arrays
(integer array for IDs and float array for grades). Then he needs to print all student IDs together with their grades. Finally, he needs to know which student has highest grade and lowest grade. Your program should be menu based with the options above. When an option is done, the program should go back to the main menu so he can choose another option. There should be an option to quit program. Task 1 To prove your programming ability to be appointed to this small project, please prepare an illustrated guide on programming in general and a particular emphasis on procedural programming. Here you will need to include introduction to computer programming languages and discuss key features of procedural programming. Task 2 Your next task is to do the analysis for the scenario mentioned above by doing the following subtasks
P a g e | 1 ASSIGNMENT 1 ANSWERS
a. Definition: Writing a strategy for a computer to perform one or more tasks, computer programming languages are known as special-purpose languages designed for programmers. It defines a set of coding rules that help programmers create guidelines for performing computational tasks. Different programming languages have their own rules. Computer Programming Languages b. Classification of Programming Languages:
P a g e | 3 C++ Languages C# Languages
P a g e | 4
1. Definition: C is a high-level, general-purpose programming dialect that's perfect for creating firmware and convenient applications. Dennis Ritchie developed C for the Unix Working System at Bell Labs in the early 1970s to compose a writing system software. C is one of the foremost widely-used programming dialects, with compilers for all intents and purposes for every computer stage. It has impacted several other dialects, the foremost eminent of which is C++. 2. Advantage and Disadvantage C language: Advantage & Disadvantage C Language
P a g e | 6 Since C is based on ASCII characters, it works well over diverse stages counting Windows, Linux, Mac OS X, Android, iOS, etc. In this manner, you'll be able to run your C programs anyplace in any case where you live. g) Easy debugging: Since C doesn't require complex articulations like circles, conditionals, factors, capacities, clusters, pointers, etc., you'll investigate your code effectively. For illustration, in case you experience issues while executing your program, just press CTRL+D to stop the method quickly. At that point, you'll essentially step back one line and proceed to work until you reach the tricky articulation. h) Procedure Oriented Language: Users make methods or capacities to execute their errands in C Dialect. It's exceptionally simple to memorize a procedure-oriented dialect since of the way it works (calculation to execute the articulations you type in). On the off chance that you need to create a program using a procedure-oriented dialect, you wish to outline a calculation and begin changing over it into a function. i) Speed of Compilation: The C compiler produces machine code exceptionally quickly. Near to a thousand lines of code can be put together in a handful of seconds. The C Compiler makes the code more productive for quicker execution. j) Execution of algorithms and data structures: Execution of calculations and information structures. The utilization of calculations and information structures in C has made program calculations greatly fast and smooth. Hence, the C dialect can be utilized in complex estimations and assignments. k) Dynamic memory allocation: In C languages you'll be able to distribute memory powerfully or statically. In energetic allotment, we do not know how much space will be required for our information structure at run time. But if we use inactive allotment at that point we ought to save a settled sum of memory sometime recently beginning the execution of the application. So this highlight makes us more adaptable than other dialects like Java where we must pronounce all factors as last. 2.2. Disadvantages of C language: a) Lack of Object Orientation: C may be an exceptionally tremendous and capable dialect and essentially takes after the procedural programming approach. It doesn't amplify its bolster to the concept of OOPs. Here, you can't take a course with numerous legacies like Java, Python, or C++. In OOP dialects like
P a g e | 7 Java, we are able to acquire strategies from the parent lesson. But there's nothing comparative within the C dialect. We cannot make subclasses for our classes. So it makes it troublesome to reuse existing codes. b) Inefficient Memory Management: In C languages you do not require any memory administration methods since it naturally oversees all distributed assets for you. But in case you need to utilize energetic allotment at that point you ought to distribute powerfully by malloc work. If you are doing this physically at that point, you may get a division blame mistake. So we must continuously keep in mind almost Memory Administration Strategies. c) No Garbage Collection: Trash collection may be a feature that consequently recovers memory from objects not required by an application or library. It can be utilized for both automatic and manual rubbish collection. Programmed waste collection happens when there's deficiently free space on the pile to distribute modern objects; this may happen since all accessible physical Slam was apportioned to other forms running on the computer framework. The manual waste collection includes expressly liberating unused squares of memory with calls to capacities such as malloc. But in C/C++ languages, there's no such highlight of waste collection as the culture of these dialects is to take off capacity administration to the engineer or software engineer. Subsequently, it would be repetitive and cruel on pockets to execute an exact waste collector for C / C++. d) Run-time checking: Within the C programming, the blunders are not identified after each line of code. The compiler shows all the blunders within the code as they were amid the run-time of the complete which makes the checking of code (debug) especially complex in gigantic ventures. Also, the compiler doesn't check whether a variable was pronounced sometime recently utilize. The software engineer must keep in mind this run the show while composing programs. e) Concept of namespace is not present in C: C doesn't carry out the thought of namespaces. The namespace is a chain of commands to allow the reuse of names in different settings. Without namespaces, we can't articulate two components of a comparative title. However, C programming is destitute of this include, and subsequently, you can't characterize a variable with the same title in C. f) Absence of Exception Handling: Extraordinary case Taking care of is maybe the most component of programming tongues. Whereas compiling the code, distinctive blunders and bugs can happen. Special case Dealing with grants you to distinguish the bugs and rectify them. Be that because it may, C doesn't appear as this noteworthy feature.
P a g e | 9 Web applications, portable applications, implanted firmware, etc. The sort of application you’re developing intensely impacts what dialects are accessible for us to select from. General programming dialects like Java, JavaScript, Python, and C# can construct distinctive sorts of applications on diverse stages. There are cases where particular dialects work way better. For example, building a local Android app requires knowledge of Java, and creating a local iOS app requires a Swift or Objective-C ability set. At the same time, the information in C or C++ is basic on the off chance that you’re working with embedded firmware. 4.2. The complexity of the application: The size and complexity of a extend play a vital part in choosing which stack or innovation we need to utilize, which in turn may be a choosing figure on what programming dialect to utilize. Little ventures such as straightforward showcasing locales, portfolio presentations, and basic web application shapes to gather information can be done with a few CMS frameworks like WordPress or Umbraco, which require information of PHP or C#, separately. Medium-sized ventures counting e-commerce locales, inner undertaking applications, and IoT arrangements ordinarily have distinctive layers, components, and integrative where a more common programming dialect such as Java or C# may offer assistance rearrange ability set prerequisites to preserve the items. We regularly break down complex applications into littler components where each element serves a particular work and employments a diverse innovation stack and dialect to abdicate the most excellent result. 4.3. Maintainability: Each innovation stack and dialect comes with a biological system of libraries and seller underpins for those libraries. We need to see at the slant and upgrade discharge cycles to create beyond any doubt what we choose is current and remains current for a few times to come. Whereas we like to lock in with our clients long-term, we get it that at some point we may move a codebase to another group. In case you arrange to enlist an inner engineer group to preserve your innovation stack, maintenance costs will be affected by the accessibility and mastery of advanced ability in your region. For illustration, within the Midwest, it’s simpler to enlist Java and C# designers than Ruby, Python, or PHP designers. We take this into
P a g e | 10 consideration when selecting a programming dialect to guarantee the long-term supportability of the codebase. 4.4. Security: Each application has distinctive prerequisites in terms of security. For illustration, healthcare- related applications might require HIPAA compliance or monetary applications might require PCI compliance. We moreover take more common security suggestions just like the OWASP Best 10 into thought when choosing the proper stack. Keeping an eye on the security bulletin for your chosen stack will offer assistance to the application be more vigorous. It’s vital to note that in a post-monolithic computer program world, innovation choices aren’t commonly selected within an application environment. We’re progressively actualizing microservice models so we are able to run personal administrations built on disparate programming dialects and systems. In that way, ready to guarantee that each particular assignment is being served by the leading conceivable stage. With our breadth of encounter and mastery and by staying to the trademarks of great code – Viability, Straightforwardness, DRY, Strong, and Testability, we are able reliably to guide our clients to the most effective technology solution. 4.5. Scalability and performance: Scalability is more around an innovation stack, which in turn decides the programming dialects instead of the programming dialect itself. A few battle-tested and well-known stacks that have demonstrated to be able of such versatility incorporate .NET, Light, Cruel, and Java Spring.
1. Variables and Data Types: a. Variable: A variable may be a title for a memory zone where a program may change information. This area is utilized to store the variable’s esteem. The C variable’s esteem can be modified within the program. Here, the sort must be a substantial C information sort counting char, w_char, int, float, double, bool, or any user-defined question; and variable_list may comprise one or more identifier names isolated by commas. A few substantial announcements appear here.
P a g e | 12 The program utilizes an add-up to primary factors. Three drift factors and three int factors are included. The table underneath contains data on these factors, such as their names and information sorts.
2. Identify the variables and data types required in the program: Table of Variables Variable’s name Data type Explanation Grade[50] float It is the pupils' grades using float because it allows to use real numbers. IDs[50] int It displays identification int since it only contains integers. Max ID, Min ID int - It displays the ID with the highest or lowest grade.
P a g e | 13 Primitive (Primary) Data Types These data types store fundamental data used in the C programming such as integer(int), floating-point(float), char, etc.