Programing Assignment Brief
Programing Assignment Brief
Higher Nationals
Internal verification of assessment decisions – BTEC (RQF)
Unit(s)
Assignment title
Student’s name
Y/N
Y/N
Y/N
Date
Give details:
Internal Verifier
signature
Date
Programme Leader
signature (if required)
Date
Unit Title
Submission Date
Re-submission Date
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.
10
Resubmission Feedback:
* 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
11
Action Plan
Summative feedback
12
Assessor Date
signature
Student Date
signature
13
Computing
14
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.
15
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.
16
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.
17
18
Unit Tutor
19
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
20
presentation, but live demonstration of the system is required. Evaluator will also check the ability to
modify and debug the system using the IDE.
LO1. Define basic algorithms to carry out an operation and outline the process of
programming an application.
LO4. Determine the debugging process and explain the importance of a coding
standard
21
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.
F n = 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
22
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
23
(WD), 7-seater van and Commuter van. New vehicle types are to be added in the future.
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:
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.
24
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
25
4.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.
4.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.
4.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.
26
27
28
Grading Rubric
29
30
31
32
33
34
Acknowledgement
35
Table of Contents
36
37
38
39
List of figures.
40
Introduction.
Programing is term which usually refers to the conduct as well as the work of someone from
a specific profession. Professions are defined as occupations that need an extended period of
tutoring and training. They are usually supervised by professional bodies that may recognize
educational establishments and experienced professionals. Qualification may be
acknowledged by the title 'member of...', 'certified', 'fellow', and so on. These professional
bodies set standards of morals, performance, competency, insurance, training and so on that
must be met to endure within the profession. Classes and functions are used to control
commands in programming languages. Programming is crucial because it instructs a
computer to repeat these commands so that individuals do not have to perform the task
repeatedly. Instead, the software can accomplish it for you automatically and precisely.
Professional is common to any field of services such as engineering, medicine or information
41
technology. Understanding the programing and etc., is important to ensure her or his highest
satisfaction from his or her profession and the give the maximum service to the society.
Activity 1
42
What is an Algorithm?
On around 825 A.D., a Persian author named Abu Jafar Mohammed ibn musa al
Khowarizmi wrote a mathematic treatise and coined the term "algorithm"
(Javatpoint,2020).
As an example,
An algorithm is a set of rules or instructions that must be followed step by step in order to
get the desired outcome.
Algorithms are language agnostic; therefore, they can be utilized in any language.
The result will be the same. Algorithms can be utilized in multiple programming
languages.
A programming Algorithm will execute what to perform, and the computer will output the
results.
43
Every single time. However, an algorithm is not a piece of computer code. Algorithms are
written in straightforward English. (Meinecke,2016; Prabhu,2020).
Example = Food recipes, in recipe there’s ingredients and set of steps to how to make
the expected meal. Algorithm are like that process (Meinecke,2016).
44
The following figure 1 is sample of an Algorithm. Simply can get an idea of how algorithm
works.
45
46
The algorithm represents such as Flowchart and Pseudocode. The difference of these 2 is
flowchart is a pictorial representation of algorithm while a flowchart is a high-level
description of algorithm (Lithmee,2019).
47
Flowchart.
A diagram that shows step by step progressing thought a procedure or system especially
using connecting lines and a set of symbols (Lithmee,2019).
In programming flowcharts are mostly used.
48
49
50
Pseudocode.
Pseudocode is an informal high-level representation of the actual code that show how an
algorithm or a computer program work in plain simple English language. (Lithmee,2019).
Example:
sum of two numbers ()
Begin
51
The algorithm should be clear and unambiguous. Each steps and inputs and outputs should
be clear and need show a one meaning.
52
Figure 5
Input.
The algorithm should have 0 or more defined inputs and should produce the anticipated
result.
Output.
To achieve the desired result, an algorithm must have at least one output.
Finiteness.
To solve a problem and produce a valid output, an algorithm should take a finite number of
steps.
Independent.
An algorithm should include step-by-step instructions. It should be language-independent.
Effectiveness.
An algorithm is also anticipated to be successful in most cases. This means that all of the
operations to be performed in the algorithm must be simple enough that they can be done
precisely and in a finite amount of time.
Generality.
53
54
SUM= A+B
PRINT (SUM)
END WHILE
END
55
Determine the steps involved in the process of writing and executing a program.
56
The next step for you as a programmer is to code the program—that is, to express your
answer in a programming language. You will convert the reasoning from a flowchart or
pseudocode—or other tool—to a programming language. As previously said, a
programming language is a collection of rules that instructs the computer on what actions to
conduct. Although programming languages are grammatically similar to English, they are
significantly more exact. To get your program to run, you must strictly adhere to the rules—
the syntax—of the language you are using. Of all, correctly using the language is no
guarantee that your software will work, any more than speaking grammatically correct
English implies that you know what you're talking about. The point is that proper language
usage is the necessary first step. The coded software must next be entered in, most likely
using a terminal or personal computer, in a format that the computer can understand.
Another thing to keep in mind is that programmers typically use a text editor, which is
similar to a word processing tool, to create a file that includes the program. However, as a
newbie, you should definitely start by writing your computer code on paper
(Homepage.cs.uri.edu,2022).
57
this phase a step further with a walkthrough, which is a procedure in which a group of
programmers—your peers—review your software and make collegial comments.
Debugging. Debugging, a phrase commonly used in programming, refers to the process of
identifying, finding, and repairing defects (mistakes) by executing the program. These
defects are logic mistakes, such as instructing a computer to repeat an action but failing to
instruct it on how to cease doing it. During this stage, you execute the software using test
data that you create. To ensure that you test every aspect of the software, you must carefully
organize the test data (Homepage.cs.uri.edu,2022).
58
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
59
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.
Dry run Fibonacci series,
60
61
Examine what Big-O notation is and explain its role in evaluating efficiencies of
algorithms.
Big-O notation.
We utilize Big-O notation to express how long an algorithm takes to run (time complexity)
or how much memory it consumes (space complexity). The best, worst, and average-case
execution times of an algorithm can all be expressed using Big-O notation. We'll
concentrate on Big-O as it relates to time complexity for the sake of this discussion
(Linkedin,2020).
Constant Time.
Because regardless of the quantity of the input, running an algorithm requires a same
amount of time.
Bookmarks are an excellent example of how continuous time might manifest itself in the
"real world." Bookmarks allow a reader to quickly and efficiently find the last page that
they read. It makes no difference whether you're reading a book with 30 pages or a book
with 1000 pages. If you're using a bookmark, you'll be able to find the final page in a single
step.
Operations,
math operations
62
When accessing the 0 index, passing small Collection or gigantic Collection results in the
same O (1) runtime. The return of first Index is a constant time operation as well. Both of
these actions will take the same amount of time regardless of the magnitude of time
(Linkedin,2020).
Linear time.
This indicates that the run time grows at the same rate as the input.
Reading a book is an illustration of how linear time might behave in the "real world."
Assume that reading a single page of a big print book takes me precisely one minute. Given
63
that, a 30-page book will take me 30 minutes to read. Similarly, a book with 1000 pages
equals 1000 minutes of reading time. Now, I don't push myself to complete bad novels, so
there's always the possibility that I won't get through that 1,000-page tome. However, before
I begin reading it, I know that my worst-case reading time for a 1000-page book is 1000
minutes.
The number of operations required to loop over n is proportional to the size of n. In general
(but not always), finding a loop is a good sign that the particular bit of code you're looking
at has a run time (Linkedin,2020).
64
Quadratic Time.
The calculation takes quadratic time, which is the square of the input data size.
65
66
logarithmic Time.
So, the running time grows in proportion to the logarithm of the input size, implying that
while the input size grows exponentially, the run time minimally increases.
This process of searching through a physical dictionary is an example of a binary search
operation in programming, which is the most commonly used example when discussing
logarithmic run times (Linkedin,2020).
Merge sort.
67
Tim sort.
Heap sort.
68
CPU speed.
Operating system efficiency.
Memory capacity.
69
The significance of big O notation is that it provides an approximate estimate of how the
program will behave when "scaled" to address larger (more complicated) issues.
A program that scales linearly — i.e. O(n) — slows down proportionally to the amount of
input it receives, similar to how a line does: two times the work, twice the time to complete it,
four times the work, four times the time to complete it—simple ratio. A program that scales
quadratically, i.e. O(n2), becomes substantially slower much faster than that, requiring two
times the work and four times the time to complete. And it took four times as much effort and
sixteen times as long to complete. When you double the task by 100, it takes 10,000 times as
70
long. As a result, when employed in production contexts with high demands, a program with
O(n2) becomes unworkable. It's not easy to add extra hardware to make it "quick enough."
Because the program is O(2n), even moderately small inputs rapidly become excessively
enormous; add one more item, and the time doubles; add two things, and the time doubles
again.
If the software is O (log n), on the other hand, you may double the amount of work it needs to
accomplish while just being a fraction slower. It doesn't matter how big the problem is; it
always takes the same amount of time to fix it. There are other others. O (n log n) is better
than quadratic but not nearly as good as linear. Cubic is more difficult to solve than quadratic,
but not as difficult as exponential. The list goes on (Quora).
71
72
Activity 2
73
what style or approach we're referring to. It is a method of building objects and programs in
object-oriented programming, a method of solving issues using a sequence of functions in
functional programming, or a method of creating logic with a series of symbols in logic
programming.
If a programming language supports or comes under a certain paradigm, it indicates it has a
unique feature or takes a specific approach to solve a specific type of problem.
Example;
By concealing critical data and identifying methods with the entities, object-oriented
programming is best suited for constructing real-world entities. C++, Java, Python,
and other programming languages are examples.
The easiest way to create logic with a complicated symbol structure is to use logical
programming.
74
Procedural programming.
In these paradigms, programs are performed step by step by modifying the program's
present state.
An imperative program is made up of commands that the computer executes in order to
modify the program's state. Imperative programming is concerned with how a program
works, as opposed to declarative programming, which is concerned with what the program's
end result will be (Tutorialstonight,2021).
75
C.
C++.
Java.
PHP.
Rugby.
Scala.
Pascal.
These programming languages support procedural paradigm (Solsarin,2021).
76
Disadvantage,
77
1. Variables that affect the entire world: A global variable is a variable that may
be read by any other process running in the program, and it can also be
accessed by any other task operating in the program. The majority of the
time, a global variable is a static variable with a scope that spans the whole
program's execution.
2. The parameter is being passed: Variable values can be sent through to the
application, which will handle it using a procedure, using parameter passing.
3. Modularity: Modularity is a software strategy that divides functionality into
individual, replaceable modules, each of which can do the unique task for
which it was created. These all work together as separate jobs to reach a
common aim.
4. Libraries for programmers: Programming libraries are a collection of ready-
to-use scripts, routines, subroutines, classes, and variables that the program
and its users may access at any time.
5. The paradigm of procedural programming: Structured programming gives
rise to procedural programming. Procedures, sometimes known as methods,
functions, routines, or sub-routines, are essentially a set of computer
procedures that must be followed. Procedures can be performed at any
moment within the program, and other procedures may call out another
procedure during its cycle of execution (Sites.google,2020).
Object-oriented programming,
78
Object Oriented Programming (OOP) is a programming paradigm that uses classes and
objects. It's utilized to break down a software program into reusable code blueprints (called
classes) that may be used to build specific instances of things. Object-oriented programming
languages include JavaScript, C++, Java, and Python, to name a few.
A class is a generic template that can be used to make more specialized, concrete things.
Classes are often used to indicate broad groupings with similar characteristics, such as Car
or Dog. Classes can also have functions known as methods that are exclusively available to
objects of that kind. These functions are specified within the class and execute an action that
is beneficial to that particular object type.
For example, our Automobile class may contain a repaint function that modifies the color of
our car. Because this function is only useful for Car objects, we declare it as a method
within the Car class (Educative.io,2020).
Advantages of OOP,
79
Disadvantages of OOP,
The length of programs written in the OOP language is significantly greater than that
of programs written in the procedural technique.
As the program grows in size, it takes longer to execute, resulting in slower program
execution.
Because OOP is not a universal language, we can't use it everywhere.
It is only used when absolutely necessary. It is not appropriate for all types of issues.
Because using OOP is a little challenging, programmers must have excellent design
and programming skills, as well as adequate planning (Geeksforgeek,2022).
Features of OOP,
80
Characteristics of OOP,
Class definitions: OOP's fundamental building elements and a single entity that
combines data and data operations.
Objects: are the instances of a class that are utilized in real-world functionality,
including their variables and actions.
Encapsulation: is a property of a class that binds data and data operations together in
a single unit.
Inheritance and class hierarchy: Reusability and expansion of existing classes.
Generic classes: are class definitions for data that isn't provided. Container classes
are what they're called. They are re-usable and bendable (Careerride,2014).
81
82
1. 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.
2. 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.
83
3. Functions of Triggers.
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.
4. Events.
Events in this software include mouse, computer keyboard, and user interface events. This
implies that the user must interact with a program object, such as clicking a button with a
mouse, selecting a button with the computer keyboard, and so on.
84
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 (Studybay,2022).
Advantages of Event-Driven Programming,
Advantages,
Flexibility.
Graphical Interfaces.
85
Suitability Event-driven allows the user to pick different tools from the toolbar to construct
what they need immediately, such as buttons, radio buttons, and so on. This also enables
users to place things where they want them and edit them immediately. Some individuals
find it simpler to alter something by simply clicking on it.
Are Simple to Locate It is simple to find natural dividing lines for unit testing infrastructure.
Easily decomposable.
It decomposes quickly.
86
For both sides of the DevOps Bridge, it provides for a very clear and understandable
paradigm.
Disadvantages,
Complex.
Less logical and self-evident.
Error is difficult to locate.
Slower.
Confusing.
Coupling that is too tight.
Blocking (Benchpartner,2021).
87
of building your own event loop and allows you to take advantage of numerous libraries that
already work with the system's event loop. Event-based applications are frequently, but not
always, written in an object-oriented paradigm.
These three groups are thus not technically hierarchical, although they are typically nested
inside one another in common usage.
From start to completion, a procedural is written as a series of steps that occurs one after
another.
Object-oriented programming is the process of creating an object and the actions it can do,
and then having other objects inherit those functions to create new objects that contain the
prior objects.
When you declare what happens when something happens, and the software only executes IF
and WHEN that event occurs, you're using event-driven programming.
Simply put, procedural programming is the only way to program. The event-driven and
object-oriented approaches simply assist programmers in managing the complexity of huge
applications.
88
Programs may easily grow to be hundreds of thousands of lines of code in size. COBOL and
other older programming languages dealt with this complexity by allowing the creation of
paragraphs or by moving some code to external programs that can be called from a main,
central, or controlling program that assigns values to variables that will be used as parameters
by the called program. On termination, the called program would relinquish control to the
caller program and may or may not return some values as specified. When a called program
calls another sub-program with or without arguments and may or may not get a return value,
it is referred to as a nested calling.
When software design and development are allocated to a big number of programmers who
may be scattered across numerous locations, this process seems straightforward but may
become exceedingly unpleasant and unmanageable.
Simply said, event-driven programming makes use of event handlers to maintain a significant
amount of code on hand and is ready to use as needed. If this code is not required, it just sits
on the sidelines, without interfering with or cluttering the other code. Now the program is a
collection of subprograms, each of which is responsible for a discrete and distinct event such
as a comma button, drop-down list, or text box. The controlling software (for example, a
form written in Visual Basic) simply keeps track of various events and executes the code
stored in the event handler designated for that event.
89
would suggest a drug that comes in capsules rather than a large bottle or box. Other classes
can be used to construct new ones. This is referred to as inheritance. A function or variable
belonging to one object might have the same name as another object's function or variable.
Polymorphism is the term for this. Objects produced from classes interact in a disciplined,
well-defined, and organized manner with the primary, controlling function as well as other
functions, variables, and objects (Quora,2018;2020).
90
91
92
93
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.
94
95
96
97
In the code editor, the user writes and modifies source code. The compiler converts the
source code into a machine-readable language that can be executed. The debugger, on the
other hand, examines the software for any flaws or defects. Programmable editors, object
and data modeling, unit testing, a source code library, and build automation tools may all be
found in an IDE.
The toolbar of an IDE resembles that of a word processor. Color-based categorization,
source-code formatting, error diagnostics and reporting, and intelligent code completion are
all made easier with the toolbar. A developer or a team of developers can compile and run
code incrementally and manage changes to source code in a consistent manner using an
IDE's interface. Third-party version control libraries, such as GitHub and Apache's
Subversion, are commonly integrated with IDEs. Model-driven development can be aided
by an IDE (MDD). A developer using an IDE begins with a model, which the IDE then
converts into appropriate code. After then, the IDE automates the debugging and testing of
the model-driven code. The build can be distributed for additional testing once it has been
successfully completed and thoroughly tested.
Benefits of IDE,
Software developers can increase their productivity by using an IDE since it allows them to
quickly set up and standardize their tools.
Without an IDE, developers waste time determining which tools to use for certain tasks,
configuring them, and learning how to use them. A single integrated development
environment contains many, if not all, of the essential dev-test tools.
The different types of IDEs and the tools that are available,
98
Developers must choose an IDE that is appropriate for the type of application they wish to
create. If a developer wants to make an iOS app, for example, they'll need an IDE that
supports Apple's Swift programming language. Web-based and cloud-based IDEs, as well as
mobile, language-specific and multi-language IDEs, are all available.
Web-based IDEs are ideal for developing web-based applications in HTML, JavaScript, or
other programming languages. A web-based IDE with capabilities including a code editor,
syntax highlighting, code completion, and debugging is Microsoft's Visual Studio Code.
IDEs are increasingly being delivered via a platform as a service (PaaS) architecture. Access
to software development tools from anywhere in the globe, on any compatible device; low
to nonexistent download and installation requirements; and ease of cooperation among
geographically dispersed developers are just a few of the advantages of these cloud-based
IDEs. Cloud9 is an AWS-provided integrated development environment that supports up to
40 languages, including C, C++, Python, Ruby, and JavaScript. Cloud9 provides code
completion, an image editor, and a debugger, as well as support for Microsoft Azure and
Heroku deployments (which is a cloud-based PaaS IDE). An IDE for mobile development is
often used to build code for iOS or Android devices. Xamarin is a cross-platform mobile
IDE, which means it can write code for a variety of different mobile platforms. A developer
may create a feature in C, for example, and Xamarin will convert it to Swift for iOS and
Java for Android. Xamarin also provides user interface tests and may deliver beta tests to
users.
C-Free, for example, is a language-specific IDE that includes a code editor, debugger, and
environment for running C and C++ programs. Other IDEs, such as the aforementioned
99
Cloud9 and Visual Studio Code, allow several languages. NetBeans, Eclipse, and IntelliJ
IDEA are some of the more popular IDEs (Techtarget,2018).
Main components and features of IDE,
Editor for text A text editor for writing and manipulating source code will be
included in almost every IDE.
Debugger. Users can utilize debugging tools to help them find and fix issues in their
source code.
Compiler.
Finishing the code
Language support is available.
Plugins and integrations are two types of software that can be used together
(Easierwithpractice,2020).
100
Visual Studio's Evolution: The initial version of Visual Studio, dubbed Visual Studio 97 and
bearing version number 5.0, was published in 1997. Visual Studio 15.0 was published on
March 7, 2017, and it is the most recent version. Visual Studio 2017 is another name for it.
The was backed. In the most recent version of Visual Studio, the Net Framework versions
range from 3.5 to 4.7. Java was supported in previous versions of Visual Studio; however, it
is no longer supported in the most recent version (Geeksforgeeks,2019).
There are 3 editions of Microsoft Visual Studio,
Community: In 2014, it was announced that a free version will be available. The rest of the
editions are compensated. This edition has features that are similar to the Professional
edition. Any independent developer may create their own free or paid apps using this
edition. There are several types of apps, including net applications, web applications, and
others.
Visual Studio Professional: is the commercial edition of the software. Visual Studio 2010
and subsequent versions include it. It features tools like Server Explorer and interaction
with Microsoft SQL Server, as well as support for XML and XSLT editing. This edition is
available for a free trial period, after which the user must pay to continue using it.
Enterprise: It's a fully integrated, end-to-end solution for teams of any size with high-
quality and scalability requirements. This edition comes with a 90-day free trial from
Microsoft, after which the user must pay to continue using it. This edition's key advantage is
that it is very scalable and produces high-quality software (Geeksforgeeks,2019).
Features of Visual Studio IDE,
101
Visual Studio features a code editor that enables syntax highlighting and IntelliSense code
completion for variables, functions, methods, loops, and LINQ queries, much like any other
IDE.
When designing web pages and web applications, IntelliSense is enabled for the featured
languages as well as XML, Cascading Style Sheets, and JavaScript. In a modeless list box
above the code editor window, near the editing cursor, autocomplete recommendations
show. It can be briefly semi-transparent to see the code obscured by it in Visual Studio 2008
and later. All supported languages use the code editor.
Debugger:
Visual Studio comes with a debugger that may be used as a source-level and machine-level
debugger. It supports both managed and native code and may be used to debug programs
developed in any Visual Studio supported language. It also has the ability to attach to
running processes, monitor, and debug them. If the running process' source code is
accessible, it displays the code as it is executed. It can display the disassembly if the source
code is not accessible.
Designer:
102
Visual Studio comes with a slew of visual designers to help with app development. These
are some of the tools.
is used to view and switch between all open tabs. CTRL+TAB is used to start it.
Properties Editor:
The Properties Editor tool in Visual Studio is used to modify properties in a GUI window. It
provides all accessible properties for all objects, including classes, forms, web pages, and
other things (both read-only and settable).
103
Solution explorer:
Sever explorer:
104
On a machine that is accessible, the Server Explorer program is used to manage database
connections. It may also be used to access and use data from running Windows Services,
performance counters, the Windows Event Log, and message queues.
Mapping designer:
LINQ to SQL uses the mapping designer to construct the mapping between database
schemas and the classes that encapsulate the data starting with Visual Studio 2008.
ADO.NET Entity Framework, a new ORM approach solution, replaces and enhances the
previous technology (Wikipedia).
105
single-step, and other features. You open the profiler because you need to profile the code.
Rinse and repeat as needed. An IDE simply brings everything together in
one place, and may save/hide some compiler and linker parameters unless you require direct
access to them. The IDE is designed to boost productivity, but if you've worked with
separate development tools and their numerous features before, the gains may not be as
large as you anticipate. Don't get me wrong: I'm a big believer in the power of positive
thinking I enjoy using integrated development environments (IDEs) and do so frequently.
When they're not accessible for a given set of tools, though, I'm quite happy to use the
individual tools.
Long before the advent of IDEs, a great deal of software development took place. And even
if an IDE for a needed mix of development tools isn't available today, software development
continues (Quora,2021).
Using IDE for develop a system,
You'll need to create a variety of items that interact with one another, including code, UI,
project structure, environment configurations, and more. Efforts to make the software
development process easier have resulted in a plethora of software tools that help with a
variety of design and development tasks. An integrated development environment is one
such set of tools (IDE). If you're looking at integrated development environments, you're
probably a seasoned programmer.
Otherwise, a low-code development platform or a no-code development platform might be a
better fit. These tools offer more drag-and-drop features than a real IDE, which includes
code editors as well as development tools like compilers, auto-completion, class
exploration, and hierarchy diagrams. They give almost all of the tools a programmer
requires to construct and build a program from start to finish. While operating their apps,
106
developers utilize an IDE to write, manage, and execute code. It simplifies the development
process by separating distinct components of code editing into separate apps (G2,2021).
Activity 4
107
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. 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.
108
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.
What is debugging,
Debugging is the systematic process of discovering and eliminating computer program
defects, mistakes, and anomalies using debugging tools. Professionals are adopting crucial
components of the process such as intensive testing, upgrading, troubleshooting, and
maintenance as they design software systems.
Normally, the software has mistaken and defects that are fixed on a regular basis. To
discover and correct errors, full software programs are frequently compiled and performed
during the debugging process. Large software applications with millions of lines of source
code are broken down into smaller components. To save time, each component is debugged
independently first, followed by the entire program. In general, how debugging works is
determined by the global testing methodologies employed. Debugging is a useful barometer
for how we generate technologies in general since it is a basic aspect of code handling and
software development. It represents what we've been able to do with programming
languages in the age of digital automation and artificial intelligence. Debugging advances in
lockstep with the technology we use to create and build programs, to put it another way.
Debugging is typically described as involving "people, procedures, and systems" that will
assist in resolving any issues with an existing code base. So how this works varies
109
depending on the era: for example, debugging in bare-metal settings on linear, non-object-
oriented programs in the early days of the PC would differ from debugging now.
The emergence of current procedures known as "reverse debugging" is a great illustration of
this.
Reverse debugging, in the age of Develops and agile software development, entails
monitoring programs and giving data in certain ways in order to automate the debugging
process. Individual computer scientists used to perform this in a method that looked a lot
like technical detective work.
In the old days, programmers would write separate tickets after discovering a functional
fault during testing, then go back and sift through the code with now-rudimentary debuggers
to figure out what was wrong. Even a seasoned team might get "stumped" for a long, either
due to the complexity of the code that caused the problem, the elusiveness of the bug in
testing, or both.
Reverse debugging systems, on the other hand, are designed to follow programs in real-time
or otherwise monitor programs in order to supply the proper information and make
debugging more of an automated process, similar to the design of flight recorders in aero
planes. Reverse debugging tools will detect more of the subtleties that computer scientists
would have to study on their end if they did more sophisticated monitoring in real-time or as
programs are utilized. Testing has also altered, with certain CICD and associated procedures
requiring engineers to perform some testing and others requiring end-users to perform
testing in a production environment, beta, or elsewhere in the pipeline. Finally, debugging
will remain an important element of maintaining a codebase (Techopedia,2020).
Importance of debugging,
110
If it's been debugged, it promptly reports the mistake. It delivers essential data regarding
data structures in an easy-to-understand style. It aids the developer in the removal of
irrelevant and distracting data.
Setting breakpoints, stepping over, and stepping into functions that are being utilized can cut
development time in half. Debugging not only saves time during development, but it also
helps you better understand your code's logic and flow system—this isn't the major benefit
of debugging, but it's a nice side effect.
Debugging is essential on a variety of levels. Debugging is, in some ways, a euphemism for
"coding" or "creating a program." The thing is, with programming, anything operating on
the first try or being faultless the first time is paradise or the best-case scenario. It is nearly
certain that it will never happen. Because it's just not possible to properly comprehend an
issue in terms of hundreds of lines of code, even if you can conceptualize it and reduce it to
its most basic states. It could be true for little details, but in a larger enterprise, that will
never be the case.
There are accounts and anecdotes of people who manage multimillion-dollar businesses and
products whose code, when properly evaluated, turns out to have hundreds of catastrophic
defects. Now, depending on the type of goods, this may or may not be important. Some
consumers don't mind if there's a minor issue in their application or anything - you know -
yet for others, a bug might be a deal breaker (Bitlapstudio,2018;Datacyper,2020).
Steps of debugging,
Identifying the issue and preparing a report
Assigning the report to the defect's software engineer to ensure that it is real.
Modeling, documenting, discovering and testing candidate defects, and so on are all used in
defect analysis.
By making the necessary adjustments to the system, defects can be resolved.
111
So, you've built a function call that looks something like this:
Furthermore, the compute average function does not deliver the desired result. You could
put a breakpoint within compute average if you were using a debugger and wanted to step
into it, but what if it was called from many places? The debugger in Visual Studio includes a
very handy function that allows you to easily step into compute average.
112
Step into the function once the debugger has hit it. Before compute average, both get Sum
and get Count will be called. Normally, you'd keep pressing next to exit get Sum and get
113
Count, but with Visual Studio, you can rapidly exit the current function and return to the
next call by pressing Shift-F11
You'll be transported back to the original breakpoint after you exit the current function.
However, you can now re-enter to proceed to the next function. Repeat until you've found
the function you're looking for.
Obviously, there are situations when simply setting a breakpoint in your target function
makes more sense. But it might not be worth it if it means ignoring hundreds of calls to that
function in order to get the one you want. Step out allows you to quickly enter a function
without having to first locate it and set a temporary break point (or use run to cursor).
114
Sometimes programmers may create code like this to get around a problem:
(Obviously, the software writes out the value in this situation, so all is not lost.) In most
cases, this isn't the case.) Thankfully, the vehicles window has the decency to show the
outcome of a function evaluation:
115
Run to Cursor:
gets called a lot from multiple locations and you just care about one code route. Then you
can put a breakpoint at the beginning of the route and use run-to-cursor to get to the part
116
you're interested in. To get into compute average in our sample program, we may use run-
to-cursor instead of the step-out approach. (Of fact, we could just put a breakpoint in
compute average; but, for the sake of this example, assume 15-20 calls to compute
average that all function well, occurring before the faulty call.)
117
When you need a quick breakpoint or don't want to go through a lot of code in a single step.
However, make sure you're running to a section of the code that will be used. Early returns
from a function inside a loop, for example, should be avoided.
Now that we've arrived at the compute average function and determined that the value
returned is far too large, we can examine the function's parameters. That sum turns out to be
quite significant. We'll get to it in a minute. First, let's check to see if the function works if
we obtain the correct value.
118
Passing in a new value is obviously one method to accomplish this. However, Visual Studio
makes it simple to update any value in memory. In reality, let's try it with the total value and
see whether it yields the proper result. Simply modify the value in the Value column of the
auto or watch window. (You may also accomplish this by hovering over a variable in the
source code and seeing the variable's value come up.)
Continuing to run the application reveals that we are still getting the erroneous answer—this
time, the value 1 is returned. This indicates that truncation is occurring as a result of integer
division.
119
This technique is effective, and it's especially useful when you've discovered one error but
still need to verify that the remainder of your code works. This is especially useful if your
debugging session involves a lot of setups—for example, if you need to do a lot of UI to
acquire the appropriate inputs or if your code takes a long time to develop. (Another option
is to write a unit test that shows the problem but does not require as much preparation.)
However, you can't use this method when you're within a loop or a function that's called
frequently—simply it's too inconvenient to have to manually set variables all the time.
The Set Next Statement is an extremely useful feature. You can occasionally "unwind"
execution if you're debugging and you've mistakenly (or not so unwittingly) stepped past
the point when anything interesting happens. What this truly implies is that you may tell
Visual Studio to go back and start executing from a prior command while keeping the
current state of the environment.
You may also use the set next statement to go beyond a conditional test on an if statement to
execute a route of code that you wish to debug without having to make the condition true. If
the stack or registers aren't in the correct state for the line being run, setting the next
statement can be risky and unstable. And, because it won't restore the world's state,
modifying the next sentence might not be beneficial if your code relies on it. On the other
120
hand, if you want to make a choice that you're very certain won't go wrong, it may be a
wonderful method to prevent repeating a specific failure just because you stepped too far .
It may be incredibly easy to be able to just say, Ok, let's do that again, if you had mistakenly
run too far.
Figure 21:debug fea(Source: Cp programming)
121
After that, you may repeat the loop, perhaps changing the value of total to 0 because it
wasn't initialized, and checking to see if the program returns the right sum (in which case,
you can be pretty confident that the lack of initialization was the problem).
Many of the same issues apply as they do when reset variable values. However, the further
ahead or back in a function you place the next statement, the less likely the debugger will be
able to adapt, and your program may crash. This approach is frequently used to skip over
122
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.
123
Limited usage of global: These rules specify which types of data are allowed to be
declared global and which are not.
Common headers for different modules: The headers of distinct modules should follow a
standard structure and information for easier understanding and maintenance of the code.
The header format must have the following items, which are often utilized in different
companies:
124
The module supports a number of functions, each with its own set of input and output
parameters.
Local variables, global variables, constants, and functions use the following naming
conventions:
The use of variables with meaningful and intelligible names makes it easier for everyone
to understand why they are being used.
Local variables should be named in the camel case, with a tiny letter at the beginning (e.g.
local data), but global variables should be named with a capital letter (e.g. Global Data).
Only capital letters should be used to construct constant names (e.g. CONSDATA).
It's preferable to avoid using digits in variable names
The function names should begin with tiny letters and be written in camel case.
The function's name must clearly and succinctly convey why the function is being used.
125
Indentation: To improve the readability of the code, proper indentation is critical. White
spaces should be used appropriately by programmers to make their code understandable.
Between two function parameters, there must be a space following the comma.
Each nested block must be indented and spaced correctly.
At the start and conclusion of each program block, proper indentation should be used.
All braces should begin on a new line, as should the code after the braces.
To make debugging easier, any methods that encounter an error situation should return a
0 or 1.
Coding guidelines, on the other hand, provide some basic recommendations for coding
style to be followed in order to improve the code's understandability and readability.
126
Each variable should have a descriptive and meaningful name that explains why it is
being used. When one identifier is used for several reasons, this is not feasible, and the
reader may become confused. Furthermore, it makes future upgrades more difficult.
Code should be well-annotated so that it is easy to comprehend. The code becomes more
understandable by adding comments to the statements.
127
Using the GOTO statement causes the program to become unstructured, making it
difficult to comprehend and debug (Geeksforgeeks,2019).
why coding standards are important for a team as well as individual developer.
128
The other main one is part of a team, so instead of dealing with quirky small blocks, the
code seems similar to us all.
Others:
Never add SQL Strings as a security standard,
Don't use null,
for example.
Beliefs: Don't utilize code generators,
for example. To activate the XYZ code generator, precede with 'XYZ_'.
While the establishment of coding standards has the potential to be extremely beneficial,
it also has the potential to be quite costly. The establishment of coding standards is
viewed by many software professionals as a theological fight. Their attitude is frequently
expressed as "nobody is going to teach me how to perform my job."
Apart from that, the first step in creating a coding standard is to identify the objectives
that must be met. Are you only attempting to make all of the code appear to have been
written by a single individual, or are you attempting to verify that the code is devoid of
security flaws and/or safety risks? All people working on the standard must have the same
purpose in mind.
Look for established code standards, either inside your firm or on the internet. Starting
with a blank sheet of paper is more difficult than tailoring an established standard.
Every coding standard will need to be verified in some way. You can enforce the standard
by verifying it. If you don't plan on enforcing the standard, you might as well not design it
at all.
Many static analysis tools are available to aid in the verification of coding standards.
Before designing your standard, you might wish to look at the possibilities of such tools.
Automatic coding standard compliance verification is significantly more reliable and less
expensive than manual coding standard compliance verification.
129
As straightforward as that,
Code rewriting/debugging/analysis/code review/CI
You can quickly find a solution on the internet because you adhere to a set of rules.
If there is a turnover, you can always recruit someone who is familiar with the standard.
Coding guidelines are created with a few objectives in mind:
Consistency improves the readability of code.
Establishing best practices will help you avoid typical blunders.
130
131
132