Professional Documents
Culture Documents
Unit(s)
Assignment title
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.
Give details:
Programme Leader
signature (if required) Date
Unit Title
Assignment Number Assessor
Date Received 1st
Submission Date submission
Date Received 2nd
Re-submission Date submission
Assessor Feedback:
LO1. Define basic algorithms to carry out an operation and outline the process of programming an application.
Pass, Merit & Distinction P1 M1 D1
Descripts
LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an
analysis of a suitable Integrated Development Environment (IDE).
Pass, Merit & Distinction P2 M2 D2
Descripts
LO3. Implement basic algorithms in code using an IDE.
Pass, Merit & Distinction P3 M3 D3
Descripts
LO4. Determine the debugging process and explain the importance of a coding standard.
Pass, Merit & Distinction P4 P5 M4 D4
Descripts
Resubmission Feedback:
Important Points:
1. Check carefully the hand in date and the instructions given with the assignment. Late
submissions will not be accepted.
2. Ensure that you give yourself enough time to complete the assignment by the due date.
3. Don’t leave things such as printing to the last minute – excuses of this nature will not be
accepted for failure to hand in the work on time.
4. You must take responsibility for managing your own time effectively.
5. 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.
6. Failure to achieve at least a PASS grade will result in a REFERRAL grade being given.
7. Non-submission of work without valid reasons will lead to an automatic REFERRAL. You will
then be asked to complete an alternative assignment.
8. Take great care that if you use other people’s work or ideas in your assignment, you properly
reference them, using the HARVARD referencing system, in you text and any bibliography,
otherwise you may be guilty of plagiarism.
9. If you are caught plagiarising you could have your grade reduced to A REFERRAL or at worst
you could be excluded 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.
Assignment Title Design & Implement a GUI based system using a suitable
Integrated Development Environment
Issue Date
Submission Date
Submission Format
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)
The student should submit a GUI based system developed using an IDE. The system should connect
with a backend database and should have at least 5 different forms and suitable functionality
including insert, edit and delete of main entities and transaction processing.
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.
LO4. Determine the debugging process and explain the importance of a coding
standard
Assignment Brief and Guidance:
Task 1: Define basic algorithms to carry out an operation and outline the process
of programming an application (LO1)
Searching on an array/list is to find a given element on the array and return whether
it is found or not and return its position if found. Linear search and binary search are
two popular searching algorithms on arrays.
1.1 Define what an algorithm is and outline the characteristics of a good algorithm.
Develop algorithms for linear search and binary search using Pseudo code (P1).
1.2 Describe the steps involve in the process of writing and executing a program.
Take an array of 10 or more elements and dry run the above two algorithms.
Show the outputs at the end of each iteration and the final output (M1).
1.3 Define 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 (D1).
2.3 Write small snippets of code as example for the above three programming
paradigms using a suitable programming language(s) and critically evaluate their
structure and the characteristics (D2).
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.
Vehicle rent hire options are described below.
1. Rent (With or without driver) – For each type of vehicle rates are given per day,
per week and per month. Rate for a driver also given per day. Depending on the
rent period the total rent amount needs to be calculated. For example: if a
vehicle is rented for 10 days with a driver, total amount to be calculated as
follows:
2. Hire (with driver only) – These are based on packages such as airport drop,
airport pickup, 100km per day package, 200km per day package etc. Standard
rates are defined for a vehicle type for a package type that is applicable for that
type of vehicle. For each package maximum km limit and maximum number of
hours are also 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.
3
3.1 Design suable algorithms for vehicle tariff calculation for rents and hires (P3).
3.3 What is the purpose of using an IDE in application development? Evaluate the
use of the Visual Studio IDE for your application development contrasted with
not using an IDE. (D3).
Task 4: Determine the debugging process and explain the importance of a coding
standard (LO4).
4
Design and build a complete system for the vehicle reservation and billing for
Ayubo drive. This includes the completing the database design started in 3.2 and
designing the suitable interfaces for vehicle and package additions and
reservation handling and customer billing (P4).
4.2 Implement the above functionalities using the IDE while adopting the coding
standards to improve maintainability of the code. Explain the coding standards
used in your code in the written report (P5).
4.3 Evaluate how you used the debugging process to develop more secure, robust
application with examples (M4).
4.4 Explain the coding standards you have used in your application development.
Critically evaluate why a coding standard is necessary in a team as well as for the
individual. (D4).
Table of Contents
Table of Contents
Acknowledgement...................................................................................................................11
Table of Contents.....................................................................................................................12
Table of Figures........................................................................................................................15
Task 1: Define basic algorithms to carry out an operation and outline the process of
programming an application (LO1)..........................................................................................17
1.1 Define what an algorithm is and outline the characteristics of a good algorithm.
Develop algorithms for linear search and binary search using Pseudo code (P1)..............17
1.1 What is an algorithm..................................................................................................17
1.1.1 Character of an algorithm.......................................................................................17
1.1.2 Linear search...........................................................................................................18
1.1.3 binary search...........................................................................................................18
1.2 Describe the steps involve in the process of writing and executing a program. Take an
array of 10 or more elements and dry run the above two algorithms. Show the outputs at
the end of each iteration and the final output (M1)...........................................................21
1.2.1 Steps of involving the writing and executing a program process...........................21
1.2.3 Linear search Dry run:.............................................................................................24
1.2.4 Binary search Dry run..............................................................................................25
1.3 Define 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 (D1)..........................................................26
1.3.1 what is Big-O notation.............................................................................................26
Task 2: Explain the characteristics of procedural, object-orientated and event-driven
programming, conduct an analysis of a suitable Integrated Development Environment (LO2).
..................................................................................................................................................31
2.1 Define what is meant by a Programming Paradigm. Explain the main characteristics of
Procedural, Object oriented and Even-driven paradigms and the relationships among
them (P2)..............................................................................................................................31
2.1.1 What is programming paradigm.............................................................................31
2.1.2 paradigm.................................................................................................................31
2.2 Analyze the features of an Integrated Development Environment (IDE) and explain
how those features help in application development (M2)................................................33
2.2.1 What is IDE..............................................................................................................33
2.2.2 Purpose of IDE.........................................................................................................34
2.2.3 Advantage using IDE................................................................................................34
2.3 Write small snippets of code as example for the above three programming paradigms
using a suitable programming language(s) and critically evaluate their structure and the
characteristics (D2)..............................................................................................................35
2.3.1 What is structure.....................................................................................................35
2.3.2 Rent Calculation......................................................................................................35
2.3.3 Day Tour..................................................................................................................36
2.3.4 Long Tour.................................................................................................................37
Task 03: Implement basic algorithms in code using an IDE (LO3)...........................................38
3.1Design suable algorithms for vehicle tariff calculation for rents and hires (P3).............38
3.1.1 Function 1: Rent calculation....................................................................................38
3.1.2 Function 2: Day tour calculation.............................................................................38
3.1.3 Function 3: Long tour calculation............................................................................39
3.2 Implement the above algorithms using visual studio IDE (using C#.net) 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 (M3)......................................40
3.2.1 Function 01: Rent Calculation.................................................................................40
3.2.1.1 Days calculation....................................................................................................41
3.2.1.2 Data insert............................................................................................................42
3.2.1.3 Search data...........................................................................................................42
3.2.1.4 Update..................................................................................................................43
3.2.2 Function 02: Day Tour.............................................................................................43
3.2.2.1 Data insert............................................................................................................48
3.2.2.2 Data search...........................................................................................................48
3.2.2.3 Update..................................................................................................................49
3.2.3 Function 03: Long Tour............................................................................................49
3.2.3.1 300Km package....................................................................................................50
3.2.3.2 500Km package....................................................................................................51
3.2.3.3 800km package.....................................................................................................52
3.2.3.4 1000Km package..................................................................................................53
3.2.3.5 Insert Data............................................................................................................54
3.2.3.6 Search data...........................................................................................................54
3.2.3.7 Update..................................................................................................................54
3.3What is the purpose of using an IDE in application development? Evaluate the use of
the Visual Studio IDE for your application development contrasted with not using an IDE.
(D3).......................................................................................................................................55
3.3.1 Purpose of using an IDE application development.................................................55
3.3.2 Not using IDE...........................................................................................................56
Task 4: Determine the debugging process and explain the importance of a coding standard
(LO4).........................................................................................................................................57
4.1 What is debugging an application? Explain the importance of the debugging facility in
Visual studio IDE. Debug your source code by putting few debugging points in your
application (P4)....................................................................................................................57
4.1.1What is debugging an application............................................................................57
4.1.2 Debugging facility in visual studio...........................................................................57
4.1.3 Set a breakpoint......................................................................................................58
Breakpoint conditions......................................................................................................60
4.2 Implement the above functionalities using the IDE while adopting the coding
standards to improve maintainability of the code. Explain the coding standards used in
your code in the written report (P5)....................................................................................61
4.2.1 Why use coding standards......................................................................................61
4.2.2 Comment standards................................................................................................61
4.2.3 Naming standards...................................................................................................62
4.2.4 Variable...................................................................................................................62
4.3 Evaluate how you used the debugging process to develop more secure, robust
application with examples (M4)..........................................................................................63
4.4 Explain the coding standards you have used in your application development. Critically
evaluate why a coding standard is necessary in a team as well as for the individual.........64
4.4.1Coding standards in my application.........................................................................64
4.4.2 coding standards necessary....................................................................................64
Reference.............................................................................................................................65
Table of Figures
Search algorithm is set of introductions for solving a problem. Search data collection in a
given order, can be done it two ways.
01.linear search
02.binary search
Linear search is very simple search algorithm. It relies on the technique of traversing
a list from start to end by exploring the properties of all the elements that are found on
the way. Basically, a sequential search is made over all items one by one. Every item
is checked and if a match founds then that particular item is returned. Otherwise the
search continues until the end of the data collection.
Search item 5
1 2 3 4 5 6 7 8 9 10
binary search algorithm is a search algorithm that finds the position of a target value
within a sorted array. Binary search compares the target value to the middle element
of the array. If the middle item is greater than the item, then of the subarray to the left
compared. Otherwise, the middle item of the subarray to the right is compared. We
repeat this procedure on the lower or upper half of the array until the value is found. This
search algorithm can be quite fast but the caveat is that the data has to be in a sorted form.
Below is an example:
Search item 4
All programming involves creating something that solves a problem. Developing a program
involves steps similar to any problem-solving task. There are five main ingredients in the
programming process.
Suppose that, as a programmer, you are contacted because your services are needed. You
meet with users from the client organization to analyze the problem, or you meet with a
systems analyst who outlines the project. Specifically, the task of defining the problem
consists of identifying what it is you know (input-given data), and what it is you want to
obtain (output-the result). Eventually, you produce a written agreement that, among other
things, specifies the kind of input, processing, and output required.
Two common ways of planning the solution to a problem are to draw a flowchart and to
write pseudocode, or possibly both. Essentially, a flowchart is a pictorial representation of a
step-by-step solution to a problem. It consists of arrows representing the direction the
program takes and boxes and other symbols representing actions. It is a map of what your
program is going to do and how it is going to do it. The American National Standards
Institute (ANSI) has developed a standard set of flowchart symbols. Figure 1 shows the
symbols and how they might be used in a simple flowchart of a common everyday act-
preparing a letter for mailing. (homepage .cs 2018)
Pseudocode:
Pseudocode is an informal program description that does not contain syntax or underlying
technology consideration. It is used for creating an outline or rough draft of a program and
pseudocode is not actual programming language. The purpose of using pseudocode is an
efficient key principle of an algorithm. software designers write pseudocode to ensure that
programmers understand a software project’s requirements and align the code accordingly.
It uses short terms or simple English language. this is done to identify to level flow errors
and understand the programming data flows that the final program is going to use. This
definitely help save time during actual programming as conceptual errors. Basically, it is
used in planning an algorithm with sketching out the structure of the program before the
actual cording takes place.
Dry run is programmer-built program work detail showing table. A desk check is performed
with the help of a table with columns for pseudocode line number column, condition
column, input/output column and a column for variables. All information is captured in
table columns. The input/output column helps in showing the inputs and outputs, and helps
in evaluating the input received by the user and the output displayed by the logic. Basically,
a dry run test consists of programmers manually reading their code line by line to find errors
and fix them. The evaluation is usually done with the help of pen/pencil and paper, and is
similar to proofreading. Dry is fast and inexpensive technique.
Debugging
When you first run your program, it will not work properly. Debugging is the process of
finding and correcting your errors. In testing a program, you should give it extreme inputs in
an attempt to force errors.
The job is not finished when the program is working correctly. The programmer must
prepare documents describing both the external specification and the internal design of the
program. This documentation will be of value to users and programmers who must maintain
and modify your program.
Array:2,4,6,8,10,12,14,16,18,20
Search Positio
Line Number Array Found Condition Output
Item n
2,4,6,8,10,12,14,16,18,
1
20
2 12
3 0
4 FALSE
5 0 < 10? T
6 2== 12? F
9 0+1
5 1 < 10? T
4 == 12?
6
F
9 1+1
5 2 < 10? T
6 == 12?
6
F
9 2+1
5 3 < 10? T
8 == 12?
6
F
9 3+1
5 4<10? T
10==12?
6
F
9 4+1 5<10? T
12==12?
5
T
7 TRUE
Index is
8
5
1.2.4 Binary search Dry run
Found order:
Array:1,2,3,4,5,6,7,8,9,10
Big-O notation is particular tool for evaluation algorithm efficiency. Big-O notation
specifically describes the worst-case scenario, and using large O notation helps to calculate
need as a program scale.
O (1) Constant
O(N) Linear
O (Log N) Logarithmic
O(N2) Exponential
return false;
}
1.3.2.3O (Log N) Logarithmic
Each step of a binary search, you rule out an entire half of the space you're searching,
without having to examine what's in it. Since you can only split a space of n elements in
half log2(n) times before you're only looking at one item, you must have zeroed in on the
desired element after log2(n) steps at the worst. Therefore, binary search works in O(log(n))
time.
(rob-bell.net 2018)
(chrisalbon.com2018)
2.1.2 paradigm
i. Imperative
ii. Object oriented
iii. Declaration
iv. Logic and constraint
v. Functional
vi. Event-driven
2.1.2.1 Imperative
Procedural programming is a programming paradigm that uses a linear or top-down
approach. It relies on procedures or subroutines to perform computations. Procedural
programming is also known as imperative programming. Languages that reflect this
paradigm recognize the fact that computers have re-usable memory that can change state.
So, they are characterized by statements, which effect the state of the machine, for example.
X = X+1
It means statement changes the state of “variable x” by incrementing it by 1. Procedural
language is one of the most common types of programming language in use, with notable
languages such as C++, Java, ColdFusion and PASCAL.
2.1.2.2 Object oriented
One of the great benefits of OPP is that of the scalability, with objects and definitions
having no finite limitation. Also, the separation of data from the method prevents common
problem found in order linear software languages. If a bug appears in a linear code, it can be
translated through a system and create masses of hard-to-trace errors. Conversely, an OPP
program, with its separation of method and data, is not susceptible to such proliferated
errors. Java, Python, C++, Visual studio .NET and Ruby are the most popular OPP
languages today.
2.1.2.3 Declaration
A declaration in computer programming con be confused with other sorts of designations
for variables. One such term is the definition of a variable, which refers to assigning a
storage location for that variable. Another similar term is the dimensioning the length or
size of the variables. Programmers commonly dimension variables and arrays to help the
program handle the elements of a specific size. The best example is SQL server.
2.1.2.5 Functional
Functional programming language are specially designed to handle symbolic computation and
list processing applications. Functional programming is based on mathematical functions. Some
of the popular function programming language include lisp, python, Haskell, clonjure, etc.
2.1.2.6 Event driven
An event-driven program is one that largely responds to user events or other similar input.
The concept of event-driven programming is an important one in application development
and other kinds of programming, and has spawned the emergence of event handlers and
other resources. An event-driven program is also known as an event-driven application.
2.2 Analyze the features of an Integrated Development Environment
(IDE) and explain how those features help in application development
(M2).
one downside to IDEs I have found (or at least popular ones such as Visual Studio .NET and
Eclipse, which are both excellent by the way) is the extra garbage it creates. by garbage I
mean all the extra files and folders. for example, a simple hello world c++ program written
in Visual Studio .NET would be a few megabytes, with the .cpp file being 1kb.
(www.linuxquestions.org 2018)
Project management
This can be twofold. Documentation tools that either automate the entry of developer
comments, or may actually force developers to write comment in different areas and simply
by having a visual presentation of resources, it should be much easier to know how an
application is laid.
2.3 Write small snippets of code as example for the above three
programming paradigms using a suitable programming language(s) and
critically evaluate their structure and the characteristics (D2).
Figure 6 Rent
3.1Design suable algorithms for vehicle tariff calculation for rents and
hires (P3).
Figure 12 Save
Figure 13 Search
3.2.1.4 Update
Figure 14 Update
Figure 27 Update
Figure 38 :Save
3.2.3.7 Update
Figure 40:Update
3.3What is the purpose of using an IDE in application development?
Evaluate the use of the Visual Studio IDE for your application
development contrasted with not using an IDE. (D3).
1
2
1.Tool bar 2.Cord editor and write 3.Debug output and Error list
Because of not using IDE, will unable the ability to checkout syntax errors and spelling
errors. Also, I will not let a chance to use and checkout any of the debug options. Moreover,
using short options as new page will be unable. Because of this avoiding IDE will increase
the period of time to create a software
Learning curve
Ides are complicated tools. Maximizing their benefit will require time and patience.
Debugging is the routine process of locating and removing computer program bugs, errors
or abnormalities, which is methodically handled by software programmers via debugging
tools. Debugging checks, detects and corrects errors or bugs to allow proper program
operation according to set specifications. Debugging is also known as debug. Large
software programs, which contain millions of source code lines, are divided into small
components. For efficiency, each component is debugged separately at first, followed by the
program as a whole.
Set a breakpoint, place your cursor on a line of code and light click. Press F5 or debug>start
debugging, start debugging button in the toolbar, and the debugger run to the first
breakpoint that it encounters. Delete breakpoint from the pop-up menu or you can press the
F9. When the program is started by the continue, it will stop at every line that has a
breakpoint, allowing you to debug easily.
Breakpoint conditions
Right click breakpoint > Settings > Select condition. The behavior of the When changed
field is different for different programming languages. If you choose When changed for
native code, the debugger doesn't consider the first evaluation of the condition to be a
change, so the breakpoint won't be hit on the first evaluation. If you choose When changed
for managed code, the breakpoint is hit on the first evaluation after When changed is
selected. If you set a breakpoint condition with invalid syntax, a warning message appears.
If you specify a breakpoint condition with valid syntax but invalid semantics, a warning
message appears the first time the breakpoint is hit. In either case, the debugger breaks
execution when the invalid breakpoint is hit. The breakpoint is skipped only if the condition
is valid and evaluates to false.
(https://code.tutsplus.com 18 September)
4.2.4 Variable
Creating functions with matching codes of it will be easy to understand for the user.
Figure 52 variable
You can connect the Visual Studio debugger to a running process on a local or remote
computer. When the process is running, click on Debug> Attach to Process (or press CTRL
+ ALT + P) to open the Attach to Process dialog box. Can use this function to debug
applications running on the local computer or remote computer, debug multiple processes at
the same time, or debug applications that are not created in Visual Studio. This is useful
when you want to debug an application, but for some reason it did not start up by attaching
the debugger from Visual Studio. For example, if you run an application without using the
debugger and an exception occurs, you can attach to the process running the application and
start debugging.
Figure 53 Debug
(docs.microsoft.com 2018)
Figure 55 Debugging
4.4 Explain the coding standards you have used in your application
development. Critically evaluate why a coding standard is necessary in a
team as well as for the individual.
A coding standard ensures that all developers writing the code in a particular language write
according to the guidelines specified. This makes the code easy to understand and provides
consistency in the code.
One of the most essential factors in a software system is the consistency of the coding
standard. This is because it positively impacts the quality of the system. While using a
software system, you need to ensure that the guidelines do not contradict each other. The
source code that uses the standard should also be in harmony with the standard. The
completed source code should indicate as if the code has been written by a single developer
in a single session. Because coding stands is coding standards can be changed according to
the person there.
(www.webguruz.in 2018)
Reference
https://www.linuxquestions.org/questions/programming-9/purpose-of-ide-536023/ [17
September 2018]
https://code.tutsplus.com/tutorials/top-15-best-practices-for-writing-super-readable-code--
net-8118 [17 September 2018]
https://docs.microsoft.com/en-us/visualstudio/debugger/attach-to-running-processes-with-
the-visual-studio-debugger?view=vs-2017 [20 September 2018]
https://chrisalbon.com/software_engineering/algorithms/big-o_notation/
[20 September 2018]