PRograme 67566756
PRograme 67566756
Mrs.Shifani
Assessor Internal Verifier
Unit(s)
Assignment title
Ajward Muhammadh Muhammadh Ashfaque
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.
Ashfaque_Ajward KAN00128456
Confirm action completed
Remedial action taken
Give details:
Ashfaque_Ajward KAN00128456
30/09/2022 Date Received 1st
Submission Date submission
Date Received 2nd
Re-submission Date submission
Assessor Feedback:
ss of an
LO1. Define basic algorithms to carry out an operation and outline the proce programming applicat ion.
Pass, Merit & Distinction Descripts P1 M1
D1
driven programming, conduct an
LO2. Explain the characteristics of procedural, object-orientated and event- analysis
Integrated Development Environment (IDE).
LO4. Determine the debugging process and explain the importance of a codi ng standard.
* 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
Ashfaque_Ajward KAN00128456
Formative Feedback: Assessor to Student
Action Plan
Summative feedback
Assessor Date
signature
E159383@esoft.academy 30/09/2022
Student Date
signature
Ashfaque_Ajward KAN00128456
Pearson Higher Nationals in
Computing
Unit 01: Programming Assignment
01
Ashfaque_Ajward KAN00128456
General Guidelines
1. A Cover page or title page – You should always attach a title page to your assignment. Use
previous page as your cover sheet and make sure all the details are accurately filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.
1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.
5. Use word processing application spell check and grammar check function to help editing
your assignment.
Important Points:
1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your
work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as illness,
you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.
Ashfaque_Ajward KAN00128456
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.
Ashfaque_Ajward KAN00128456
Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number
Ajward Muhammadh Muhammadh Ashfaque
Unit Number and Title Unit 01: Programming
Issue Date
Submission Date
Submission Format
Ashfaque_Ajward KAN00128456
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.
LO4. Determine the debugging process and explain the importance of a coding
standard
Ashfaque_Ajward KAN00128456
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.
Ashfaque_Ajward KAN00128456
Ashfaque_Ajward KAN00128456
Activity 3 and Activity 4 are based on the following Scenario.
Ayubo Drive is the transport arm of Ayubo Leisure (Pvt) Ltd, an emerging travel & tour
company in Sri Lanka. It owns a fleet of vehicles ranging from cars, SUVs to vans.
The vehicles that it owns are hired or rented with or without a driver. The tariffs are based on
the vehicle type. Some of the vehicle types that it operates are, small car, sedan car, SVUs, Jeep
(WD), 7-seater van and Commuter van. New vehicle types are to be added in the future.
1. Rent (With or without driver) – For each type of vehicle rates are given per day, per week
and per month. Rate for a driver also given per day. Depending on the rent period the total
rent amount needs to be calculated. For example: if a vehicle is rented for 10 days with a
driver, total amount to be calculated as follows:
2. Hire (with driver only) – These are based on packages such as airport drop, airport pickup,
100km per day package, 200km per day package etc. Standard rates are defined for a
package type of a vehicle typeif that is applicable for that type of vehicle.For each package
maximum km limit and maximum number of hours arealso defined. Extra km rate is also
defined which is applicable if they run beyond the allocated km limit for the tour. For day
tours if they exceed max hour limit,a waiting charge is applicable for extra hours. Driver
overnight rate and vehicle night park rate also defined which is applicable for each night
when the vehicle is hired for 2 or more days.
Activity 3
Ashfaque_Ajward KAN00128456
Function 3: Long tour - hire calculation.
Calculate total hire_value when vehicle_no, package_type, start_date, end_date,
start_km_reading, end_km_reading parameters are sent in. Should return base_hire_charge,
overnight_stay_charge and extra_km_charge as output parameters.
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
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.
Ashfaque_Ajward KAN00128456
Ashfaque_Ajward KAN00128456
Ashfaque_Ajward KAN00128456
Contents
Table of Figures.....................................................................................................................15
Tables....................................................................................................................................17
ACKNOWLEDGEMENT........................................................................................................18
Activity 1.................................................................................................................................. 20
Ashfaque_Ajward KAN00128456
Activity 2............................................................................................................................... 34
What is a Programming Paradigm?.......................................................................................... 34
Programming Paradigm Defined.............................................................................................. 34
Relationship among procedural , event driven , OOP paradigms.........................................45
Activity 3............................................................................................................................... 46
Design suitable algorithm for Vehicle traffic calculation.......................................................46
Day-Tour Calculation............................................................................................................ 49
pseudocode.......................................................................................................................... 49
Long tour - hire calculation...................................................................................................52
Pseudocode.......................................................................................................................... 52
Database Structure of Auybo System...................................................................................56
TABLES.................................................................................................................................. 57
What is Visual Studio IDE......................................................................................................59
Main feature of IDE...............................................................................................................61
GUI Design For Ayubo System.............................................................................................. 67
Why do we need to debug....................................................................................................78
Coding Standerds..................................................................................................................81
Explain the coding standards................................................................................................82
Declaring a Variable..............................................................................................................83
Coding standard for team.....................................................................................................85
Coding standard for individual..............................................................................................85
References................................................................................................................................ 86
Table of Figures
Ashfaque_Ajward KAN00128456
Figure 9 Ex Procedural code ................................................................................................ 36
Figure 10 Output ................................................................................................................. 36
Figure 11 OOP Snippet ........................................................................................................ 39
Figure 12 OOP output .......................................................................................................... 40
Figure 13 Encapsulation ...................................................................................................... 40
Figure 14 Inheritance .......................................................................................................... 41
Figure 15 Polymorphism ...................................................................................................... 41
Figure 16Even driven code for snippets ............................................................................... 44
Figure 17Output .................................................................................................................. 44
Figure 18 Relationship among procedural , event driven , OOP paradigms .......................... 45
Figure 19 Day Calculation .................................................................................................... 47
Figure 20 Main Program ...................................................................................................... 48
Figure 21 Output ................................................................................................................. 48
Figure 22 Long Tour Calculation .......................................................................................... 50
Figure 23 Main Program ...................................................................................................... 51
Figure 24 Output ................................................................................................................. 51
Figure 25 Long Tour hire calculation .................................................................................... 54
Figure 26 Main Program ...................................................................................................... 54
Figure 27 Output ................................................................................................................. 55
Figure 28 Create Database .................................................................................................. 56
Figure 29 Vehicle tables....................................................................................................... 57
Figure 30 Package ............................................................................................................... 58
Figure 31 Package 2 ............................................................................................................. 58
Figure 32 Debugging ............................................................................................................ 63
Figure 33 Property Window ................................................................................................. 64
Figure 34 Solution Explorer ................................................................................................. 65
Figure 35 Server Explorer .................................................................................................... 65
Figure 36 Toolbox ................................................................................................................ 66
Figure 37 Login Page ........................................................................................................... 67
Figure 38 Login Selection ..................................................................................................... 67
Figure 39 Search .................................................................................................................. 68
Figure 40 Insert ................................................................................................................... 68
Figure 41 Update ................................................................................................................. 69
Figure 42 Delete .................................................................................................................. 69
Figure 43 Calculate the Vehicle rent .................................................................................... 70
Figure 44 Calculate the day ................................................................................................. 70
Figure 45 Calculate the total cost ........................................................................................ 70
Ashfaque_Ajward KAN00128456
Figure 46 Package search .................................................................................................... 71
Figure 47 Inesrt ................................................................................................................... 71
Figure 48 Update ................................................................................................................. 72
Figure 49 Delete .................................................................................................................. 72
Figure 50 Day Hire Calculation ............................................................................................. 73
Figure 51 Calculate the KM .................................................................................................. 73
Figure 52 Calculate the Hours .............................................................................................. 74
Figure 53 Calculate The Total Cost ....................................................................................... 74
Figure 54 Calculate the Long Hire ........................................................................................ 75
Figure 55 Calculate the Day ................................................................................................. 76
Figure 56 Calculate the KM .................................................................................................. 76
Figure 57 Calculate The Long Hire ....................................................................................... 77
Figure 58 Debugging Menu ................................................................................................. 78
Figure 59 Breakpoint .......................................................................................................... 79
Figure 60 Errors ................................................................................................................... 80
Figure 61 Error .................................................................................................................... 80
Figure 62 Declaring a Variable ............................................................................................. 83
Figure 63 Alter the table ...................................................................................................... 83
Figure 64 Indentation Style ................................................................................................. 84
Figure 65 Using comments .................................................................................................. 84
Tables
I needed assistance and advice from several reputable persons to complete my task
successfully. I want to start by thanking ESOFT for providing me with a welcoming
environment in which to do my task. I'm very happy that the report is finished. However, it
does not help my cause in this quest. I want to express my gratitude to Mrs. Shifani for
providing me with helpful assignment guidelines during my first semester. Finally, I would
like to give a sincere thank you to all the family members and fellow batch members for their
Ashfaque_Ajward KAN00128456
assistance through unforeseen situations. Without such assistance, I would not have been
able to do a difficult work. I therefore wish for long lives and good health for everyone who
has supported me and worked with me on this job.
Many Thanks!!!
Ashfaque_Ajward KAN00128456
Activity 1
A.
Algorithm
An algorithm is a procedure of solving a problem which is based on conducting a sequence
of specified actions. In simple word, an algorithm is a set of instructions which solve a
particular set of problems. It can be viewed as an elaborate algorithm.
Characteristics of an Algorithm
Unambiguous − The algorithm should be unambiguous and clear. Each of its phases,
along with their inputs and outputs, must be distinct and have a single, unambiguous
meaning.
Input − An algorithm should contain 0 or more inputs that are well described..
Output − An algorithm should produce at least one output that is clearly specified and
matches the desired output.
Finiteness − An algorithm must end after a predetermined number of steps.
Feasibility − Should be feasible with the available resources.
Independent − An algorithm should have step-by-step directions, which should be
independent of any programming code.
Flow chart
Ashfaque_Ajward KAN00128456
Figure 1Flow chart
Pessudocode
Programming Process
Ashfaque_Ajward KAN00128456
Types of Programming Process
Defining the problem.
• Planning the solution.
• Coding the program.
• Testing the program.
• Documenting the program.
Defining what you already know (the data as input) and what you hope to learn is the
challenge of defining the problem (output-the result). Eventually, you create a written
contract that details the needed input, processing, and output types among other things.
Defining what you already know (the data provided as input) and what you hope to learn is
the task of defining the problem (output-the result). Eventually, you create a written contract
that details the needed input, processing, and output types among other things.
The creation of a flowchart and the development of pseudocode, or perhaps even both, are
two popular methods of issue planning. A flowchart is essentially a visual representation of
an issue process in steps.
Coding is the process of telling a computer to execute a specific action. A set of instructions for
the computer is written in each line of the code. A script is made up of a set of codes, while a
program is made up of many sets. Coding is the process of telling a computer to perform a
specific action. A set of instructions for the computer is contained in each line of the code. A
script is comprised of a set of codes, while a program is made up of many sets.
Algorithm of Fibonacci
Ashfaque_Ajward KAN00128456
increasing, with each number to be equal to the sum of the two numbers before
everything.
Start
Input z
Define variable z, n
Function fib (n) If
n<=1:
return n
Else:
Return fib (n-2) +fib (n-1)
End if
End functions
If z>0 then
For y=0 to z step 1
Print (fib (y))
Else
Print (“please enter a positive number”)
End if
Stop
Ashfaque_Ajward KAN00128456
Figure 3Fibanacci code
Output
Figure 4 Output
Dry Run
Ashfaque_Ajward KAN00128456
x x> 0 y fib n n <= 1 Fib( n - 2 Fib( n – 1 output
(y)) ) )
3 T 0 fib(0) 1 T 0
1 fib(1) 1 T 1
2 fib(2) 2 F fib( 0 ) Fib( 1 )
Fib(1) 1 T 1
Table 1 Fibonacci Dry Run
Ashfaque_Ajward KAN00128456
Factorial
The total of all the integers from 1 to a specific number is its factorial.
For an example:
The factorial of 6, for instance, is 1*2*3*4*5*6 = 720. The factorial of zero is one, or 0! =
1, since factoring is not defined for negative values.
Start
Define variable x, y
Input y
Function fac (x)
If x==0
Return 1
Else
Return x*fac (x-1)
End if
End function If y<0 then print (" Please input
a number that’s positive ") else print
(“factorial is: “, fac (y)) end if stop
Output
Ashfaque_Ajward KAN00128456
Figure 6 Positive Output
Dry Run
y if y<0 x x == 0 fac(x-1) Fac(x) Output
4 F 4 F 3
3 F 2
2 F 1
1 F 0
0 T 24 Factorial: 24
Ashfaque_Ajward KAN00128456
1 1 F
0 T 1 Factorial: 1
0 F 0 T 1 Factorial: 1
Table 2 Factorial Dry run
Ashfaque_Ajward KAN00128456
The Programming Process
Big O notation
Notation Names
O (1) Constant
O(N) Linear
O(N2) Quadratic
O (Log N) Logarithmic
Table 3 Big O
Constant O (1)
This is called constant. O (1) is describing an algorithm that will be always execute in the
equal time regardless of the size of the input data set. The algorithm does a constant number
of operations independent on the input (rob-bell.net, 2009)
Linear O (N)
This is called has linear O (N) is a describes the algorithm is which performance will be
raising the linearly and in the direct proportion to the size of the input data set. The best
example for linear time complexity is the linear search where an element is searched
through an array sequentially. The time depends on the number of elements in the array
(rob-bell.net, 2009).
Ashfaque_Ajward KAN00128456
Quadratic O (N²)
This is call quadratic. The running time of the algorithm is because of performing a linear
operation N time. So, it’s N multiplied by N. A common sorting algorithms like bubble sort,
selection sort and insertion sort takes O (N²). This is common with algorithms that involve
nested iterations over the data set. Deeper nested iterations will result in O (N3 ), O(N4 )and
etc. (rob-bell.net, 2009).
Logarithmic O (Log N)
This is called logarithmic. The running time of the algorithm is decreased by some factor
with each step. A very simple and small example of this type is an algorithm that keeps
dividing the input by two. A binary search algorithm follows the same rule (rob-bell.net,
2009).
Fibonacci
• When we run the function to find the fourth Fibonacci number (input of 4), we start
receiving returned recursive results.
Output
Ashfaque_Ajward KAN00128456
only call twice if the input is 4. Consider typing in a greater number. The investigation will
take a while.
Total cost = {c1*1} +{c2*1} + {c3*1} +{c4*1} +{c5*(n-1)} +{c6*n} +{c8*n} +{c9*n}+
{c10*n}
As a result, the Big- complexity chart indicates that the efficiency of the Python code for the
Fibonacci sequence is at a fair level
Line no. Python code Cost No. Of Iteration
Ashfaque_Ajward KAN00128456
Line 1 Number = int (input c1 1
(“enter the number”))
Line 2 Fac = 1 c2 1
Line 3 If number >=0 c3 n+1
Line 4 If number >== 0 c4 n
Line 5 print (“factorial of 0 is c5 n
1”)
Line 6 Else: for x in range (1, c6 n
number+1)
Line 7 Fac=fac*x c7 n
Line 8 print (“factorial value c8 n
of, number “is”,fac)
Line 9 else: print c9 n
(number,”404 error!!_
please enter a
Number”)
Activity 2
The question of why many different programming paradigms are there is similar to why are
there many programming languages. Certain paradigms are better suited for certain types
of problems, so it makes sense to use different paradigms for different kinds of projects.
Also, the practices that make up each paradigm have developed through time. Thanks to the
advances both in software and hardware, different approaches have come up that didn't
exist before.
Ashfaque_Ajward KAN00128456
And last I think, there's human creativity. As a species, we just like creating things,
improving what others have built in the past, and adapting tools to our preference or to what
seems more efficient to us.
All this results in the fact that today we have many options to choose from when we want to
write and structure a given program
There are several programming languages that use paradigms, but to do this, they need to
follow a strategy or methodology. Paradigms are not meant to be mutually exclusive; a single
program can feature multiple paradigms. Below is an overview of programming languages
and their paradigm methodology.
Ashfaque_Ajward KAN00128456
• Structured: Programming with clean control structures.
• Procedural: Imperative programming with procedure calls.
• Functional: Programming with function calls that avoid any global state.
• Function-Level: Programming with no variables at all.
• Object-Oriented: Programming by defining objects that send messages to each other.
• Event-Driven: Programming with emitters and listeners of asynchronous actions.
• Flow-Driven: Programming processes communicating with each other over
predefined channels.
• Logic: Programming by specifying a set of facts and rules.
• Constraint: Programming by specifying a set of constraints.
• Aspect-Oriented: Programming cross-cutting concerns applied transparently.
• Reflective: Programming by manipulating the program elements. Array:
Programming with powerful array operators.
Now that we have introduced what programming paradigms are and are not, let's go through
the most popular ones, explain their main characteristics, and compare them.
Procedural programming
In procedural programming, the user is encouraged to subdivide the program execution into
functions, as a way of improving modularity and organization.
Ashfaque_Ajward KAN00128456
Figure 10 Output
Ashfaque_Ajward KAN00128456
Procedural programming follows a Object-oriented programming follows a
topdown approach. bottom-up approach.
Ashfaque_Ajward KAN00128456
The first step in OOP is to collect all of the objects a programmer wants to manipulate
and identify how they relate to each other -- an exercise known as data modeling.
Examples of an object can range from physical entities, such as a human being who is
described by properties like name and address, to small computer programs, such as
widgets.
Once an object is known, it is labeled with a class of objects that defines the kind of data it
contains and any logic sequences that can manipulate it. Each distinct logic sequence is
known as a method. Objects can communicate with well-defined interfaces called messages.
Classes are user-defined data types that act as the blueprint for individual objects, attributes,
and methods.
Objects are instances of a class created with specifically defined data. Objects can
correspond to real-world objects or an abstract entity. When class is defined initially, the
description is the only object that is defined.
Methods are functions that are defined inside a class that describe the behaviors of an
object. Each method contained in class definitions starts with a reference to an instance
object. Additionally, the subroutines contained in an object are called instance methods.
Programmers use methods for reusability or keeping functionality encapsulated inside one
object at a time.
Attributes are defined in the class template and represent the state of an object. Objects will
have data stored in the attributes field. Class attributes belong to the class itself.
Ashfaque_Ajward KAN00128456
Figure 11 OOP Snippet
Output
Ashfaque_Ajward KAN00128456
Object-oriented programming is based on the following principles:
Encapsulation:
This principle states that all important information is contained inside an object and only
select information is exposed. The implementation and state of each object are privately
held inside a defined class. Other objects do not have access to this class or the authority to
make changes. They are only able to call a list of public functions or methods. This
characteristic of data hiding provides greater program security and avoids unintended data
corruption.
Figure 13 Encapsulation
Abstraction:
Objects only reveal internal mechanisms that are relevant for the use of other objects,
hiding any unnecessary implementation code. The derived class can have its functionality
extended. This concept can help developers more easily make additional changes or
additions over time.
Inheritance:
Classes can reuse code from other classes. Relationships and subclasses between objects
can be assigned, enabling developers to reuse common logic while still maintaining a
unique hierarchy. This property of OOP forces a more thorough data analysis, reduces
development time and ensures a higher level of accuracy.
Ashfaque_Ajward KAN00128456
Figure 14 Inheritance
Polymorphism:
Objects are designed to share behaviors and they can take on more than one form. The
program will determine which meaning or usage is necessary for each execution of that
object from a parent class, reducing the need to duplicate code. A child class is then created,
which extends the functionality of the parent class. Polymorphism allows different types of
objects to pass through the same interface.
Figure 15 Polymorphism
Benefits of OOP
1. Re-usability
2. Data Redundancy
3. Code Maintenance
Ashfaque_Ajward KAN00128456
4. Security
5. Design Benefits
6. Better productivity
7. Easy troubleshooting
Event-driven programming
Service Oriented
The option to design special programs for services using event-driven programming is known
as service oriented programming (SOP). SOP only uses a small portion of the computer's
processor speed, but most services run in the OS's background.
Ashfaque_Ajward KAN00128456
Time Drive
Time driven is a paradigm in event driven programming that defines a piece of code that
operates in response to a time trigger. This code can run once an hour, once a day, once a
week, or once a month, giving it a pre-set task. Windows Update, for instance, is a timedriven
example where its user can choose when to update or when to check for and download the
update.
Event Handlers
When a specific event is triggered, an event handler is a sort of function or method that takes a
particular action. An event handler might, for reference, be a button that, upon user click,
displays a message and, after second user click, removes the message.
Trigger Functions
In event-driven programming, trigger functions are a function that chooses what code to run
when a given event occurs. They are also used to choose another event handler to apply for
the event.
Events
Events include mouse, keyboard, and user interface, which must be triggered in the program
for them to occur. This requires interactivity with rendering quality, such as clicking buttons
with a mouse or picking icons with the keyboard.
Snippets Codes
Ashfaque_Ajward KAN00128456
Figure 16Even driven code for snippets
Figure 17Output
Ashfaque_Ajward KAN00128456
taken to computer it but rather some description or denotation of
the desired result.
Rent Calculation
Ashfaque_Ajward KAN00128456
Psuedocode
Ashfaque_Ajward KAN00128456
Ayubo
Main Program
Ashfaque_Ajward KAN00128456
Figure 20 Main Program
Output
Figure 21 Output
Ashfaque_Ajward KAN00128456
Day-Tour Calculation
pseudocode
Ashfaque_Ajward KAN00128456
Implement Long tour - hire calculation Pseudocode in C#
Ashfaque_Ajward KAN00128456
Main Program
Output
Ashfaque_Ajward KAN00128456
Figure 24 Output
Ashfaque_Ajward KAN00128456
Long tour - hire calculation
Pseudocode
Ashfaque_Ajward KAN00128456
Ashfaque_Ajward KAN00128456
Figure 25 Long Tour hire calculation
Main Program
KAN00128456
Ashfaque_Ajward
Figure 27 Output
Ashfaque_Ajward KAN00128456
Database Structure of Auybo System
Database
Ashfaque_Ajward KAN00128456
TABLES
Vehicle
Ashfaque_Ajward KAN00128456
Package
Figure 30 Package
Ashfaque_Ajward KAN00128456
Figure 31 Package 2
The first version of VS (Visual Studio) was released in 1997, named as Visual
Studio 97 having version number 5.0. The latest version of Visual Studio is
15.0 which was released on March 7, 2017. It is also termed as Visual Studio
2017. The supported .Net Framework Versions in latest Visual Studio is 3.5 to
4.7. Java was supported in old versions of Visual Studio but in the latest version
doesn’t provide any support for Java language.
Ashfaque_Ajward KAN00128456
It is a free version which is announced in 2014. All other editions are paid. This
contains the features like Professional edition. Using this edition, any individual
developer can develop their own free or paid apps like .Net applications, Web
applications and many more. In an enterprise organization, this edition has some
limitations. For example, if your organization have more than 250 PCs and having
annual revenue greater than $1 Million (US Dollars) then you are not permitted to
use this edition. In a non-enterprise organization, up to five users can use this
edition. Its main purpose is to provide the Ecosystem (Access to thousands of
extensions) and Languages (You can code in C#, VB, F#, C++, HTML,
JavaScript, Python, etc.) support.
Professional
It is the commercial edition of Visual Studio. It comes in Visual Studio 2010 and
later versions. It provides the support for XML and XSLT editing and includes
the tool like Server Explorer and integration with Microsoft SQL Server.
Microsoft provides a free trial of this edition and after the trial period, the user
must pay to continue using it. Its main purpose is to provide Flexibility
(Professional developer tools for building any application type), Productivity
(Powerful features such as CodeLens improve your team’s productivity),
Collaboration (Agile project planning tools, charts, etc.) and Subscriber benefits
like Microsoft software, plus Azure, Pluralsight, etc.
Enterprise
It is an integrated, end to end solution for teams of any size with the demanding
quality and scale needs. Microsoft provides a 90-days free trial of this edition and
after the trial period
Ashfaque_Ajward KAN00128456
the user has to pay to continue using it. The main benefit of this edition is that
it is highly scalable and deliver high-quality software.
IDE
Integrated Development Environment, to analyze, is what the term IDE means. An IDE
includes a text editor, a project editor, a tool bar, and an output viewer among its tools.
IDEs are capable of many different tasks. ... IDEs include packages like NetBeans, Eclipse,
IntelliJ, and Visual Studio as examples.
4. Syntax coloring
6. Finds where a method is used and draws a chart (not found in most IDEs
to-date)
Ashfaque_Ajward KAN00128456
Without an IDE, developers spend time deciding what tools to use for various
tasks, configuring the tools and learning how to use them. Many or even all
of the necessary dev- test tools are included in one integrated development
environment.
IDEs are also designed with all their tools under one user interface. An IDE can
standardize the development process by organizing the necessary features for
software development in the UI.
Ashfaque_Ajward KAN00128456
Debugging
Debugging is the process of finding the errors in the application or software. Any software
program or product which is being developed undergoes through various steps – testing,
troubleshooting, maintenance in a different environment. Software or product contains
some error or bugs. It should be removed to run successfully. Debugging refers to finding
bugs, analyzing, and fixings them. In every stage of debugging, we should fix the errors.
Figure 32 Debugging
Property window
The Properties window displays the properties for the current object. When you select
different objects in your VBA project, the Properties window changes to show just the
properties of the object you selected.
Ashfaque_Ajward KAN00128456
Figure 33 Property Window
Solution explorer
Users of Visual Studio feel like home in the Solution Explorer panel. Thanks to a tree view
layout, it displays all projects, source files, and objects. The Visual Studio Solution
Explorer panel is like a second home for Visual Studio users since it is quite sophisticated,
and it is likely that you aren't utilizing all the possibilities of this fantastic tool. Thanks to a
tree view layout, it displays all projects, source files, and things. Given the sophistication of
this panel, it's likely that you're not getting the most of all its abilities.
Ashfaque_Ajward KAN00128456
Figure 34 Solution Explorer
Server Explorer
Installing Server Explorer preinstalled with Visual Studio. can be used to test connections
and see Azure services, SQL Server databases, and any other databases with an installed
ADO.NET provider. Server Explorer also exposes low-level items such system
performance counters, event logs, and message queues. installed with Visual Studio. can be
used to test connections and see Azure services, SQL Server databases, and any other
databases with an installed ADO.NET provider. Shows low-level items as well, such
message queues, event logs, and system performance counters.
Ashfaque_Ajward KAN00128456
Figure 35 Server Explorer
Toolbox
Controls that you can add to Visual Studio projects are shown in the Toolbox pane. Press
Ctrl+Alt+X to launch Toolbox or select View > Toolbox from the menu bar. You can
resize and place the controls by drag & drop it onto the surface of the designer you are
using.
Ashfaque_Ajward KAN00128456
Figure 36 Toolbox
Ashfaque_Ajward KAN00128456
Activity 4
Log in Page
KAN00128456
Ashfaque_Ajward
Figure 39 Search
KAN00128456
Insert
Ashfaque_Ajward
Figure 40 Insert
Update
Figure 41 Update
KAN00128456
Delete
KAN00128456
Figure 42Ashfaque_Ajward Delete Calculate the Vehicle rent
KAN00128456
Ashfaque_Ajward
Search
Insert
KAN00128456
Ashfaque_Ajward
Figure 47 Inesrt
Update
Figure 48 Update
Delete
KAN00128456
Ashfaque_Ajward
Figure 49 Delete
KAN00128456
Figure 50 Day Hire Calculation
Calculate the KM
Ashfaque_Ajward
Ashfaque_Ajward KAN00128456
Calculate the Day
Calculate the KM
In the software market there are huge competition. So, we need to be 100% in our products. If
it is clear and easy customers will attract to our system. Soo we ca gain a huge question in the
market and customers become satisfied with our products
Ashfaque_Ajward KAN00128456
Figure 58 Debugging Menu
• Breakpoints
It is a stop mark can be applied in the application where the execution pauses for the
debugging. This allows the programmer to view the error in the coding.
Figure 59 Breakpoint
Ashfaque_Ajward KAN00128456
One reason to use the IDE might be that modern IDEs support
more than simple breakpoints. For example, Visual Studio
offers the following advanced debugging features:
• define conditional breakpoints (break only if a condition is met, or only on the n-th
time the statement at the breakpoint is executed)
• break on an unhandled exception or whenever a (specific) ecxeption is to be thrown
• change variable while debugging
• repeating a piece of code by setting the next line to be executed.etc.
Also, when using the debugger, you won't have to remove all your
print statements once you have finished debugging.
• Here it is showed when the Description of the item in the system defined wrongly. It
indicated the errors.
Ashfaque_Ajward KAN00128456
Figure 60 Errors
The most common message that is possible to get from Visual studio
id some sort of exception which prevents the program from
interruption in the end user.
Figure 61 Error
Coding Standerds
The Coding phase involves the coding of several modules that are specified in
the design document in accordance with the module specification. The
primary objective of the coding phase is to write high-level code using the
design document created following the design phase, and to unit test this code
later.
Code standards are a well-defined and expected style of coding that good
software development businesses want their programmers to adhere to. They
typically create their own coding standards and rules based on what works
best for their business and the types of software they create. Maintaining
Ashfaque_Ajward KAN00128456
coding standards is crucial for programmers because failing to do so will
result in the code being rejected during code review.
• Increase efficiency
• Reduce complicity
I have used a basic “if” loop to demonstrate that even the most basic functions can
be made confusing without correct variable declarations. It must be remembered,
however that almost all programs will be more complex than this and therefore
making the code even less difficult to read.
Tabs are a bad choice for indenting code. I use spaces myself, but I do not despise
tabs. Comments should clearly demonstrate the function of the code, not only to
other developers but also to us. So it is easier to read a well written comment that
it is to trawl through lines of code trying to remember what the function of the
code i have already written.
I set the Variable shall have mnemonic or meaningful names that convey to a
casual observe red and Variable declarations that span multiple lines should
always be preceded by a type.
Variable (inline)
I do not use it variable names like text1, text2, text3, text4 etc.
• Name
Always choose meaningful and specific names (text, Interface, Button,
Label,), Always used Camel Case or Pascal Case names, Avoided ALL
CAPS and all lowercase names. Single lowercase words or letters are
used. Not including the parent class name within a property name.
• Type name
Ashfaque_Ajward KAN00128456
Declaring a Variable
Ashfaque_Ajward KAN00128456
Figure 62 Declaring a Variable
Indentation Style
One of the most crucial elements in any programming area is
indentation. Text is indented when it is moved further to the
right or left in order to stand out from adjacent text.
Programming's practice of indenting code blocks to show
the organization of a program is known as the Indent style.
Ashfaque_Ajward KAN00128456
Figure 64 Indentation Style
Using comments
References
Coding standards: what are they, and why do you need them. (n.d.). Retrieved from Codacy:
https://blog.codacy.com/coding-standards-what-are-they-and-why-do-you-needthem/
Ashfaque_Ajward KAN00128456
Grading Rubric
Ashfaque_Ajward KAN00128456
LO2 Explain the characteristics of procedural,
objectorientated and event-driven programming,
conduct an analysis of a suitable Integrated
Development Environment (IDE)
Ashfaque_Ajward KAN00128456
P3Write a program that implements an algorithm using an
IDE.
Ashfaque_Ajward KAN00128456
M4Evaluate how the debugging process can be used to help
develop more secure, robust applications.
Ashfaque_Ajward KAN00128456
Ashfaque_Ajward KAN00128456