Programming Paradigms: Procedural, Object-Oriented, and Event-Driven, Study Guides, Projects, Research of Computer science

Three fundamental programming paradigms: procedural, object-oriented, and event-driven. It delves into their definitions, key features, advantages, and disadvantages, providing a comprehensive understanding of their strengths and weaknesses. The document also discusses the role of integrated development environments (ides) in software development, highlighting their features and benefits for developers. It further examines the importance of debugging in identifying and fixing security vulnerabilities, emphasizing the use of breakpoints, step-through techniques, and memory management tools. The document concludes with a discussion on coding standards and best practices for writing clean and maintainable code.

Typology: Study Guides, Projects, Research

2023/2024

Uploaded on 12/12/2024

phong-nguyen-42
phong-nguyen-42 🇭🇰

4 documents

1 / 65

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT FINAL REPORT
Qualification
BTEC Level 5 HND Diploma in Computing
Unit number and title
Unit 1: Programming
Submission date
Date Received 1st submission
Re-submission Date
Date Received 2nd submission
Student Name
Student ID
Class
Assessor name
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41

Partial preview of the text

Download Programming Paradigms: Procedural, Object-Oriented, and Event-Driven and more Study Guides, Projects, Research Computer science in PDF only on Docsity!

ASSIGNMENT FINAL REPORT

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 1: Programming

Submission date Date Received 1st submission

Re-submission Date Date Received 2nd submission

Student Name Student ID

Class Assessor name

Plagiarism

Plagiarism is a particular form of cheating. Plagiarism must be avoided at all costs and students who break the rules, however innocently,

may be penalised. It is your responsibility to ensure that you understand correct referencing practices. As a university level student, you

are expected to use appropriate references throughout and keep carefully detailed notes of all your sources of materials for material you

have used in your work, including any material downloaded from the Internet. Please consult the relevant unit lecturer or your course

tutor if you need any further advice.

Student Declaration

I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I declare that the

work submitted for assessment has been carried out without assistance other than that which is acceptable according to the rules of the

specification. I certify I have clearly referenced any sources and any artificial intelligence (AI) tools used in the work. I understand that

making a false declaration is a form of malpractice.

Student’s signature

Grading grid

P1 P2 P3 P4 P5 P6 M1 M2 M3 M4 D 1 D 2 D 3 D 4

Table of Content

  • Introduce:.....................................................................................................................................................................
  • Content:
    • Part1 : Provide a definition of what an algorithm is and outline the process in building an application.
      • 1:The definition of algorithm.
      • 2:The Charactericstics.......................................................................................................................................
        • 2.1:Some keys of characteristics algorithm:
      • 3: how to algorithm representation.................................................................................................................
      • 4: The example...................................................................................................................................................
        • 4.1Example in life: Real life example of boiling eggs
        • 4.2: Math example: Compare and fined the largest number among 2 numbers.
    • Part 2: Analyse the process of writing code, including the potential challenges faced.
      • A. Steps to create a program
      • Step in program developed...............................................................................................................................
        • Step1: Problem definition:
        • Step 2: Designed program:
        • Step3: Coding:
        • Step4: Debugging and Testing the Program.
        • Step5: Documenting the Program:...............................................................................................................
        • Step6: Deploying and Maintaining the Program:........................................................................................
      • B. Difficulties that will be faced during the program creation process.
    • Part 3: Determine the steps taken from writing code to execution
        1. Assignment:.
        1. Assignment analysis:.................................................................................................................................
        • a) ABC Company requires input:
        • b) ABC Company requires output:
        1. Program planning and design:
        • incorrect. a) Allow input "name", "quantity of water", and can check if input is correct and force re-enter if
        • b) Select customer type.
        • c) Calculate water bill.
        • d) Print out the invoice
      1. Functions and functional analysis:...........................................................................................................
      • incorrectly. a) The function checks that the input "name" contains only letters, re-enter if it is entered
      • incorrectly. b) The function checks if the input "this water, last water" is a number, re-enter if it is entered
      • c) Function to re-enter water quantity when(this water < last water)
      • d) Function to enter customer category by 'key'.
      1. Program Execution Steps:.........................................................................................................................
      • Step1:..............................................................................................................................................................
      • Step2:..............................................................................................................................................................
      • Step3:..............................................................................................................................................................
      • Step4:..............................................................................................................................................................
      • Step5:..............................................................................................................................................................
      • Last step: Print the bill.
  • Part 4: Explain the characteristics of procedural, object-oriented and event-driven programming
      1. Procedure-oriented programming...........................................................................................................
      • 1.2: Main features of procedural programming:.........................................................................................
      • 1.3: Advantages and Disadvantages of procedural programming.............................................................
      • 1.4: When to Use Procedural Programming.
      • 1.5: When to Avoid Procedural Programming.
      1. Object-Oriented Programming (OOP) Paradigm.
      • 2.2: The main features of object - orientated.
      • 2.3: Advantages and Disadvantages of Object-Oriented Programming.
      1. Event-Driven Programming Paradigm.
      • 3.2: Main functions of Event-Driven Programming Paradigm...................................................................
      • 3.3: When to use event-driven programming model..................................................................................
      • 3.4: Advantages and Disadvantages of Event-Driven Programming Paradigm.
      1. The relationship between the above 3 programming models...............................................................
  • Part 5(P4 + M3): Implement basic algorithms in code using an IDE
      1. Write a program that implements an algorithm using an IDE
      1. Analyze the common features that a developer has access to in an IDE.
    • a) Examples of Popular IDEs:........................................................................................................................
      • b) Benefits of Using an IDE:...........................................................................................................................
    • Part 6: Determine the debugging process and explain the importance of a coding standard
        1. Explain the debugging process and explain the debugging facilities available in the IDE.
        • a) The typical debugging process consists of the following steps:
        • Reproduce the Bug
        • b) Debugging Facilities Available in IDEs
        • c) Benefits of Debugging.
        • d) Debug process in the program.
        1. Explain the coding standard you have used in your code
        • a) The definition of coding standard.
        • benefits: b) There are many reasons to use coding standards in programming, here are the main
  • Conclusion.
  • Material:
  • Figure 0-1: Algorithm TABLE OF FIGURE
  • Figure 0-2Example of Algorithm
  • Step 1: prepare Eggs
  • Step 2: Add water
  • Step 2: Remove eggs
  • Figure 0-3: Example Compare Algorithm....................................................................................................................
  • Figure 0-4: Step1
  • Figure 0-5: Step
  • Figure 0- 6 : Step
  • Figure 0-7: Step
  • Figure 0-8: Debugg
  • Figure 0-9: Example Algorithm
  • Figure 0-11:Example Algorithm
  • Figure 0-12:Example Algorithm
  • Figure 0-13: Draw.io Asm1
  • Figure 0-14 : ASM
  • Figure 0-15: ASM 1......................................................................................................................................................
  • Figure 0- 1 7: ASM 1......................................................................................................................................................
  • Figure 0-18: ASM 1......................................................................................................................................................
  • Figure 0-19: ASM 1......................................................................................................................................................
  • Figure 0-20: BILL..........................................................................................................................................................
  • Figure 0-21: RESULT
  • Seqence of In struction
  • Function
  • Global Data
  • Control
  • Moduarity
  • Object programming
  • Encapsulation..............................................................................................................................................................
  • Polymorphism
  • Code ASM
  • Code ASM
  • Code ASM
  • Code ASM
  • Code ASM
  • Code ASM
  • Code ASM
  • Code ASM
  • Code ASM
  • Code ASM
  • Code ASM
  • STEP 1: Set breakpoint
  • STEP 2: Debugging process
  • STEP 2: Debugging process
  • lOG IN FORM
  • Figure 0-22: PASCAL CASE...........................................................................................................................................

Figure 0-23: CAMEL CASE ........................................................................................................................................... 60 Figure 0-24: ALL CAP ................................................................................................................................................... 60 Figure 0-25: CLASS ...................................................................................................................................................... 61 Figure 0- 2 6: LAYOUT STANDARD ................................................................................................................................ 62 Figure 0-27: COMMENT STANDARD ........................................................................................................................... 63

Introduce:

I have applied for a post as a trainee with a software development company and have been invited

for an interview. I have been asked to demonstrate your problem solving and basic programming

skills. To do this I have to prepare a report on using algorithms to solve problems. In this

assignment I will explain what is algorithm, and ouline process in building application.

Vocational Scenario:

1. Create a program that can import:

 Customer name

 Last month’s water meter readings

 This month’s water meter readings

2. For each customer, an invoice with the following information can be displayed:

 the customer name

 Last month’s water meter readings

 This month’s water meter readings

 Amount of consumption (This month’s water meter readings - Last month’s water meter

readings)

 Total water bill

 Sort, search for customer, generate invoices notifying customer and payments dues is one of

the feature enhancement suggestions.

3. Explain some of programming paradigms. Evaluate why and how your program use these (or

some of) paradigms.

4. Explain the common features of an IDE should have and evidence of how the IDE was used to

manage the development of your code

Figure 0 - 2 Example of Algorithm

2:The Charactericstics

- An algorithm is a properly defined sequence of steps or commands designed to clear up a

selected problem or perform a selected task. It is a scientific method to problem-fixing that

outlines the important movements or operations to be accomplished in a clean and

unambiguous manner. Algorithms can be expressed in various bureaucracy, along with

natural language, pseudocode, flowcharts, or programming languages.

2.1:Some keys of characteristics algorithm:

- Well-described steps: Algorithms are composed of a specific and unambiguous set of

instructions or steps that can be observed to perform a selected task or solve a problem. Each

step ought to be well-defined, leaving no room for ambiguity or confusion.

- Input and output: Algorithms take inputs, which might be the preliminary records or facts

furnished to the algorithm, and produce outputs, which are the results or solutions generated

by using the set of rules after processing the inputs. The relation among the inputs and outputs

is decided by means of the algorithm's good judgment.

- Correctness: Algorithms must be designed to produce correct results for all legitimate inputs

inside their domain. They must accurately solve the problem they may be designed for, and

their outputs must match the anticipated consequences.

- Understandability: Algorithms need to be designed with clarity and ease in mind, making them

easy to apprehend and implement. Well-documented and readable code can enhance the

understandability of an algorithm.(javatpoint.com)

3: how to algorithm representation

- Flowcharts are a traditional and straightforward way to represent the steps of an algorithm.

They use different shapes to denote different types of actions or steps, such as processes,

decisions, and inputs/outputs, connected by arrows indicating the flow of control.

4 : The example.

4.1Example in life: Real life example of boiling eggs

- Step1: Prepare some eggs and put them in the pot.

Step 1: prepare Eggs 1

- Step 2: Add water to the contents and turn on the stove.

4.2: Math example: Compare and fined the largest number among 2 numbers.

Figure 0 - 3 : Example Compare Algorithm

Part 2: Analyse the process of writing code, including the potential challenges faced.

A. Steps to create a program

Step 1: Click on "Visual Studio", and select "Create a new project".

Figure 0 - 4 : Step

Step 2: Then go to the search bar and type "Console App(Net)", then select.

Figure 0 - 5 : Step 2

Step in program developed.

Step1: Problem definition:

- The first step in the program development cycle is to define the problem. This is done by

identifying and understanding why is the program or software developed. Usually, it’s in the

form of a program specification. In larger development teams, the system analyst is

responsible for this step.

- The program specification defines the problem statement, what is required from the

software development team, and what is the output of the solution to the problem they’ve

been tasked with solving.(pangea.AI)

Step 2: Designed program:

- The next step in the process is to design the program itself. This process starts by focusing on

the program's main goal, which the team defined in the previous step. The goal is then

broken down into manageable parts, all of which play a different role in helping achieve the

goal.

- The well designed program is had to easier to read and understand later. Less of bugs and

errors. Easier to extend to add new features. Easier to program in the first place

 computation

 Another way is to use support from the IDE

2. Testing:

 Testing is the process of executing a program with the deliberate intent of finding

errors

 Testing is needed to check whether the expected output matches the actual output

 Testing is done during every phase of program development

 Initially, requirements can be tested for its correctness

 Then, the design (algorithm, flow charts) can be tested for its exactness and efficiency

Step5: Documenting the Program:

- After the testing is complete, the PDLC has reached its final stages. All the structure charts,

flowcharts, decision tables, and pseudocode that were designed and used during the design

phase are now part of the documentation that other people involved in the software project

can use.

- Document explains

 How the program works and how to use the program (user manual)

 How to maintain the program (developer manual)

 Details of particular programs, or particular pieces of programs, are

- easily forgotten or confused without suitable documentation

Step6: Deploying and Maintaining the Program:

- The final step involves deploying the program for the customer. Usually, the development

team keeps a tab on the project for some time, as this is usually the stage where actual usage

problems can be seen.

1) Program maintenance

 Continuing process of maintenance and modification

 To keep pace with changing requirements and technologies

2) Maintainability of the program is achieved by

 Modularizing it

 Providing proper documentation for it

 Following standards and conventions (naming conventions, using symbolic constants,

etc.)

B. Difficulties that will be faced during the program creation process.

1. Setup and Configuration Issues

Installation Issues : Sometimes Visual Studio may not install properly or may be missing

components needed to build a project. Ensuring the correct version and required

components (e.g. .NET, C++ tools, Python support) are installed can be time consuming.

Incorrect IDE Settings: Incorrect IDE settings, such as compiler paths or environment

variables, can lead to build errors.

2. Compilation errors

Syntax errors: This is a very common error that I encounter, and can be difficult to diagnose

if the code is large or the error message is unclear.

Link errors: These errors occur when the compiler cannot find the required functions or

objects. These errors can be frustrating to troubleshoot, especially if the error message is

unclear or if dependencies are not linked correctly.

Part 3: Determine the steps taken from writing code to execution

1. Assignment:.

- The CEO of the company has reviewed the client requirements and has determined that this

is a suitable project for you to take on. The company wants to see how you use and apply the

development environments and code standards.

- The requirements are that ABC wants a program that will allow a user to enter the

- following information:

o Customer name

o Last month’s water meter readings

o This month’s water meter readings

- The program can allow user to enter type of customer, enter number of people to know if it’s

a household

Househol

d

customer

To 10people 5.973VND/m3 597,

10 - 20people 7.052VND/m

20 - 30people 8.699VND/m

Over 30

people

15.929VND/

m