Assignment 2-Programming, Assignments of C programming

It's complete and detailed.It can help you pass

Typology: Assignments

2020/2021

Uploaded on 01/10/2022

name-no-6
name-no-6 🇻🇳

4.8

(10)

12 documents

1 / 29

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 2 FRONT SHEET
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
Phạm Vĩnh Hưng
Student ID
GCH200724
Class
GCH1002
Assessor name
Đinh Đức Mnh
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
Hung
Grading grid
P2
P3
P4
P5
M2
M3
M4
D2
D3
D4
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d

Partial preview of the text

Download Assignment 2-Programming and more Assignments C programming in PDF only on Docsity!

ASSIGNMENT 2 FRONT SHEET

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 Phạm Vĩnh Hưng Student ID GCH Class GCH1002 Assessor name Đinh Đức Mạnh 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 Hung Grading grid P2 P3 P4 P5 M2 M3 M4 D2 D3 D

 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date: Lecturer Signature:

Chapter 1 – Introduction to your program

1.1 Introduce the Overview/ Context of the problem

I passed the presentation to demonstrate problem solving and basic programming skills. now I have to create a working, secure application that has been developed using an IDE and adheres to coding standards for a detailed business problem.

1.2 List out application’s requirements

Chapter 2 – Explain programming paradigms

2.1 Explain what is Procedural Programming with source

code and illustrations

Procedural programming is a term used to denote the way in which a computer

programmer writes a program. This method of developing software, which also is

called an application, revolves around keeping code as concise as possible. It also

focuses on a very specific end result to be achieved.

The characteristics of Procedural Programming are:

  • Procedural programming follows a top-down approach.
  • The program is divided into blocks of codes called functions, where each function performs a specific task.
  • Procedural programs model real-world processes as 'procedures' operating on 'data'.
  • The data and functions are detached from each other.
  • The data moves freely in a program.
  • It is easy to follow the logic of a program.
  • A function can access other function's data by calling that function.

This is an example of procedural programming. it must take turns adding the numbers together in the order of the number before adding the number later in the sequence. Then, iterating continuously until the last number, we get the sum of the series of numbers.

2.2 Explain what is Object-Oriented Programming with

source code and illustrations

Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic. An object can be defined as a data field that has unique attributes and behavior.

2.3 Explain what is Event-Driven Programming with source

code and illustrations

In software development, event-driven programming is a programming model in which all business logic is performed in the program's source code. The program's runtime flow will be determined based on events. Events here can be: (Mr.Shun, 2018)

  • Click the button on the screen
  • Press the key on the keyboard
  • Hover
  • Timeout Characteristics of Event-Driven Programming are:
  • Service orientated: Service oriented is a programming paradigm that is used to write programs that are made for services.
  • Time driven:
  • Event handlers:
  • Trigger functions:
  • Events(Mouse, keyboard and user interface):
  • Pre-defined functions:
  • Local variables:
  • Parameter passing:

2.4 Conclude which paradigms will be used to develop the

application with explanation

Firstly, I use procedural programming so that the program runs step by step, it makes my program easy to see and read and easy to remove or add new features. Secondly, I use object-oriented programming to classify and use the properties of objects. An object has many properties. Finally, event-oriented is used to create events, connecting actions in the program.

Debugger: A program for testing other programs that can graphically display the location of a bug in the original code.

3.3 An explanation and evaluation of the debugging

process in the IDE used and how it helped with

development.

What Does Debugging Mean? Debugging is the routine process of locating and removing computer program bugs, errors or abnormalities, which is methodically handled by software programmers via debugging tools. Debugging checks, detects and corrects errors (or "bugs") to allow proper program operation, according to set specifications.

How debugging works in software? To debug a program, user has to start with a problem, isolate the source code of the problem, and then fix it. A user of a program must know how to fix the problem as knowledge about problem analysis is expected. When the bug is fixed, then the software is ready to use. Debugging tools (called debuggers) are used to identify coding errors at various development stages. They are used to reproduce the conditions in which error has occurred, then examine the program state at that time and locate the cause. Programmers can trace the program execution step-by-step by evaluating the value of variables and stop the execution wherever required to get the value of variables or reset the program variables. Some programming language packages provide a debugger for checking the code for errors while it is being written at run time. Here’s the debugging process:

  1. Reproduce the problem.
  2. Describe the bug. Try to get as much input from the user to get the exact reason.
  3. Capture the program snapshot when the bug appears. Try to get all the variable values and states of the program at that time.
  4. Analyse the snapshot based on the state and action. Based on that try to find the cause of the bug.
  5. Fix the existing bug, but also check that any new bug does not occur.

3.4 Evidences that you have used debugging during the

implementation

Firstly, I couldn't add students to the list so I ran debug to find the error. It detected an error in the Checkcontrol function

3.5 An evaluation of developing applications using an IDE

versus developing an application without using an IDE.

Less time and effort This is what helps a program that uses an IDE overtake a program that doesn't use an IDE. We can save a lot of time and effort Enforce project or company standards Simply by working in the same development environment, a team of developers will adhere to a standard way of doing things. without an IDE everything would be messy Conslusion In my opinion it is better to use the IDE in the program than not to use it

Chapter 4 – Design and Implementation

4.1 Flowchart of the application

Input and add button

Edit button

Delete button Search button

4.2 Source code and screenshots of the final application

with explanation

I use the public bool CheckControl function to check if the user has entered all student information. The function IsNullOrWhiteSpace is used to check whether the user has entered or not and then notify the user. txtID.Focus will take the user to a place where they haven't entered. If the user has entered it completely then the function returns true.

I create a Student class that includes the fields string ID, string Name, double Grade and assign data to them in the Student function