Professional Documents
Culture Documents
Tharaka
Assignment title
Student’s name
Y/N
Y/N
Assessor signature Date
Date
Confirm action completed
Give details:
Date
Programme Leader
signature (if required)
Date
Higher Nationals - Summative Assignment Feedback Form
Unit Title
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
Integrated Development Environment (IDE).
* 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
Feedback: Student to Assessor
Assessor Date
signature
Student Date
signature
Pearson Higher Nationals in
Computing
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.
Word Processing Rules
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
Assignment Title Design &Implement a GUI based system using a suitable
Integrated Development Environment
Issue Date
Submission Date
Submission Format
This submission will have 3 components
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.
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 suitable Integrated Development
Environment (IDE).
LO4. Determine the debugging process and explain the importance of a coding
standard
Assignment Brief and Guidance:
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.
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 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.
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
And, I would like to express my gratitude to all my batch mates who guided me
and taught me a great deal about this module.
Contents
Activity 01................................................................................................................................21
What is an algorithm............................................................................................................21
Algorithms to display the Fibonacci series and the factorial value......................................22
Fibonacci series................................................................................................................22
Factorial value..................................................................................................................23
Write the Python program code for the above two algorithms and critically evaluate their
efficiencies using Big-O notation.........................................................................................24
Python code for Fibonacci series......................................................................................24
Python code for factorial value........................................................................................25
Examining what Big-O notation is and explaining its role in evaluating efficiencies of
algorithms.............................................................................................................................26
Program............................................................................................................................29
Dry run.................................................................................................................................31
Activity 02................................................................................................................................32
Programming Paradigm........................................................................................................32
The main characteristics of Procedural, Object oriented and Event-driven paradigms.......33
The relationships among Procedural, Object oriented and Event driven paradigms...........40
Snippets of code as example for Procedural, Object oriented and Event-driven
programming paradigms using a suitable programming language(s)..................................41
Critically evaluating the code samples given above in relation to their structure and the
unique characteristics...........................................................................................................44
Critically evaluating the snippets of code given as example for Procedural programming
..........................................................................................................................................44
Critically evaluating the snippets of code given as example for Object oriented............44
Critically evaluating the snippets of code given as example for Event-driven................45
Activity 03................................................................................................................................46
Suitable algorithms for vehicle tariff calculation for rents and hires...................................46
Function 1: Rent calculation.............................................................................................46
Function 2: Day tour - Hire calculation............................................................................47
Function 3: Long tour - Hire calculation..........................................................................48
Evidence of using visual studio IDE (using C#.net) to Implement the above algorithms and
the design of suitable database structure to store the tariffs for vehicle types and different
packages...............................................................................................................................49
Visual studio IDE (C#.net) Implementation of the above algorithms..................................53
Integrated Development Environment (IDE).......................................................................65
Visual Studio IDE................................................................................................................68
Using Visual Studios IDE vs not using an IDE...................................................................71
Examples on how using Visual studio IDE was better compared to not using an IDE.......72
Example 01.......................................................................................................................72
Example 02.......................................................................................................................72
Example 03.......................................................................................................................73
Activity 04................................................................................................................................74
Designing and building a small system to calculate vehicle hire amounts and record them
in a database for customer billing and management reporting for Ayubo drive..................74
The debugging process and the features available in Visual studio IDE for debugging....100
Using the debugging process to develop more secure, robust application.........................102
Coding standards................................................................................................................105
The coding standards That I have used in my application development............................108
Critically evaluating why a coding standard is necessary for the team as well as for the
individual............................................................................................................................110
Conclusion..............................................................................................................................111
Activity 01
What is an algorithm
An algorithm is defined as a step-by-step procedure for successfully completing a task.
Algorithms can be written in a variety of languages, including English, Japanese, and others.
Algorithms have been precisely specified using a suitable math formalism. It is based on
completing a series of predefined activities. It is frequently used for data processing,
computation, and other computer and mathematical tasks. Using algorithms, we can develop
functions in computer programming (Anon., n.d.).
Those functions can be used as mini programs that a larger program can reference.
An example for algorithm to calculate its average and display the result.
Begin
Input a, b, c, d, e
Total = a+b+c+d+e
Average = total/5
Print average
End
• The algorithm should be very clear. Each of its steps must be clear in every aspect
and lead to only one meaning.
If an algorithm says to take inputs, it should be inputs that are well defined.
• The algorithm must clearly define what output will be generated and must be well
defined.
An Algorithm should have 0 or more inputs
An Algorithm should have 1 or more outputs
Start
Step 01 – define function named fibona (n)
Step 02 – inside step 01 do the following if statement
Step 03 – start if statement where n == 0, return the value 0
Step 04 – in elif n == 1, return the value 1
Step 05 – in elif n == 2, return the value 1
Step 06 – if it not in the above, put else statement to return (fibona (n -1) + (n - 2))
Step 07 – End if
Step 08 – declare variable x
Step 09 – ask user to input a value for x
Step 10 – assign the value of x to n in fibona(n) and print it
End
Factorial value
Start
Step 01 – define a function named facto (n)
Step 02 – start if function
Step 03 – if the value of n == 0, then return 0
Step 04 - if the value of n == 1, then return 1
Step 05 – in else statement, return facto (n - 1) * n
Step 06 – end if
Step 07 – declare variable x, and ask user to input an int value for x
Step 08 – assign the value of x to the function above and print the answer
End
Write the Python program code for the above two algorithms and critically evaluate
their efficiencies using Big-O notation.
Input
Output
Python code for factorial value
Input
Output
Examining what Big-O notation is and explaining its role in evaluating efficiencies of
algorithms
This is a way to describe the time taken (“time complexity”) and the memory (“space
complexity”) used by an algorithm. The Big-O notation can express the “best”, “worst”,
and “average-case” running time of an algorithm. Big-O mainly focusses on the “Upper
bound” also known as the “worst-case”. The “running time” in Big-O notation does not
refer to the normal time as we know, but the no of steps taken to complete a problem.
“Big-O notation is a way to track how quickly the runtime grows relative to the size of
the input” (Jamieson, 2022).
Efficiencies of algorithm
Algorithms are divided into efficiency classes based on big-o notation.
Best-case: looking at most favorable situation and check the efficiency of the algorithm.
Worst-case: looking at most adverse situation and analyze the efficiency of the algorithm.
Linear search
In linear search, to find a specific item in a data set (n), it starts from the beginning of a data
set and observes each item until a match is made. The number of steps/ running time that will
take to loop through n is directly related to the size of n. Linear search is simple but not
efficient. For example, if the item that is being searched is the last item in a set of 1,000
items, then the linear search would look for it in 999 items before 1,000 items before getting
the output. The advantage of linear search is that it would work on any data set (ordered or
unordered) (Jamieson, 2022).
Bubble sort
0this is simpler than linear search and binary search. It orders the
numbers in ascending order. For example, if we have a set of numbers that are
not ordered, bubble sort compares the first two numbers and if the first number is
greater than the second, then it swaps positions where the smaller number comes
to the first position. Then it moves to the second position a compare it with the
third number, if it is larger than the third it swaps place where the second becomes smaller
than the third. This process keeps on happening till there is
nothing to compare and all the numbers are in ascending order (Jamieson, 2022)
Binary search
this is considered to be more efficient compared to linear search.
In binary search, the list or set of data must be ordered. Binary search works by
halving the search range each try. For example, say you want to search for a
number in a set of ordered numbers (n), binary search first searches in from the
middle of the number (halves the set of numbers) (n/2), and compares the
number in the first half and second half. Say the number is less than the middle
number, then the number has to be in the first half and ignores the second half.
So, the search is halved again (it starts to compare at the mid-point of the first
half) (n/4). This keeps on going until the said number is found.
This is more efficient since if the number 25 has to be found in a set of 100
numbers, linear search would require 25 steps while binary search would only
require 2 steps (Jamieson, 2022).
Program
A program is set of step-by-step instructions that guide the computer to perform the tasks you
want it to do and to produce the results you want.
The most important steps in write and executing a computer program would be like this
(Anon., n.d.)
Programming Paradigm
The procedural programming paradigm is a programming method that allows for the division
of functionalities into a number of events. A large program is broken down into smaller, more
manageable parts called procedures or functions. Functions are given precedence over data. A
program in a procedural programming language consists primarily of a sequence of
instructions that instructs the computer to do something, such as reading user inputs,
performing necessary calculations, and displaying output.
Local and global data are used in procedural programming. Data contained within the
function is referred to as local data, while data not contained within any function is referred
to as global data. Local data are only accessible to the function where they are declared. As a
result, each function can access both local and global data (Anon., n.d.).
Examples of OOP languages are C++, C#, Java, JavaScript, Visual Basic.NET and
Python.
All OOP languages include mechanisms that aid in the implementation of the object-
oriented model.
Encapsulation, inheritance, polymorphism, and reusability are some of them.
an example for OOP using C#
We can use templates called classes to create objects. Each object contains data and
methods for accessing and manipulating data. A class defines the data and functionalities
that each object contains.
A class consists of a header and a body. The header contains attributes, modifiers, and the
class keyword, whereas the body contains the class members, which are the data members
and member functions.
A class declaration is made up of a class header and a class body. Attributes, modifiers, and
the class keyword are all included in the class header. The class body contains the class's
members, which are the data members and member functions. A class declaration has the
following syntax:
Attributes accessibility modifiers class identifier: baselist {body}
Attributes provide additional context to a class, like adjectives; for example, the
Serializable attribute. Accessibility is the visibility of the class. The default accessibility
of a class is internal. Private is the default accessibility of class members. The following
table lists the accessibility keywords (Anon., n.d.)
Encapsulation is a mechanism that combines the data that it manipulates and codes. It
protects them from outside interference and misuse. In OOP, code and data can be
combined to form a self-contained box. When data and code are combined in this manner,
an object is created, and encapsulation is present.
To their object, code, data, or both can be private or public. A private piece of code or data
can only be accessed by another part of the same object; it cannot be accessed by a program
running outside of the object. However, when a code or data is made public, other parts of a
program outside of its object can access it (Anon., n.d.).
Inheritance
Polymorphism
Polymorphism treats various objects in the same way. This is an advantage of inheritance.
Based on the derived type of the base reference, we can determine the correct call at
runtime. This is known as late binding (Anon., n.d.).
Reusability
Reusability refers to the ability of a class that has been written, created, and debugged to be
given to other programmers for use in their own program. This is referred to as a component
or a DLL in.NET terminology. In OOP, inheritance extends this concept (Reusability) by
allowing a programmer to use an existing class and add new features to it without
modifying it.
Advantages of OOP
Data encapsulation: this allows programmers to hide parts of the code or restrict
access to data in parts of a program which makes the program more secure.
Disadvantages
object-oriented program requires more time during compilation and for dynamic
and runtime support it requires more resource and processing time therefore
Compiler and runtime overhead is high.
complex application.
Input
Output
Simple code for Object oriented programming paradigms using c#
Input
Output
Enter 1st number; 5
Enter 2nd number; 15
Enter 3rd number; 25
Average of three number is 15
simple code for Event-driven programming paradigms using c#
Critically evaluating the code samples given above in relation to their structure and the
unique characteristics
Critically evaluating the snippets of code given as example for Procedural programming
Critically evaluating the snippets of code given as example for Object oriented
As shown in the code, I created an instance called 'averageNumbers' to calculate the average
of three numbers. Within this instance, I've written code to compute the sum of the three
numbers and the average by dividing it by three. The user is then prompted for three
variables inside Main, where the codes are executed. Then I use the instance
'averageNumbers' with the three inputs to calculate the average. In object-oriented
programming, we can create objects as described above and call them as needed (rather than
rewriting the entire code).
Critically evaluating the snippets of code given as example for Event-driven
Suitable algorithms for vehicle tariff calculation for rents and hires
Begin
function getRentTotal(string vehicleID, int days, bool driver)
input: dailyRent, weeklyRent, monthlyRent, driverRent
process: noOfMonths = days/30
process: noOfWeeks = (days% 30)/7
process: noOfDays = (days % 30) % 7
process: if (driver == false) then
process: driverRent = 0
process: endif
process: totalRent = (noOfMonths * monthlyRent) + (noOfWeeks * weeklyRent) +
(noOfDays * dailyRent) + (days*driverRent)
output: totalRent, (noOfMonths * monthlyRent) , (noOfWeeks * weeklyRent) ,
(noOfDays * dailyRent) , (days*driverRent)
End
Function 2: Day tour - Hire calculation.
Begin
function getDayHire(string vehicleID, string packageName, int hours, int km)
input: baseCharge, waitingCharge, extrakmRate, maxHours, maxKm
process: if (hours > maxHours) then
process: extraHours = hours - maxHours
process: endif
process: if (km > maxKm) then
process: extraKm = km - maxKm
process: endif
process: totalCharge = baseCharge + (waitingCharge * extraHours) +
(extrakmRate * extrakm)
output: totalCharge, baseCharge, (waitingCharge * extraHours),
(extrakmRate * extrakm)
End
Function 3: Long tour - Hire calculation.
Begin
function getLongHire(string vehicleID, string packageName, int days, int km)
input: baseCharge, extrakmRate, driverOvernightRate, nightParkingRate, maxKm
process: if (days >= 2) then
process: extraDays = days - 2
process: endif
process: totalDriverOvernightCharge = driverOvernightRate * extraDays
process: totalNightParkingCharge = nightParkingRate * extraDays
process: if (km > (days * maxKm)) then
process: extraKm = km - (days * maxKm)
process: endif
process: totalExtraKmCharge = extraKm * extraKmRate
process: totalCharge = (baseCharge * days) + totalExtraKmCharge +
totalDriverOvernightCharge + totalNightParkingCharge
output: totalCharge, totalBaseCharge, totalExtraKmCharge,
totalDriverOvernightCharge, totalNightParkingCharge
End
Evidence of using visual studio IDE (using C#.net) to Implement the above algorithms
and the design of suitable database structure to store the tariffs for vehicle types and
different packages
1/ Rent Table
2/ Day Tour Hire Service
3/ Hire Table
4/ Long Tour Hire Service
5/ Package Table
6/ Rent Service Table
7/ Vehicle Table
Visual studio IDE (C#.net) Implementation of the above algorithms
con.Open();
int weeklyRent = 0;
int dailyRent = 0;
int monthlyRent = 0;
int driverRent = 0;
while (sdr.Read())
{
weeklyRent = Convert.ToInt32(sdr["Weekly_Rent"]);
dailyRent = Convert.ToInt32(sdr["Daily_Rent"]);
monthlyRent = Convert.ToInt32(sdr["Monthly_Rent"]);
driverRent = Convert.ToInt32(sdr["Driver_Rent"]);
}
if (driver == false)
{
driverRent = 0;
}
con.Close();
return values;}
accessing the rent calculation property using calculate button in rent form
if (checkBoxDriver.Checked == true)
{
driver = true;
}
labelTotal.Text = value[4].ToString();
label6.Text = value[0].ToString();
label8.Text = value[2].ToString();
label7.Text = value[1].ToString();
label9.Text = value[3].ToString();
}
2/ Day tour – Hire calculations using Visual Studio
Day tour hire visual studio (object calculate class) code
public int[] getDayHire(string vehicleNo, string packageName, int hours, int km)
{
int[] values = new int[5];
SqlConnection con = new SqlConnection();
con.ConnectionString = @"Data Source=AIYOOB;Initial Catalog=AyuboDrive;Integrated Security=True";
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select * from [Hire Table] where Vehicle_No = '" + vehicleNo + "' and Package_Name
= '" + packageName + "'";
SqlDataReader sdr = cmd.ExecuteReader();
int baseCharge = 0;
int waitingCharge = 0;
int extraKmRate = 0;
int maxHours = 0;
int maxKm = 0;
while (sdr.Read())
{
baseCharge = Convert.ToInt32(sdr["Base_Charge"]);
waitingCharge = Convert.ToInt32(sdr["Waiting_Charge"]);
extraKmRate = Convert.ToInt32(sdr["Extra_km_rate"]);
maxHours = Convert.ToInt32(sdr["Max_no_of_hours"]);
maxKm = Convert.ToInt32(sdr["Max_km_limit"]);
}
int extraHours = 0;
if (hours > maxHours)
{
extraHours = hours - maxHours;
}
int extraKm = 0;
if (km > maxKm)
{
extraKm = km - maxKm;
}
int totalCharge = baseCharge + (waitingCharge * extraHours) + (extraKmRate * extraKm);
values[0] = totalCharge;
values[1] = baseCharge;
values[2] = waitingCharge * extraHours;
values[3] = extraKmRate * extraKm;
return values;
}
accessing the day toutr hire calculation property using calculate button in day tour form
private void bunifuFlatButton2_Click(object sender, EventArgs e)
{
string vehicleNo = daytourvehicleno.Text;
string packageName = daytourpkgtype.Text;
daytourTotalAmount.Text = value[0].ToString();
daytourExtraKM.Text = value[3].ToString();
dayTourWaitingCharge.Text = value[2].ToString();
daytourBaseHire.Text = value[1].ToString();
}
3/ Long tour – Hire calculations using Visual Studio
Long tour hire visual studio (object calculate class) code
public int[] getLongHire(string vehicleNo, string packageName, int days, int km)
{
int[] values = new int[5];
longtourTotalAmount.Text = value[0].ToString();
longtourBaseCharge.Text = value[1].ToString();
longtourOverNightCharge.Text = value[3].ToString();
longtourExtraKM.Text = value[2].ToString();
}
Integrated Development Environment (IDE)
Features of IDEs
Text editor - Any IDE will include text editors that allow you to write and
manipulate code. Some IDEs include tools for dragging and dropping front-end
components.
Debugger - This feature enables programmers to easily identify and fix errors and
bugs in code. It also enables them to test various parts of the application in order to
identify and correct errors.
Compiler - These convert programming language to machine language. To ensure
accuracy, machine codes are examined. Compilers can parse and optimize code in
order to improve performance.
Code completion - This feature assists programmers in completing code by
identifying and inserting common code components. This saves time and reduces
bugs when writing code.
Programming language support - Programmers can select a programming
language using IDEs. They provide IDE tools for many programming languages,
including Ruby, Python, and Java.
Integrations and plugins - An IDE is a development portal that integrates all of
your other development tools in order to improve workflows and productivity.
Auto-completion- This is intended to improve coding efficiency. As you enter the
first part of the code, it recommends or completes the function, along with any
parameters or variables.
Syntax Checks- This detects inappropriate syntax usage and shows any errors.
Bracket matching- This is for languages that utilize bracket pairs to separate code
blocks. It enables faster reading and comprehension of the code. Colored sections
may assist you in detecting missing brackets if you fail to close one while writing.
(Anon., n.d.)
How these features in an Integrated Development Environment (IDE) help in
application development
It serves as a single environment for most of the needs of a developer such as version
control systems, debugging tools, and Platform-as-a-Service.
Code completion capabilities can improve workflow of programming.
It automatically checks for errors and bugs to ensure top quality code
Refactoring capabilities help programmers to make comprehensive and mistakefree
name changes.
Maintain a smooth development cycle.
Increase developer efficiency and satisfaction
Deliver top-quality software on schedule
Some of the best overall IDE in 2018 are, according to https://www.g2.com/articles/ide
IntelliJ IDEA
Visual Studio
Eclipse
RStudio
WebStorm
PhpStorm
PyCharm
NetBeans
Xcode
Visual LANSA
Visual Studio IDE
Visual Studio is the Integrated Development Environment (IDE) in which developers work
when creating programs for the.NET Framework in one of many languages, including C#. It
is used to develop console and graphical user interface (GUI) applications, as well as
Windows Forms or WPF (Windows Presentation Foundation) applications, web applications,
and web services in both native and managed code for all platforms supported by Microsoft
Windows, Windows Mobile, Windows CE,.NET Framework,.NET Compact Framework, and
Microsoft Silverlight.
It provides a set of tools to help you write and modify code for your programs, as well as
detect and correct errors. Visual Studio supports a variety of programming languages through
language services, which allow the code editor and debugger to support nearly any
programming language as long as a language-specific service is available. It includes a code
editor, just like any other IDE, that supports syntax highlighting and code completion with
IntelliSense for not only variables, functions, and methods, but also language constructs like
loops and queries.
Microsoft Visual Studio is a powerful integrated development environment (IDE) that
ensures quality code throughout the application lifecycle, from design to deployment. Some
windows are used to write code, others to design interfaces, and still others to get a general
overview of the files or classes in your application. Microsoft Visual Studio comes with a
slew of visual designers to help with the creation of various types of applications. Windows
Forms Designer, WPF (Windows Presentation Foundation) Designer, Web development,
Class designer, Data designer, and Mapping designer are among the tools available.
(Anon., n.d.)
C# is intended for the development of a wide range of applications that run on the.NET
Framework. Before you begin learning more about C# programming, you should first
understand the development environment and recognize some of the most commonly
used programming tools in the Visual Studio IDE.
1. Menu Bar
2. Standard Toolbar
3. ToolBox
4. Forms Designer
5. Output Window
6. Solution Explorer
7. Properties Window
Some other features available in The Visual Studio IDE.
Squiggles and Quick Actions - Underlines with squiggles are wavy. They alert you
to code errors or problems. They enable programmers to find and correct errors
without having to run the program. When you hover your mouse over the Squiggle,
you will see information about the error. A light bulb may appear in the left margin
with Quick Actions to correct the error.
Code Cleanup - Cleaning up the code Format your code and make any changes
recommended by your code style settings, editorconfig conventions, and Roslyn
analyzers. (Please keep in mind that this feature is currently only available for C#
code.)
features available in The Visual Studio IDE.
– This includes operations such as intelligent variable renaming, extracting one or more
lines of code into a new method, rearranging method parameters, and more.
IntelliSense - This is a term that refers to features that display information about your
code directly in the editor and, in some cases, write small bits of code for you.
Visual Studio search – This feature allows to rapidly find IDE features and code in
one place.
Live Share – This feature allows you to instantly and securely share your project.
Call Hierarchy – This window displays the methods that call the method you've
chosen. It's useful information if you want to change or remove a method, or if you're
looking for a bug.
Go To Definition – This feature takes you directly to the location where a function or
type is defined.
Example 01
The code completion feature helped a lot to save time typing variable already declared
and calling names of tools to code.
Example 02
Tool box makes drag and drop much easier to build the GUI
Example 03
Most errors are shown by a red line and once you hover on top of it, it shows the reason
for error as well which makes it much easier to find errors and debug before running the
program.
Activity 04
Designing and building a small system to calculate vehicle hire amounts and record
them in a database for customer billing and management reporting for Ayubo drive
1/ Login Page
Code of login
The debugging procedure consists of two steps: "fault localization" and "fault repair/bug
fixing." A programmer may duplicate a problem in software code to find the error and the
cause, and then modify or delete the code to prevent it from happening again. The first and
second steps are both time consuming and difficult. The first step is more important because
in order to fix an error, the problem must first be identified.
The steps in a debugging process, according to the website "The Economic Times," are as
follows:
There are several types of debugging, including "stepping through code with a debugger,"
"investigating logs," "unit testing," "profiling," and "analyzing dumps."
Visual studio focuses on "interactive debugging," which is defined as "attaching a debugger
to a running process and investigating the program's execution and state."
Attaching the debugger: Once you press F5 or “select Debug | Start Debugging”,
debugging will automatically run in Visual studios.
Debugger Break Mode: For debugging, the debugged process must be in “Break
Mode”. This means the program can be paused for a said line of code, and all the
running threads are paused after a line of code. To get breaker mode, use “Debug
| Break All menu item” or place break points. To place breaker points, press F9,
or “Debug | Toggle Breakpoint”. Once a break point is set, the program will stop
at that point and start break mode
Investigate variables: When In break mode you can see the values of variables and
class members. Hovering over the variable lets you this via a pop-up, this is called
“Data tip”
Breakpoint advanced features: There are lesser-know features of breakpoint. To see
the context menu for it, you can right click a break. A few examples are given bellow,
Conditions allows you to break on this breakpoint only when a condition is met.
Actions allow you to log a message to the output window whenever the breakpoint is
hit. You can continue execution, without stopping on the breakpoint. Edit labels…
allows to categorize breakpoints into labels. This makes it easier later to organize
them in the breakpoints tool window.
Using the debugging process to develop more secure, robust application
Thanks to the features in Visual studios, it was easy to debug the application and make the
application a bug free secure application. As mentioned above, in the debugging process, the
most crucial part is “fault localization”. Using the “select Debug | Start Debugging”, I was
able to start debugging while running the application and find the errors in my application
and fix them.
Here are a few instances as such,
Case 1
On the picture shown above, the variable ‘daytourBaseHird’ has not been initialized, which
the debugger showed instantly. I was able to save time and avoid bugs by identifying the
error.
Case 2
In this case, the variable type for Rent ID in the database was int and in the enterd data
was varchar. I had to enter the data in the text box as int to fix the error after
identifying it
and error show up in this display just because I used try catch statement here
Case 3
In here I forgot to enter (.Text) after the comboBox1 thanks for visual studio debugging
process its shows a red line near combobox I was able to avoid the error when the red line
showed and was able to fix it. These are some of the many instances that I used the
debugging process to debug the application to develop more secure, robust application.
Coding standards
Coding standards are used by good software developers and development organizations to
maintain a well-defined and standard style of coding. Coding standards are developed by
organizations/programmers based on their needs, what best suits their organization, and the
type of software developed. It is critical to maintain coding standards because if they are not
followed, the code may be rejected during code review in the organization.
Naming conventions for local variables, global variables, constants and functions–
Names of variable should be meaningful and understandable as they help anyone to
understand the reason of using it. There are naming convections for local variable global
variables, constants and functions used by many programmers and organizations. Some of
them are,
Coding style – A code should understandable. If the code is too complex, debugging is
difficult. Using coding styles that is too difficult to understand must be avoided.
Do not using an identifier for multiple purposes - Descriptive and meaningful names
should be given for each variable that give the reason behind the name. If the same variable
name is used multiple times, it can lead to confusion and it would be difficult to debug.
Document codes – The codes should be properly documented in a way that is easy to
understand. Comments regarding the statements increase the understandability of the code.
The coding standards That I have used in my application development
Standards 1
For tools, I have named them in a way that it shows the page it belongs to as well
as the type of tool it is and every word has a capital letter in the first letter (eg.
Base_Charge)
Standards 2
Indentation – I have followed proper indentations and use of bracts for if else statements
and others to increase code readability and understandability.
Critically evaluating why a coding standard is necessary for the team as well as for the
individual
They increase the efficiency of the software and reduces the development time.
They help in identification of errors in an early stage.
They increase readability and understandability of a code while reducing the
complexity of the code.
It reduces the hidden cost for developing the software.
When creating programs, it is necessary to consider time, cost, debugging, and future
updates. Having specific standards when coding aids in meeting those criteria. As
previously stated, coding standards improve efficiency and reduce software development
time while also assisting us in identifying errors at an early stage. These standards also
make the code more readable and understandable, especially for future developers who may
do updates or debug errors that were not discovered initially. Making it easier to read,
understand, and debug reduces costs, which benefits the company, group, or individual. As
previously stated, having certain coding standards can help save time, money, and make
debugging easier.
Conclusion
I now end this assignment by completing all of the theoretical sections on Activity One and
giving all appropriate proofs for each and every piece of information acquired from various
sources.
The practical portion is then handled in relation to the scenario supplied by the institution,
and all steps are taken in relation to the grading rubrics as well to finish this project in a
meaningful manner.
Bibliography