You are on page 1of 41

Higher Nationals in Computing

Unit 1: Programming
ASSIGNMENT 2

Learner’s name: Tran Ngoc Chau


ID: GCS18804
Class: GCS0905A
Subject code: 1618
Assessor name: PHAN MINH TAM

Assignment due: Assignment submitted:


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 Tran Ngoc Chau Student ID GCS18804

Class GCS0905A 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

Grading grid
P2 P3 P4 P5 M2 M3 M4 D2 D3 D4
❒ Summative Feedback: ❒ Resubmission Feedback:

Grade: Assessor Signature: Date:

Signature & Date:


Assignment Brief 2 (RQF)
Higher National Certificate/Diploma in Computing

Student Name/ID Number:


Unit Number and Title: Unit 1: Programming
Academic Year: 2021 – 2022
Unit Assessor: Phan Minh Tam
Assignment Title: Application development with IDE
Issue Date: 27 September 2021
Submission Date:
Internal Verifier Name:
Date:

Submission Format:

Format:

● The submission is in the form of an individual written report. This should be written in a concise,
formal business style using single spacing and font size 12. You are required to make use of headings,
paragraphs and subsections as appropriate, and all work must be supported with research and
referenced using the Harvard referencing system. Please also provide a bibliography using the
Harvard referencing system.

Submission

● Students are compulsory to submit the assignment in due date and in a way requested by the Tutor.
● The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/.
● Remember to convert the word file into PDF file before the submission on CMS.

Note:

● The individual Assignment must be your own work, and not copied by or from another student.
● If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must
reference your sources, using the Harvard style.
● Make sure that you understand and follow the guidelines to avoid plagiarism. Failure to comply this
requirement will result in a failed assignment.

Unit Learning Outcomes:

LO2 Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an
analysis of a suitable Integrated Development Environment (IDE)

LO3 Implement basic algorithms in code using an IDE


LO4 Determine the debugging process and explain the importance of a coding standard

Assignment Brief and Guidance:

Assignment scenario

Scenario: You have applied for a post as a trainee with a software development company and have been
invited for an interview. You have been passed the presentation to demonstrate your problem solving and
basic programming skills. Now you are given a more challenge task to create a fully working, secure
application that has been developed using an IDE and adheres to coding standards for a detailed business
problem.

Tasks
You will discuss a suitable problem with your mentor and list the user requirements before designing,
implementing (coding) and testing a solution. You will create a report that should include:
● Introduction to your program (list of requirements and screenshots of program)
● Explain some of programming paradigms. Evaluate why and how your program use these (or some of)
paradigms.
● Explain the common features of an IDE should have and evidence of how the IDE was used to manage
the development of your code.
● An evaluation of developing applications using an IDE versus developing an application without using an
IDE.
● An explanation and evaluation of the debugging process in the IDE used and how it helped with
development.
● An explanation and evaluation of coding standards used in your program and the benefits to
organisations of using them.

The working application produced must also be demonstrated together with the presentation.

Case Studies
You can choose one of following case studies to implement

Hotel Management System:


A Hotel Management System is a software built to handle all online hotel activities easily and safely. This
System will give the hotel management power and flexibility to manage the entire system from a single
online portal. The system allows the manager to keep track of all the available rooms in the system as well
as to book rooms and generate bills.
1. The system should support the booking of different room types like standard, deluxe, family suite, etc.
2. Guests should be able to search the room inventory and book any available room.
3. The system should be able to retrieve information, such as who booked a particular room, or what rooms
were booked by a specific customer.

Library Management System


A Library Management System is a software built to handle the primary housekeeping functions of a library.
Libraries rely on library management systems to manage asset collections as well as relationships with their
members. Library management systems help libraries keep track of the books and their checkouts, as well
as members’ subscriptions and profiles.
Library management systems also involve maintaining the database for entering new books and recording
books that have been borrowed with their respective due dates.
1. Any library member should be able to search books by their title, author, subject category as well by the
publication date.
2. The system should be able to retrieve information like who took a particular book or what are the books
checked-out by a specific library member.
3. User can add books with its information such as: title, author, publication date, category etc and update
it

Movie Ticket Booking System


An online movie ticket booking system facilitates the purchasing of movie tickets to its customers. E-
ticketing systems allow customers to browse through movies currently playing and book seats, anywhere
and anytime.
1. Each cinema can have multiple halls and each hall can run one movie show at a time.
2. Each Movie will have multiple shows.
3. Customers should be able to search movies by their title, language, genre, release date, and city name.
4. The customer should be able to select a show at a particular cinema and book their tickets.

Airline Management System


An Airline Management System is a managerial software which targets to control all operations of an airline.
Airlines provide transport services for their passengers. They carry or hire aircraft for this purpose. All
operations of an airline company are controlled by their airline management system.

This system involves the scheduling of flights, air ticket reservations, flight cancellations, customer support,
and staff management. Daily flights updates can also be retrieved by using the system.
1. Customers should be able to search for flights for a given date and source/destination airport.
2. Customers should be able to reserve a ticket for any scheduled flight. Customers can also build a multi-
flight itinerary.
3. Users of the system can check flight schedules, their departure time, available seats, arrival time, and
other flight details.
4. The admin of the system can add new aircrafts, flights, and flight schedules. Admin can cancel any pre-
scheduled flight (all stakeholders will be notified).

Restaurant Management System


A Restaurant Management System is a software built to handle all restaurant activities in an easy and safe
manner. This System will give the Restaurant management power and flexibility to manage the entire
system from a single portal. The system allows the manager to keep track of available tables in the system
as well as the reservation of tables and bill generation.
1. The waiter should be able to create an order for a table and add meals for each seat.
2. Each meal can have multiple meal items. Each meal item corresponds to a menu item.
3. The system should be able to retrieve information about tables currently available to seat walk-in
customers.
4. The system should support the reservation of tables.

Learning Outcomes and Assessment Criteria

Pass Merit Distinction

LO2 Explain the characteristics of procedural, object-oriented and event-driven programming, conduct
an analysis of a suitable Integrated Development Environment (IDE)

P2 Give explanations of what M2 Analyse the common features D2 Critically evaluate the source
procedural, object-oriented and that a developer has access to in code of an application which
event-driven paradigms are; an IDE. implements the programming
their characteristics and the paradigms, in terms of the code
relationship between them. structure and characteristics.

LO3 Implement basic algorithms in code using an IDE

P3 Write a program that M3 Use the IDE to manage the D3 Evaluate the use of an IDE
implements an algorithm using development process of the for development of applications
an IDE. program. contrasted with not using an
IDE.

LO4 Determine the debugging process and explain the importance of a coding standard

P4 Explain the debugging M4 Evaluate how the debugging D4 Critically evaluate why a
process and explain the process can be used to help coding standard is necessary in
debugging facilities available in develop more secure, robust a team as well as for the
the IDE. applications. individual.
P5 Outline the coding standard
you have used in your code.
Table of Contents

Table of Contents
Unit 1: Programming ASSIGNMENT 2......................................................................................................................1
Assignment Brief 2 (RQF)......................................................................................................................................3
Higher National Certificate/Diploma in Computing............................................................................................3
LO2 Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an
analysis of a suitable Integrated Development Environment (IDE).........................................................................1
P2 Give explanations of what procedural, object-oriented and event-driven paradigms are; their
characteristics and the relationship between them............................................................................................1
1.Procedural paradigms..................................................................................................................................1
2. Object-oriented paradigms..........................................................................................................................2
3. Event – driven paradigm..............................................................................................................................6
4.Relationship between Procedual, Object – oriented and Event – driven paradigms....................................8
LO3 Implement basic algorithms in code using an IDE............................................................................................9
P3 Write a program that implements an algorithm using an IDE........................................................................9
1.Use case.......................................................................................................................................................9
2.Code:............................................................................................................................................................9
3.Application Screenshots:............................................................................................................................21
LO4 Determine the debugging process and explain the importance of a coding standard...................................24
P4 Explain the debugging process and explain the debugging facilities available in the IDE.............................24
P5 Outline the coding standard you have used in your code............................................................................26
LO2 Explain the characteristics of procedural, object-oriented and event-driven programming,
conduct an analysis of a suitable Integrated Development Environment (IDE)

P2 Give explanations of what procedural, object-oriented and event-driven paradigms are; their
characteristics and the relationship between them.

1.Procedural paradigms

1.1. Definition
- It's a programming paradigm evolved from structured programming that focuses on increasing the
computer program's clarity, quality, and development time. Imperative programming is another name
for it. It is based on the procedure call idea. Procedures are also known as routines, subroutines, and
functions. It also adheres to the functional programming paradigm, which aids in the repair of code
and increases its reusability.

An example of procedural programming in C++ :

Page |1
1.2. Characteristics
The essential characteristics of Procedural programming are listed below:

 A big program is decomposed into smaller, more manageable processes or functions. This
minimizes code duplication, making the code more readable and maintainable.

 Global variables allow different functions to exchange data. Because functions are entirely
separated, we must declare data in the higher scope if we wish to share it.

 Global data can be changed by functions. Because global data is passed from function to
function, global data in function chains may be changed throughout the transformation.

 Methodology from the top down. As previously said, procedural programming employs a top-
down approach, with workflow moving from top to bottom.

2. Object-oriented paradigms

2.1. Definition
- Object-oriented programming (OOP) is a programming paradigm that organizes software design
around data, rather than functions and logic. An object is a data field with its own set of characteristics
and behavior. Object-oriented programming (OOP) focuses on the objects that developers wish to
control rather than the logic that is necessary to manipulate them. This kind of programming is best
suited to big, complicated, and often updated or maintained applications. This covers manufacturing
and design software, as well as mobile apps; for example, OOP may be used to simulate
manufacturing systems.

Page |2
An example of Object-oriented programming in C++ :

2.2. Characteristics

2.2.1. Class and Object


- One of the newest and most powerful paradigms is object-oriented programming. Object-Oriented
Programming (OOP) refers to a programming style that uses objects rather than procedures and
functions. These items are organized into classes, which allow the individual items to be grouped
together. Object-oriented programming languages include languages like Java, PHP, and C or C++.

Page |3
2.2.2. Inheritance
- Through inheritance, this attribute allows an object to inherit properties from another object. This makes it
possible for objects to share or expand existing properties without having to rewrite them. This trait, however,
is not shared by all object-oriented languages.

2.2.3. Encapsulation
- Encapsulation is the process or method of combining code and the data it manipulates into a single

entity. Encapsulation adds a layer of protection to altered data, keeping it safe from outside tampering
and misuse. Classes and objects in Java help with this.

Page |4
2.2.4. Abstraction

- Abstraction is a notion that allows you to extract the most important information from an item.
Abstraction aids the simple incorporation of real-world items into software programs in OOP (Object
Oriented Programming). Abstraction simplifies the understanding of real-world things by removing the
object's superfluous characteristics.

2.2.5. Polymorphisms
- Polymorphic comes from the Greek word polymorphosis, which meaning "multiple forms." Object-
oriented programming uses Poly' Many, Morphos' forms. Polymorphism refers to the fact that it exists
in several forms. Polymorphism allows data types and/or data classes to handle an object differently.
It is, more exactly, the capacity of several things to respond to the same message in various ways. It
enables the ability to rede'ne a method within a derived class and allows a same name or operator to
be associated with multiple actions based on the type of data it has provided.

Page |5
3. Event – driven paradigm
- Event-driven programming is a programming paradigm in which events, such as a user action such as
a mouse click or key press, or a message from the operating system or another program, govern the
flow of program execution. An event-driven application is one that detects events as they happen and
responds with an appropriate event-handling technique. The concept is based on interrupt-driven
programming, which was popular in early command-line environments like DOS and embedded
computers (where the application is implemented as firmware).

Example:

Page |6
3.1. Characteristics
 Service-Oriented: The feature of service-focused programming, which is used to design
programs for services, is that it does not slow down the computer. The service-oriented model
consumes a small portion of the computer's control power, and services often run in the
background of the operating system.

 Time-Driven: Time impacted is a paradigm in motivated event programming. Time motivated


code differs from code that runs on a period trigger in that it functions at a defined time, which
might be once an hour, once a week, or once a month. This refers to doing the action from a
pre-determined starting point. For instance, the home windows revision is an example of a
time-driven revision, in which the user may choose when to revise or when to verify and
download the revision.

 Trigger Functions: In event-driven coding, trigger functions are functions that decide what
code to run when a given event happens. When a certain event occurs, programmers utilize
these functions to choose the event handler to employ for the function.

 Events: The mouse, computer keyboard, and user interface are examples of events that must
be triggered in this software. This implies the user must interact with some item in the
software, such as clicking a button with a mouse, selecting a button with the computer
keyboard, and so on.

 The Simplicity of Programming and Ease of Development: Because it is extremely attractive,


event-driven programming is simple and much easier to develop than other types of
Page |7
programming. You can, for example, choose a button and drag it onto a form, then create a
code for it. The user may also easily insert a pre-written code script into an existing application
using event-driven development. It allows the user to halt the code in the middle of execution.
As a result, utilizing event-driven programming to grow is simple.

4.Relationship between Procedual, Object – oriented and Event – driven paradigms


 Procedural vs Object-oriented

- A procedural paradigm is a way of thinking about how to solve an issue. I start with a, then b, and
finally c. There is a clear mechanism in place, and the data flow is quite predictable.

- Looking at the actors and building objects to represent them is what object oriented design is all
about. An emulator for a movie line queue, for example. People, a queue, and a ticket counter are all
there. As a result, you create objects based on the actors.

 Object-oriented and Event-driven paradigms

- When you have a spontaneous situation that has to be handled, event driven is the way to go. Both
procedural and object-oriented paradigms can have event handlers. As a result, it isn't a
comprehensive paradigm on its own. For example, your procedural report writer may be dealing with
an event that has run out of paper. Alternatively, the object-oriented application may contain an event
to manage when lightning strikes a moviegoer in line. Events are more of a complement to other
features.

Page |8
LO3 Implement basic algorithms in code using an IDE

P3 Write a program that implements an algorithm using an IDE.


Library Management System

1.Use case

Explanation:
The Reader will have the function : Search Book, Borrow Book, Return Book.
The Libraian will have the function : Search Book, Management Readers, Management Book,
Management Borrow and Return Book.

2.Code:
public class Book
{
public int Code { get; set; }
public string Title { get; set; }
public string Publisher { get; set; }
public string Edition { get; set; }
public string Author { get; set; }
public string Category { get; set; }
public string Photo { get; set; }
}
Page |9
public partial class Book : Form

private List<Book> BookData;

private string save = "" ;

public Book()

InitializeComponent();

InitData();

LoadData();

LockControls(false);

LockButtons(true);

public void InitData()

BookData = new List<Book>();

BookData.Add(new Book

Code = 111,

Title = "Mặt Trái Của Công Nghệ",

Publisher = "NXB Chính Trị Quốc Gia",

Edition = "V3.3",

Author = "Peter Townsend",

Category ="Computer",

Photo = "book01.jpg"

});

BookData.Add(new Book

P a g e | 10
Code = 222,

Title = "Việt Nam Văn Học Sử Yếu",

Publisher = "NXB Văn Học",

Edition = "V1.1",

Author = "Dương Quảng Hàm",

Category = "Literature",

Photo = "book02.jpg"

});

BookData.Add(new Book

Code = 333,

Title = "Beethoven: Âm Nhạc Và Cuộc Đời",

Publisher = "NXB Dân Trí",

Edition = "V1.2",

Author = "Lewis Lockwood",

Category = "Music",

Photo = "book03.jpg"

});

BookData.Add(new Book

Code = 444,

Title = "Khoa Học Cực Ngầu",

Publisher = "NXB Thế Giới",

Edition = "V2.2",

Author = "Daniel Tatarsky",

Category = "Science",

Photo = "book04.jpg"

});

BookData.Add(new Book

Code = 555,
P a g e | 11
Title = "Tuổi Trẻ Đáng giá bao nhiêu?",

Publisher = "NXB Hội Nhà Văn",

Edition = "V3.2",

Author = "Rosie Nguyễn",

Category = "Literature",

Photo = "book05.jpg"

});

BookData.Add(new Book

Code = 666,

Title = "Tập Tô Màu",

Publisher = "NXB Đại Học Quốc Gia Hà Nội",

Edition = "V2.3",

Author = "Thiện Lộc, Minh Nguyệt",

Category = "Children",

Photo = "book06.jpg"

});

BookData.Add(new Book

Code = 777,

Title = "Horible Science - Hóa Học Một Vụ Nổ Ầm Vang",

Publisher = "NXB Trẻ",

Edition = "V2.3",

Author = "Nick Arnold",

Category = "Chemistry",

Photo = "book07.jpg"

});

BookData.Add(new Book

Code = 888,

Title = "Ăn Chay - Sống Lành",


P a g e | 12
Publisher = "NXB Thế Giới",

Edition = "V2.3",

Author = "Dương Yến Nhi",

Category = "Cooking",

Photo = "book08.jpg"

});

BookData.Add(new Book

Code = 999,

Title = "Cuộc Đời Là Một Tiểu Thuyết",

Publisher = "NXB Hội Nhà Văn",

Edition = "V2.3",

Author = "Guillaume Musso",

Category = "Novel",

Photo = "book09.jpg"

});

BookData.Add(new Book

Code = 1000,

Title = "Kinh Tế Học Cấm Đoán",

Publisher = "NXB Lao Động",

Edition = "V2.3",

Author = "Mark Thornton",

Category = "Economy",

Photo = "book10.jpg"

});

BookData.Add(new Book

Code = 1001,

Title = "Lịch Sử - Historiai",

Publisher = "NXB Thế Giới",


P a g e | 13
Edition = "V2.3",

Author = "Herodotus",

Category = "History",

Photo = "book11.jpg"

});

public List<Book> GetBookData()

return BookData;

public void LoadData()

dataGVBooks.DataSource = GetBookData();

private void dataGVBooks_CellContentClick(object sender, DataGridViewCellEventArgs e)

txtCode.Text = dataGVBooks.CurrentRow.Cells[0].Value.ToString();

txtTitle.Text = dataGVBooks.CurrentRow.Cells[1].Value.ToString();

txtPublisher.Text = dataGVBooks.CurrentRow.Cells[2].Value.ToString();

txtEdition.Text = dataGVBooks.CurrentRow.Cells[3].Value.ToString();

txtAuthor.Text = dataGVBooks.CurrentRow.Cells[4].Value.ToString();

cbCategory.SelectedItem = dataGVBooks.CurrentRow.Cells[5].Value.ToString();

txtPhoto.Text = dataGVBooks.CurrentRow.Cells[6].Value.ToString();

//show photo

string exePath = Application.StartupPath; // đường dẫn đến folder debug chứa


file .exe

picPhoto.ImageLocation = exePath + "\\Photos\\" +


dataGVBooks.CurrentRow.Cells[6].Value.ToString();

picPhoto.SizeMode = PictureBoxSizeMode.StretchImage;
P a g e | 14
}

public void LockControls(bool locked)

txtCode.Enabled = locked;

txtTitle.Enabled = locked;

txtPublisher.Enabled = locked;

txtEdition.Enabled = locked;

txtAuthor.Enabled = locked;

cbCategory.Enabled = locked;

txtPhoto.Enabled = locked;

public void LockButtons(bool locked)

btnAddNew.Enabled = locked;

btnDelete.Enabled = locked;

btnUpdate.Enabled = locked;

btnSave.Enabled = !locked;

btnCancel.Enabled = !locked;

public void ClearInput()

txtCode.Text = "";

txtTitle.Text = "";

txtPublisher.Text = "";

txtEdition.Text = "";

txtAuthor.Text = "";

cbCategory.SelectedIndex = 0;

txtPhoto.Text = "";

private void btnAddNew_Click(object sender, EventArgs e)


P a g e | 15
{

LockControls(true);

txtCode.Focus();

LockButtons(false);

ClearInput();

save = "add";

private void btnCancel_Click(object sender, EventArgs e)

LockControls(true);

LockButtons(true);

ClearInput();

private void AddNewProcess()

Book b = new Book();

b.Code = int.Parse(txtCode.Text);

b.Title = txtTitle.Text;

b.Publisher = txtPublisher.Text;

b.Edition = txtEdition.Text;

b.Author = txtAuthor.Text;

b.Category = cbCategory.SelectedItem.ToString();

BookData.Add(b);

b.Photo = txtPhoto.Text;

dataGVBooks.DataSource = null;

dataGVBooks.DataSource = GetBookData();

LockControls(false);

LockButtons(true);

}
P a g e | 16
private void UpdateProcess()

int code = int.Parse(txtCode.Text);

var book = BookData.First(b => b.Code == code);

book.Title = txtTitle.Text;

book.Publisher = txtPublisher.Text;

book.Edition = txtEdition.Text;

book.Author = txtAuthor.Text;

book.Category = cbCategory.SelectedItem.ToString();

book.Photo = txtPhoto.Text;

dataGVBooks.DataSource = null;

dataGVBooks.DataSource = GetBookData();

LockControls(false);

LockButtons(true);

public void DeleteProcess()

int code = int.Parse(txtCode.Text);

var book = BookData.First(b => b.Code == code);

BookData.Remove(book);

dataGVBooks.DataSource = null;

dataGVBooks.DataSource = GetBookData();

LockControls(false);

LockButtons(true);

ClearInput();

private void btnSave_Click(object sender, EventArgs e)

{
P a g e | 17
switch(save)

case "add":

AddNewProcess();

break;

case "update":

UpdateProcess();

break;

private void btnDelete_Click(object sender, EventArgs e)

string message = "Do you want delete this book?";

string caption = "Comfirmation Delete";

MessageBoxButtons buttons = MessageBoxButtons.YesNo;

MessageBoxIcon icon = MessageBoxIcon.Question;

if(txtCode.Text != "")

DialogResult result = MessageBox.Show(message, caption, buttons, icon);

if (result == DialogResult.Yes)

DeleteProcess();

private void btnUpdate_Click(object sender, EventArgs e)

if (txtCode.Text != "")

LockControls(true);

P a g e | 18
txtCode.Enabled= false;

txtTitle.Focus();

LockButtons(false);

save = "update";

private void SearchByCode()

string code = txtCode.Text ;

int Code = Convert.ToInt32(txtCode.Text);


IEnumerable<Book> books = BookData.Where(b => b.Code.Equals(code));

dataGVBooks.DataSource = null;

dataGVBooks.DataSource = books.ToList();

private void SearchByTitle()

string title = txtTitle.Text;

IEnumerable<Book> books = BookData.Where(b => b.Title.Contains(title));

dataGVBooks.DataSource = null;

dataGVBooks.DataSource = books.ToList();

private void SearchByAuthor()

string author = txtAuthor.Text;

IEnumerable<Book> books = BookData.Where(b => b.Author.Contains(author));

dataGVBooks.DataSource = null;

dataGVBooks.DataSource = books.ToList();

P a g e | 19
}

private void SearchByPublisher()

string publisher = txtPublisher.Text;

IEnumerable<Book> books = BookData.Where(b => b.Publisher.Contains(publisher));

dataGVBooks.DataSource = null;

dataGVBooks.DataSource = books.ToList();

private void btnSearch_Click(object sender, EventArgs e)

int criteria = cbSearch.SelectedIndex;

LockControls(false);

switch(criteria)

case 0:

SearchByCode();

break;

case 1:

SearchByTitle();

break;

case 2:

SearchByAuthor();

break;

case 3:

SearchByPublisher();

break;

P a g e | 20
private void cbSearch_SelectedIndexChanged(object sender, EventArgs e)

LockControls(true);

ClearInput();

3.Application Screenshots:

P a g e | 21
P a g e | 22
P a g e | 23
LO4 Determine the debugging process and explain the importance of a coding standard

P4 Explain the debugging process and explain the debugging facilities available in the IDE.
1. What is Debug?

- During the development phase, software programs are subjected to extensive testing, upgrading,
debugging, and maintenance. Typically, software contains flaws and faults, which are eliminated on a
regular basis. Debugging is the process of repairing a software issue. It refers to the process of
locating, evaluating, and correcting problems. This procedure starts when the program fails to run
correctly and ends with the problem being resolved and the software being successfully tested.
However, because problems must be corrected at all levels of debugging, it is regarded a very difficult
and time-consuming operation.

2. The debugging processes

The following is a list of the phases involved in the debugging process.

Identify Error

- Early detection of problems can help you save a lot of time. We waste a lot of time if we make a
mistake when detecting an issue. It's difficult to track down errors or defects that arise on a
customer's site. To save time and avoid problems at the user site, it's critical to identify the correct
error.

Identify the Error Location

P a g e | 24
- Following the identification of an issue, we must locate the specific spot in the code where the
problem occurred. Identifying the specific spot where the mistake occurs might assist in resolving the
issue more quickly.

Analyze Error

- You must use an appropriate technique to examine the mistake at this step. This will assist you in
comprehending the issue. This stage is crucial since correcting one error may result in the occurrence
of another.

Prove the Analysis

- After you've studied the detected issue, you'll need to focus on additional software faults. This
procedure entails test automation, in which you must develop test cases using a test framework.

Cover Lateral Damage

- You must unit test all of the code where the changes are made at this step. If all test cases pass the
test, you can go to the next stage; otherwise, you must resolve the test case that failed. Correct and
validate: this is the final stage of debugging, when you must fix all errors and test all test scripts.

3. How to run debug in Visual Studio IDE

P a g e | 25
P5 Outline the coding standard you have used in your code.
1.Coding standard and Naming convension

1.1. Coding standard

- They are a set of processes that may be specified for a certain programming language, including a
programming style, methods, and procedures. These procedures can cover a wide range of
characteristics of a program built in that language. They can be thought of as necessary characteristics
of software development. A coding standard ensures that all developers working on a project adhere
to the same set of principles. The code is simple to understand and maintains sufficient consistency.

1.2. Purpose of Coding Standards

 A coding standard offers the programs created by various engineers a consistent look.

 It increases the code's readability and maintainability while simultaneously reducing its complexity.

 It aids in the reuse of code and the detection of errors.

 It encourages good programming habits and boosts programmers' productivity.

1.3. Naming convension

- Before delving into the specifics of the coding standards, it's crucial to understand the significance that naming
conventions play in developing code, independent of the platform on which you're working. Finally, naming
standards, whether for classes, functions, variables, attributes, or arguments, should aid in the explanation of
the reason for which they are used.

Object Name Notation Length Plural Prefix Suffix Abbreviation Char Mask Underscores

Class name PascalCase 128 No No Yes No [A-z][0-9] No

Constructor name PascalCase 128 No No Yes No [A-z][0-9] No

Method name PascalCase 128 Yes No No No [A-z][0-9] No

Method arguments camelCase 128 Yes No No Yes [A-z][0-9] No

P a g e | 26
Local variables camelCase 50 Yes No No Yes [A-z][0-9] No

Constants name PascalCase 50 No No No No [A-z][0-9] No

Field name camelCase 50 Yes No No Yes [A-z][0-9] Yes

Properties name PascalCase 50 Yes No No Yes [A-z][0-9] No

Delegate name PascalCase 128 No No Yes Yes [A-z] No

Enum type name PascalCase 128 Yes No No No [A-z] No

1.4. Some examples

P a g e | 27
2. Apply coding standard in my code
I applied coding standards and naming convension in P3 section 2 above

P a g e | 28
P a g e | 29
REFERENCES

TechGeekBuzz. 2021. What is Procedural Programming? - TechGeekBuzz. [online] Available at:

<https://www.techgeekbuzz.com/procedural-programming/> [Accessed 25 October 2021].

Tuan Nguyen's Blog. 2021. Programming paradigms - what is procedural programming? - Tuan


Nguyen's Blog. [online] Available at: <https://www.tuannguyen.tech/2019/05/programming-
paradigms-what-is-procedural-programming/> [Accessed 25 October 2021].

SearchAppArchitecture. 2021. What is Object-Oriented Programming (OOP)?. [online] Available at:


<https://searchapparchitecture.techtarget.com/definition/object-oriented-programming-OOP>
[Accessed 25 October 2021].

Codelearn.io. 2021. Tất Tần Tật Về Lập Trình Hướng Đối Tượng? (Phần 1). [online] Available at:
<https://codelearn.io/sharing/tat-tan-tat-ve-lap-trinh-huong-doi-tuong-phan-1> [Accessed 25
October 2021].

2021. [online] Available at: <https://www.essaysauce.com/computer-science-essays/main-


characteristics-and-features-of-object-oriented-programming/> [Accessed 28 October 2021].

Technologyuk.net. 2021. Event-driven Programming. [online] Available at:


<https://www.technologyuk.net/computing/software-development/software-design/event-driven-
programming.shtml> [Accessed 28 October 2021].

StudyBay. 2021. Event-Driven Programming - Applications & Features. [online] Available at:


<https://studybay.com/blog/event-driven-development-features/#4_0> [Accessed 28 October 2021].

Quora. 2021. What are the relationships between programming procedural, object-oriented and
event-driven paradigms?. [online] Available at: <https://www.quora.com/What-are-the-
relationships-between-programming-procedural-object-oriented-and-event-driven-paradigms>
[Accessed 28 October 2021].

Edureka. 2021. What is Debugging? Different Stages of Debugging | Edureka. [online] Available at:
<https://www.edureka.co/blog/what-is-debugging/> [Accessed 29 October 2021].

P a g e | 30
Multidots. 2021. Importance of Code Quality and Coding Standard in Software Development. [online]
Available at: <https://www.multidots.com/importance-of-code-quality-and-coding-standard-in-
software-development/> [Accessed 1 November 2021].

GeeksforGeeks. 2021. Coding Standards and Guidelines - GeeksforGeeks. [online] Available at:


<https://www.geeksforgeeks.org/coding-standards-and-guidelines/> [Accessed 1 November 2021].

McFarlin, T., 2021. WordPress Coding Standards: Naming Conventions & Function Arguments. [online]
Code Envato Tuts+. Available at: <https://code.tutsplus.com/articles/wordpress-coding-standards-
naming-conventions-function-arguments--wp-31683> [Accessed 1 November 2021].

P a g e | 31

You might also like