Programming
Programming
Unit(s)
Assignment title
Abishek Mahenderaraja
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.
Give details:
Programme Leader
signature (if required) Date
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID Abishek Mahenderaraja/E157349
Unit Title
Assignment Number 01 Assessor
Date Received 1st
Submission Date submission
Date Received 2nd
Re-submission Date submission
Assessor Feedback:
LO1. Define basic algorithms to carry out an operation and outline the process of programming an application.
LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an analysis of a suita
Integrated Development Environment (IDE).
LO4. Determine the debugging process and explain the importance of a coding standard.
Pass, Merit & Distinction Descripts P4 P5 M4 D4
* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place and
grades decisions have been agreed at the assessment board.
Assignment Feedback
Formative Feedback: Assessor to Student
Action Plan
Summative feedback
Assessor Date
signature
Abishek.M
Student Date
signature
General Guidelines
1. A Cover page or title page – You should always attach a title page to your assignment. Use
previous page as your cover sheet and make sure all the details are accurately filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.
1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.
5. Use word processing application spell check and grammar check function to help editing
your assignment.
Important Points:
1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your
work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as illness,
you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them properly using
HARVARD referencing system to avoid plagiarism. You have to provide both in-text citation
and a reference list.
10. If you are proven to be guilty of plagiarism or any academic misconduct, your grade could be
reduced to A REFERRAL or at worst you could be expelled from the course
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.
Unit Tutor
Issue Date
Submission Date
Submission Format
1. Written Report
This 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. (The recommended
word count is 1,500–2,000 words for the report excluding annexures)
3. Presentation
With the submitted system student should do a presentation to demonstrate the system
that was developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint
slides while doing the presentation, but live demonstration of the system is required.
Evaluator will also check the ability to modify and debug the system using the IDE.
Activity 1
A. The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence
relation.
Fn = F n-1 + F n-2
Define what an algorithm is and outline the characteristics of a good algorithm. Write the
algorithms to display the Fibonacci series and the factorial value for a given number using
Pseudo code. Determine the steps involved in the process of writing and executing a
program.
Take a sample number and dry run the above two algorithms. Show the outputs at the end
of each iteration and the final output. Examine what Big-O notation is and explain its role in
evaluating efficiencies of algorithms. Write the Python program code for the above two
algorithms and critically evaluate their efficiencies using Big-O notation.
Activity 2
2.1 Explain what is meant by a Programming Paradigm and the main characteristics
of Procedural, Object oriented and Event-driven paradigms and the relationships among
them. Write small snippets of code as example for the above three programming
paradigms using a suitable programming language(s). you also need to critically
evaluate the code samples that you have given above in relation to their structure and
the unique characteristics.
Ayubo Drive is the transport arm of Ayubo Leisure (Pvt) Ltd, an emerging travel & tour
company in Sri Lanka. It owns a fleet of vehicles ranging from cars, SUVs to vans.
The vehicles that it owns are hired or rented with or without a driver. The tariffs are based on
the vehicle type. Some of the vehicle types that it operates are, small car, sedan car, SVUs, Jeep
(WD), 7-seater van and Commuter van. New vehicle types are to be added in the future.
1. Rent (With or without driver) – For each type of vehicle rates are given per day, per week
and per month. Rate for a driver also given per day. Depending on the rent period the total
rent amount needs to be calculated. For example: if a vehicle is rented for 10 days with a
driver, total amount to be calculated as follows:
2. Hire (with driver only) – These are based on packages such as airport drop, airport pickup,
100km per day package, 200km per day package etc. Standard rates are defined for a
package type of a vehicle typeif that is applicable for that type of vehicle.For each package
maximum km limit and maximum number of hours arealso defined. Extra km rate is also
defined which is applicable if they run beyond the allocated km limit for the tour. For day
tours if they exceed max hour limit,a waiting charge is applicable for extra hours. Driver
overnight rate and vehicle night park rate also defined which is applicable for each night
when the vehicle is hired for 2 or more days.
Activity 3
Write suable algorithms for vehicle tariff calculation for rents and hires. Ideally 3
functions should be developed for this purpose as above. Use the visual studio IDE
(using C#.net) to Implement the above algorithms and design the suitable database
structure for keeping the tariffs for vehicle types and different packages which must be
used for implementing the above functions.
Analyze the features of an Integrated Development Environment (IDE) and explain how
those features help in application development. Evaluate the use of the Visual
StudioIDE for your application development contrasted with not using an IDE.
Activity 4
2.1 Design and build a small system to calculate vehicle hire amounts and record them in a
database for customer billing and management reporting forAyubo drive. This includes the
completing the database design started in 3.2 and implementing one or more GUIs for
vehicle, vehicle type, and package add/edit/delete functions. It essentially requires an
interface for hire calculation and recording function described above. Generating customer
reports and customer invoices are not required for this course work.
2.2 Explain debugging process and the features available in Visual studio IDE for debugging
your code more easily. Evaluate how you used the debugging process to develop more
secure, robust application with examples.
2.3 Outline the coding standards you have used in your application development. Critically
evaluate why a coding standard is necessary for the team as well as for the individual.
Grading Rubric
First of all, I would like to thank Miss Vishmi Embuldeniya, Our Programming Lecturer
for guiding us through this project and the lessons. Beside I would like to thank my
group members for who helped me a lot more successful and also, I finally thank
ESOFT Metro Campus for this valuable opportunity.
1|Page
Table of Contents
1.0 Define what an algorithm is and outline the characteristics of a good algorithm. 4
What is an algorithm 4
Characteristics of an Algorithm 5
How to Write an Algorithm 6
The steps involved in the process of writing and executing a program 7
Fibonacci series 8
Factorial number 10
Big O notation 14
2.0 Explain what is meant by a Programming Paradigm and the main characteristics of
Procedural, Object oriented and Event-driven paradigms and the relationships among
them. 16
A Programming Paradigm 16
Procedural programming 18
Object-Oriented Programming 19
Event-Driven Programming 20
3.0 Write suable algorithms for vehicle tariff calculation for rents and hires. Ideally 3
functions should be developed for this purpose as above. Use the visual studio IDE (using
C#.net) to Implement the above algorithms and design the suitable database structure for
keeping the tariffs for vehicle types and different packages which must be used for
implementing the above functions. 24
Algorithms for vehicle tariff calculation for rental and hires. 24
Evidence of implementing the following algorithm and using the Visual Studio IDE (using C
# .net) to design an appropriate database structure for storing vehicle types and fees for
different packages 28
Integrated Development Environment (IDE) 36
Visual Studio 38
4.0 Design and build a small system to calculate vehicle hire amounts and record them in a
database for customer billing and management reporting for Ayubo drive. This includes
the completing the database design started in 3.2 and implementing one or more GUIs for
vehicle, vehicle type, and package add/edit/delete functions. 40
4.2 Debugging process and the features available in Visual studio IDE for debugging your
code more easily. 44
4.3 The Coding Standards 45
Reference 46
2|Page
ABISHEK MAHENDERARAJA (PROGRAMMING 1)
3|Page
1.0 Define what an algorithm is and outline the characteristics of a
good algorithm.
What is an algorithm?
Problem:
A real-world problem that has been defined in terms of developing an
application with a set of instructions.
Algorithm:
An algorithm is a step-by-step process that will be designed to demonstrate a
problem.
Input:
The inputs required by that of the designed algorithm.
4|Page
Processing unit:
The input will be forwarded to the processing unit, which will generate the
desired output.
Output:
The program's outcome.
Characteristics of an Algorithm
Input specified
An algorithm should have 0 to more well-defined inputs that recognize what kind of
data and what form the data should consider taking. The input is the information that
must be transformed in sequence for the computation to produce the output.
Output specified
A well-defined algorithm should have one or more outputs that suit the required
outcome. The put specificity also necessitates knowledge of the type of data, the
amount, and the format of the output.
Definiteness
The steps of the process and the sequence of operations for converting input to
output must be specified in an algorithm. Definiteness refers to the specification of
the sequence of operations used to convert input into output. The algorithm should
be unambiguous and clear. Details of each step, including how to handle errors,
must also be specified.
Effectiveness:
An algorithm must be effective, and all steps required to reach the output must be
feasible with the resources available. It should include any redundant or unnecessary
steps that end up causing an algorithm to be ineffective.
Finiteness:
After a limited number of iterations, the algorithms must come to an end and cease
to function. After getting the anticipated result or response that there isn't a solution.
5|Page
Independent:
An algorithm should have detailed instructions that are unrelated to any
programming code.
It should be designed so that it can be used with any programming language.
6|Page
The steps involved in the process of writing and executing a program.
Problem Definition:
The understanding and identification of the program for the development of the
program are the first steps in this process, and the problem should be formally
defined. Input/output, processing requirements, memory requirements, error
handling, and integrating with other programs are all factors that need to be taken
into account at this stage.
Program Design:
The second stage is referred to as "program design." Algorithms, flowcharts, data
structures, and a particular programming language are some of the tools used by
developers to create program designs and address issues.
Coding:
Following the completion of the designing phase, a computer language is used to
write the program's instructions. In reality, coding takes less time and makes up a
very small portion of the entire process of developing a program. Syntax errors such
as misspelled words, comma omissions, undefined labels, etc. should be fixed at this
point.
o Some of the guidelines used for effective coding include:
o Variable names and labels should be meaningful.
o Simple and direct language.
o Modularity with a focus on making modules more generic,
o Making use of comments and correctly indenting the code.
o Stopping control-transfer jumps in the program.
Debugging:
At this point, the programs' errors are found and fixed. This process of program
development is crucial. Programming validation is another name for debugging.
7|Page
o The following are some typical errors that may be present in the
programs:
o Failure to initialize variables.
o Reversing the operands' order.
o A mixture of characters and numbers.
o Reversing conditions, such as jumping on zero rather than not zero.
Testing:
A variety of appropriate test cases are used to evaluate the program. It is required to
create a test plan for the program even before it is designed. This ensures that the
specifications are fully understood. It is important to find and test the simplest and
most unique cases. The highest and lowest values of each variable should always be
used as test data.
Documentation:
In the process of developing a program, documentation is a crucial step.
The people who maintain the software and the users can both benefit from
documentation. This guarantees that any necessary modifications in the future can
be made quickly. It is also necessary for upkeep and redesign.
Maintenance:
This includes adapting the program to new circumstances and practical knowledge
gained from the field. The following circumstances necessitate maintenance:
o A change to the specifications.
o A change in the tools.
o Errors discovered while the program is actually running.
Each number in the Fibonacci series is the sum of the two numbers that came before
it. Leonardo Fibonacci, an Italian mathematician, is recognized with the sequence's
name.
8|Page
The Fibonacci sequence includes the following numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21,
34, 55, 89, 144 so on
The series' first two digits are 0 and 1. The two previous numbers are added together
to produce all other numbers. The third number, for instance, is 1 (0+1), preceded by
the fourth number, 2, the fifth number, 3, the sixth number, 5, and so on.
9|Page
Fibonacci Series Dry run test:
10 | P a g e
Critically evaluate the code for Fibonacci series
Fibonacci series is extremely space-efficient since it only stores the two most recent
values when iterating through the series using a loop. The code is computationally
effective because it makes use of the Fibonacci series' recursive structure. The code
does, however, have some shortcomings. It is less natural to use and less
immediately understandable than some other approaches. Its range is also
constrained. It might not be as simple or as easy to understand as other approaches,
but it is extremely computationally and spatially efficient.
To generate the output from the first input, step number is two (checks through 1st
and 2nd if statements).
To gather the output for the second input, step number is 3. (checks through 1st, 2nd
and 3rd if statements).
To achieve the output from input 3, step number is 7. (checks through 1st, 2nd and
3rd if statements then it goes to while statement 4 times to get output).
To obtain the outcome for the input 4, step number is 8. (checks through 1st, 2nd
and 3rd if statements then it goes to while statement 5 times to get output).
11 | P a g e
indicate the following Fibonacci number that we
calculated earlier.
Print (first + second) = [3+5] First variable will
now point to second variable. The second will [0, 1, 1, 2,
5
indicate the following Fibonacci number that we 3, 5, 8]
determined earlier.
Factorial number
When all positive integers less than or equal to n are multiplied, the result is the
factorial of the number 'n', which is denoted by the symbol ‘n’.
Step 1: Start
Step 2: Take a number ‘n’ from the user
Step 3: Initialize result as 1
Step 4: If n>1 then repeat step 5 and 6, else proceed to step 7
Step 5: Multiply result with the current value of n
Step 6: Decrement the value of n
12 | P a g e
Step 7: Print result
Step 8: End
Factorial Number
(Input) n i i<=n Output
Input = 4
1 TRUE
2 TRUE
3 TRUE
4 TRUE
5 FALSE
Output: 4*3*2*1 = 24
The product of all positive integers less than or equal to a given number can be
calculated using the mathematical concept known as the factorial number. The
factorial of 5, for instance, is 5x4x3x2x1 = 120. I, the iteration variable, and n, the
given number, can be used to express this idea as i=n.
Because it ensures that the product is calculated for all prime numbers between 1 and
n, the idea of i<=n is crucial for computing the factorial number. Additionally, it
enables the computation to be performed recursively since each iteration can use the
13 | P a g e
output from the previous one. As a result, the computation is much more accurate and
efficient because there is no longer a need to manually calculate each product.
Last but not least, this idea is also used to develop algorithms that compute the
factorial number because it guarantees that all necessary computations are performed
in the proper sequence. Because it is clear which operations must be performed at
each stage, the algorithm is now simpler to comprehend and maintain.
In general, the idea of i<=n is a critical element of computing the factorial number
and can be used to build successful and trustworthy algorithms to do so.
Big O notation
14 | P a g e
o Runtime Complexity for Heap Sort, Merge Sort - O(n log n).
o To compare algorithms and determine which ones are the most successful, Big-
O notation is used. Weighing the advantages and disadvantages of different
algorithms is useful for selecting the best algorithm for a particular problem.
o The Big-O notation can also be used to forecast a program's scalability. It can
be used to evaluate a program's capacity to deal with larger inputs or datasets
without becoming sluggish.
Python program code Fibonacci series algorithm and critically evaluate their
efficiencies using Big-O notation.
def fibonacci(n):
a=0
b=1
if n < 0:
15 | P a g e
print("Incorrect input")
elif n == 0:
return a
elif n == 1:
return b
else:
for i in range(2,n):
c=a+b
a=b
b=c
return b
An illustration of a recursive algorithm for computing the Fibonacci series is the code
that was previously provided. The algorithm uses Big-O notation of O(n), which
denotes that computing the Fibonacci number for a given n would take linear time.
This indicates that the algorithm's time complexity is inversely correlated with the
size of the input. The input size grows, the algorithm will run more slowly. Because it
doesn't require any additional storage for the calculations, this algorithm is also space
efficient. The code is also simple to read and comprehend, which makes it the perfect
solution.
Python program code Factorial number and critically evaluate their efficiencies
using Big-O notation.
def factorial(n):
result = 1
for i in range(1, n + 1):
result *= i
return result
Due to the fact that computing the factorial requires n steps, the complexity of this
algorithm is linear O(n). Each step consists of a single addition and multiplication
operation that both take a fixed amount of time. As a result, the amount of time
required is related to the size of the input, n. After that, a variable named factorial is
created and given the value 1.
16 | P a g e
2.0 Explain what is meant by a Programming Paradigm and the main
characteristics of Procedural, Object oriented and Event-driven
paradigms and the relationships among them.
A Programming Paradigm
17 | P a g e
Definition (freecodecamp.org)
"I'll try to break it down in pieces and give a simple explanation of each paradigm.
This way you can understand what people are talking about when they say, "object
oriented", "functional" or "declarative"."
1. A procedural program is one that concentrates on giving the computer a specific set
of instructions to follow.
18 | P a g e
6. Linear programming, or writing code one line at a time, is the norm for computer
programs.
Local Variable: A local variable is one that is declared in the method's main structure
and is only used within the confines of the local scope it is given. If the local variable
is used outside the defined method, the code will stop working because it can only be
used in the method in which it is defined.
Global Variable: A global variable is one that has been proclaimed outside of every
other feature that has been indicated in the code. As a result, unlike a local variable,
global variables can be used in all functions.
19 | P a g e
The main characteristics of Object-Oriented Programming.
Encapsulation: It is the process of combining data and functions into a single entity
known as an object.
Inheritance: By deriving new classes from older ones, inheritance enables
programmers to reuse code and add new features without having to rewrite it.
Instead of needing to start creating the code from scratch, we may construct programs
using pre-built functioning modules that communicate with one another, which results
in less development time and more productivity.
With the new technology, programmers should produce more work with higher-
quality software at lower maintenance costs.
Upgrades to Object-Oriented Programming systems are simple for both small and big
systems.
It is rather simple to divide the work in a project based on objects, and numerous
instances of an item may coexist peacefully.
20 | P a g e
Characteristics of Event-Driven Programming
Time driven is a paradigm used in event-driven programming; it's a piece of code that
executes at a predetermined time, such as once an hour, once a week, or once a
month. This means it's a task that has been pre-set to be completed. Windows Update,
for instance, is a time-driven application that allows users to decide when to update or
when to look for and download updates.
When a certain event is triggered, an event handler is a sort of function or method that
performs a specified action. An event handler may, for instance, be a button that, upon
user click, displays a message and, upon user click again, closes the message.
In event-driven programming, trigger functions are used to pick which event handler
to utilize for an event when a given event happens and to determine what code to run
when the event occurs.
The user must interact with an item in the program, for example, by clicking a button
with the mouse, selecting a button with the keyboard, and so forth. Events include
mouse, keyboard, and user interface, whose events must be triggered in the program
in order to occur.
21 | P a g e
Relation between Procedural and Object-Oriented Programming
Type of It breaks down any big program into It breaks down the whole
Division little pieces called functions. program into little
22 | P a g e
components known as
objects.
Inheritance It does not provide any inheritance. There are three ways it
achieves inheritance:
protected, private and
public.
23 | P a g e
Relation Between Object oriented to Event-driven paradigms characteristics.
24 | P a g e
3.0 Write suable algorithms for vehicle tariff calculation for rents
and hires. Ideally 3 functions should be developed for this purpose
as above. Use the visual studio IDE (using C#.net) to Implement the
above algorithms and design the suitable database structure for
keeping the tariffs for vehicle types and different packages which
must be used for implementing the above functions.
Algorithm:
#Declaring variables
double weeklyRent;
double dailyRent;
double dailyDriverCost;
25 | P a g e
double totalRent;
26 | P a g e
Step 5: Calculate extra km charge
extra_km_charge = total_kms * 10;
Start
Step 1: Declare and initialize variables for vehicle_no, package_type, start_time,
end_time, start_km_reading, end_km_reading, base_hire_charge, waiting_charge and
extra_km_charge
string vehicle_no, package_type;
DateTime start_time, end_time;
int start_km_reading, end_km_reading;
double base_hire_charge, waiting_charge, extra_km_charge;
Step 4: Calculate the base hire charge based on the package type
if (package_type == "Basic")
base_hire_charge = 100;
else if (package_type == "Premium")
base_hire_charge = 200;
else
base_hire_charge = 300;
27 | P a g e
if (duration > 5 hours)
waiting_charge = (duration - 5 hours) * 20;
else
waiting_charge = 0;
Step 7: Return the base hire charge, waiting charge and extra km charge as output
parameters
return (base_hire_charge, waiting_charge, extra_km_charge);
Stop
Evidence of implementing the following algorithm and using the Visual Studio IDE
(using C # .net) to design an appropriate database structure for storing vehicle types
and fees for different packages.
28 | P a g e
Database for Long tour
29 | P a g e
Rental Calculations using Visual Studio
30 | P a g e
Vehicle List retrieving from the Database
31 | P a g e
Delete Query
Update Query
32 | P a g e
Add Query
33 | P a g e
Database Connection
34 | P a g e
Car and Package Main menu
Login Query
35 | P a g e
Integrated Development Environment (IDE)
The line separating an IDE from other components of the larger software development
environment is not always clear; occasionally a version control system or different
tools to make creating a graphical user interface (GUI) simpler are combined. For
usage in object-oriented software development, many contemporary IDEs additionally
include a class browser, an object browser, and a class hierarchy diagram.
o Text Editor: The code editor that is included with IDEs is made primarily for
editing and writing code. Typically, the code editor comes with capabilities for
refactoring, auto complete, and syntax highlighting.
o Compiler: A compiler that is integrated into an IDE may build your code to
create an executable.
o Debugger: IDEs include a debugging tool that permits line-by-line code review,
variable examination, and timeout setting.
o Version control: A lot of IDEs include support for SVN and Git, two popular
version control programs.
36 | P a g e
o Integrated testing: IDEs provide built-in frameworks for testing that let you run
unit and integration tests on your code.
o Increased Productivity: IDEs help developers create, debug, and compile code
more quickly and simply by offering an environment that is specially
customized to the language being used.
o Version Control: IDEs come with systems for version control that let
programmers quickly monitor and handle changes to their code.
o Simple to Use: Even for new developers, IDEs are intended to be simple to use
and comprehend.
37 | P a g e
o To ensure high-quality code, it automatically scans for defects and mistakes.
Refactoring capabilities let programmers to perform thorough and error-free
name changes.
Visual Studio
A code editor that enables source code and IntelliSense (the code completion
feature) is a feature of Visual Studio. Both a source-level debugger and a machine-
level debugger may be used with the integrated debugger.
38 | P a g e
Relation between Visual Studios IDE and not using an IDE.
39 | P a g e
4.0 Design and build a small system to calculate vehicle hire
amounts and record them in a database for customer billing and
management reporting for Ayubo drive. This includes the
completing the database design started in 3.2 and implementing one
or more GUIs for vehicle, vehicle type, and package add/edit/delete
functions.
Login Page
40 | P a g e
Main Menu
41 | P a g e
Rental Page
Day Tour
42 | P a g e
Long Tour
43 | P a g e
4.2 Debugging process and the features available in Visual studio
IDE for debugging your code more easily.
Attaching the debugger: In Visual Studio, debugging will launch immediately once
you hit F5 or "choose Debug Start Debugging."
Debugger Break Mode: The debugged process has to be in "Break Mode" in order to
be debugged. This implies that all running threads are halted after a line of code and
the application can be stopped for the specified amount of time. Use the "Debug
Break All menu item" or set breakpoints to activate breaker mode. Press F9, or
"Debug Toggle Breakpoint," to install breaker points.
The software will halt and enter break mode once a break point has been set. When
in Break Mode, you may go around the code and debug interactively. This allows
you to observe how the code is being executed. The following are some navigational
features.
44 | P a g e
4.3 The Coding Standards:
Naming conventions:
The Microsoft.NET Framework Design Guidelines state that all C# code must adhere
to the following naming conventions:
o Camel-casing should be used for variables, properties, fields, and
parameters.
o Pascal-case should be used for classes, structs, and interfaces.
o Uppercase should be used for constants.
Comment:
Use comments to explain the reasoning behind certain decisions throughout the code.
All comments must be illustrative and have sufficient details to enable code
comprehension without having to view the code.
All mistakes and exceptions should be detected and handled effectively. Additionally,
all problems should be reported with sufficient details to aid in debugging.
Documentation:
XML-based documentation should be used for every code.
45 | P a g e
Advantages of Coding Standards
o Coding standards guarantee that the code is written in an uniform manner and
help eliminate coding mistakes. As a result, there are fewer opportunities to
introduce flaws and defects into the program.
o Increased scalability: Developers can quickly grow their code thanks to coding
standards since they can easily comprehend it and make modifications to it
without encountering any problems.
o Coordination is improved since developers can work together more easily while
using coding standards. This is due to the fact that they all comprehend each
other's code and are familiar with the proper coding practices.
When creating programs, it's important to consider time, money, debugging, and
potential modifications. When coding, having a set of standards aids in meeting those
requirements. As previously said, coding standards boost a software's efficiency,
shorten its development time, and aid in the early detection of faults. These standards
also make the code easier to read and comprehend, particularly for other developers
who could work on improvements in the future or troubleshoot mistakes that were
initially missed. Making information simpler to read, comprehend, and debug lowers
costs, which benefits the firm, group, or person. Therefore, as was already discussed,
having a set of code standards helps to save time, money, and make debugging
simpler.
46 | P a g e
Reference
What is a procedural programming language? (plus tips) (no date). Available at:
https://www.indeed.com/career-advice/career-development/procedural-
programming-language (Accessed: November 11, 2022).
What is a procedural programming language? (plus tips) (no date). Available at:
https://www.indeed.com/career-advice/career-development/procedural-
programming-language (Accessed: Octomber 25, 2022).
Data Structures - algorithms basics (no date) Tutorials Point. Available at:
https://www.tutorialspoint.com/data_structures_algorithms/algorithms_basics.ht
m (Accessed: November 20, 2022).
47 | P a g e
What is an IDE? how it helps developers code faster - G2 (no date). Available at:
https://www.g2.com/articles/ide (Accessed: December 1, 2022).
48 | P a g e