









































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










































Unit Title Programming Assignment Number Assignment 01^ Assessor^ Ms. A.M.L. Chamini Submission Date 4 th^ of September 2022 Date Received 1st submission
Re-submission Date Date Received 2nd submission Assessor Feedback: LO1 Define basic algorithms to carry out an operation and outline the process of programming an application Pass, Merit & Distinction Descripts P1 M1 D LO2 Explain the characteristics of procedural, object-orientated and event-driven programming Pass, Merit & Distinction Descripts P2 M2 D LO3 Implement basic algorithms in code using an IDE Pass, Merit & Distinction Descripts P3 (^) M3 D LO4 Determine the debugging process and explain the importance of a coding standard Pass, Merit & Distinction Descripts P4 P5 (^) M4 D Grade: Assessor Signature: Date: Resubmission Feedback:
Formative Feedback: Assessor to Student Action Plan Summative feedback Feedback: Student to Assessor Assessor signature Date Student signature Date
Student Declaration I hereby, declare that I know what plagiarism entails, namely, to use another’s work and to present it as my own without attributing the sources in the correct way. I further understand what it means to copy another’s work.
4.4 Critically evaluating why, a coding standard is necessary for the team as well asfor the individual ................................................................................................................................... 43 References ..................................................................................................................................... 45
1.1 What is an Algorithm Algorithm is a series of steps for solving problem, using a particular technique. Writing an algorithm is one of the first steps taken in preparing a task to be done by a computer. An algorithm must be very precise in terms of the different steps that make up a task. (Bishop, 1982) And the Coding is the process of designing and building an executable computer program to accomplish a specific computing result and is one of the most important tools in the hands of computer programmers. (Singh, 2020) 1.1 (I) Different between Coding and Algorithm In computer programming, the coding is used to define repetitive functions like managing display of a device, validating transactions, etc. Code is an order of steps which is handed over to a computer in such a way and language that it can understand and execute the commands. Algorithms are considered as high level and complex mechanisms with different levels of complexity depending on the type of code used. (Singh, 2020) 1 .1 (II) Flowchart and Pseudocode Flowchart Flowchart is a pictorial representation of an algorithms. Flowchart use an intellectual scheme of operations in boxes connected by lines and arrows that graphically show the flow of control in an algorithm. The main direction of flow is accepted as being top to bottom and left to right. (Anon., 1995)
Ex: - Display ‘Hello’ five times. Advantages and disadvantages Advantages Flowcharts a. Easy to understand. b. It helps in debugging process. c. Programs can be easily analyzed with the help of Flowcharts d. Easy to trace errors. (aggarwal, 2022) Pseudocode a. Can easily modify. b. Implements structured concepts. c. Done easily on word processor.
Disadvantages Flowcharts a. Hard to Modify. b. Structured design elements are nor implemented. c. Special software required. Pseudocode a. Not visual b. Not having an accepted standard.
Total income from the rooms.
Gross Income Total expenses
Net operating profit
Debugging Finding and fixing any faults or problems that were discovered is crucial. Debugging is the term for this. This is accomplished by repeatedly executing the software. Final documentation When the program is tested and debugged, it is documented. By documenting it, the user can execute the software as efficiently as possible, and any other programmers can tweak it as needed.
A program is a set of instructions for a specific goal, but an algorithm is a sequential, logical approach. An algorithm is a methodical technique for tackling a particular problem. In order to program more effectively, programmers need to have a solid understanding of algorithms. Programmers should be equally aware of the distinctions between algorithms and programs. Problems are solved by computer algorithms, which are then implemented by computer programs in a way that a computer can carry out. The key distinctions between algorithms and programs are as follows
A paradigm is a strategy for tackling a challenge or completing a task. Programming paradigms are ways to solve a problem using a programming language, or ways to use tools and techniques that are available. There are multiple programming languages, all languages need to follow some strategies when implemented. These strategies or methods called as paradigm. There are lots of paradigms to fulfill every demand. (Rani, 2022) 2.1 Procedural programming paradigm A procedural programming paradigm defines as a programming paradigm that allows being organized to a program, as a set of functions. It aims to divide a large program into small procedures that can be manageable. In this case, a program is primarily comprised of a sequence of instructions that guide the computer to do a task, such as reading user inputs, completing the calculations and printing the output. Procedures are also known as subprograms, subroutines, methods, or a function.
Some programming languages that cam implement procedural programming are, Java, C, C++, Pascal, CloudFusion 2.1 (I) Characteristics of a procedural programming
2 .1 (III) Disadvantages Prioritizes operations - It might not be appropriate for projects involving data-sensitive materials since it prioritizes procedures and functions over data. Exposes data - Procedural programming doesn't provide as much security as other coding languages because every data entered into the code is visible during the entire process. Offers single-use - Professionals cannot reuse the same code for other projects even though procedural programming language features allow for partial reuse for the same project. 2.2 Object-oriented programming paradigms A programming paradigm known as object-oriented programming (OOP) links the structures of data with a group of operators that interact with the data. An object is a specific instance of such a thing. In other terms, OOP refers to a programming approach where objects are the building blocks of programs. These objects each stand for a particular class instance. All classes belong to a hierarchy of classes that are connected by the idea of inheritance. C++, C#, Java, JavaScript, Visual Basic.NET, and Python are a few examples of OOP languages. There are mechanisms in every OOP language that aid in the implementation of the object-oriented model. They are inheritance, polymorphism, reusability, and encapsulation.