0% found this document useful (0 votes)
9 views96 pages

PRograme 67566756

Uploaded by

teraX
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views96 pages

PRograme 67566756

Uploaded by

teraX
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 96

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)

INTERNAL VERIFICATION – ASSESSMENT DECISIONS


Programme title Higher National Diploma in Computing

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.

INTERNAL VERIFIER CHECKLIST

Do the assessment criteria awarded match


those shown in the assignment brief?
Y/N
Is the Pass/Merit/Distinction grade awarded
justified by the assessor’s comments on the Y/N
student work?
Has the work been assessed accurately?
Y/N
Is the feedback to the student:
Give details:
• Constructive?
Y/N
• Linked to relevant assessment criteria? Y/N
• Identifying opportunities for improved Y/N
performance? Y/N
• Agreeing actions?
Does the assessment decision need amending?
Y/N

Assessor signature Date


Ashfaque_Ajward KAN00128456
Internal Verifier signature Date
Programme Leader signature (if required)
Date

Ashfaque_Ajward KAN00128456
Confirm action completed
Remedial action taken

Give details:

Assessor signature Date


Internal Verifier
signature Date
Programme Leader
signature (if required) Date

Higher Nationals - Summative Assignment Feedback Form


Student Name/ID Muhammadh.Ashfaque
Unit Title
Assignment Number Assessor

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).

Pass, Merit & Distinction Descripts P2 M2 D2

LO3. Implement basic algorithms in code using an IDE.

Pass, Merit & Distinction Descripts P3 M3


D3

LO4. Determine the debugging process and explain the importance of a codi ng standard.

Pass, Merit & Distinction Descripts P4 P5 M4 D4

Grade: Assessor Signature: Date:


Resubmission Feedback:

Grade: Assessor Signature: Date:


Internal Verifier’s Comments:
Signature & Date:

* 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

Feedback: Student to Assessor

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.

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.

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.

1. I know that plagiarism is a punishable offence because it constitutes theft.


2. I understand the plagiarism and copying policy of the Edexcel UK.
3. I know what the consequences will be if I plagiaries or copy another’s work in any of the
assignments for this program.
4. I declare therefore that all work presented by me for every aspects of my program, will be
my own, and where I have made use of another’s work, I will attribute the source in the
correct way.
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document is not
attached to the attached.

Student’s Signature: Date:


(Provide E-mail ID) (Provide Submission Date)

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

Academic Year 2021/22


Unit Tutor

Assignment Title Design &Implement a GUI based system using a suitable


Integrated Development Environment

Issue Date

Submission Date

IV Name & 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)

2. Implemented System (Software)


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.

Unit Learning Outcomes:

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).

LO3. Implement basic algorithms in code using an IDE.

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

B. Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n.


For example, factorial of 6 is 6*5*4*3*2*1 which is 720.
n! = n * (n - 1) * …….. 1

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.

Vehicle rent and 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:

Total rent = weeklyRent x 1 + dailyRent x 3 + dailyDriverCost x 10

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

Function 1: Rent calculation.


Return the total rent_value when vehicle_no, rented_date, return_date, with_driver
parameters are sent in. with_driver parameter is set to true or false depending whether the
vehicle is rented with or without driver.

Function 2: Day tour - hire calculation.


Calculate total hire_value when vehicle_no, package_type, start_time, end_time,
start_km_reading, end_km_reading parameters are sent in. Should return base_hire_charge,
waiting_charge and extra_km_charge as output parameters.

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

Figure 1Flow chart ............................................................................................................... 21


Figure 2Example Psudocode ................................................................................................ 21
Figure 3Fibanacci code ........................................................................................................ 24
Figure 4 Output ................................................................................................................... 24
Figure 5 Factorial code ........................................................................................................ 26
Figure 6 Positive Output ...................................................................................................... 27
Figure 7 Negative Output .................................................................................................... 27
Figure 8 Programming Paradigms ........................................................................................ 34

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

Table 1 Fibonacci Dry Run ................................................................................................... 25


Table 2 Factorial Dry run ..................................................................................................... 28
Table 3 Big O ....................................................................................................................... 30
Table 4 Procedural vs Object- oriented ................................................................................ 37
ACKNOWLEDGEMENT

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

An algorithm, workflow, or process is described by a flowchart, a type of diagram. The


flowchart displays the stages as a series of boxes of varying sizes, with arrows joining the
boxes in the correct order. This diagrammatic example shows a possible solutions to a
given issue. An algorithm, workflow, or process is described by a flowchart, a type of
diagram. The flowchart displays the stages as a series of boxes of varying sizes, with
arrows joining the boxes in the correct order. This diagrammatic picture depicts a solution
to a given issue.

Ashfaque_Ajward KAN00128456
Figure 1Flow chart

Pessudocode

Pseudocode is a created, informal language that aids in the creation of algorithms by


programmers. A "text-based" detail (algorithmic) design tool is pseudocode. The Pseudocode
rules are not too hard. Statements that prove "depend" must all be indented. Some of these
are while, do, for, if, and switch. Pseudocode is a produced, informal language that aids in the
creation of algorithms by programmers. A "text-based" detail (algorithmic) design tool is
pseudocode. The Pseudocode rules are not too complicated. Statements that show "reliance"
must all be indented. Some of these are while, do, for, if, and switch.

Figure 2Example Psudocode

Programming Process

Programming is the process of changing an algorithm into a notation, or programming language,


so that a computer may use it to complete a task. There are many various types of computers
and programming languages, but the most crucial first step is the requirement to have the
answer. Programming is the process of putting an algorithm into a notation, or programming
language, so that a computer may use it to carry out a task. There are many various types of
computers and programming languages, but the most crucial first step is the need to have the
answer.

Ashfaque_Ajward KAN00128456
Types of Programming Process
 Defining the problem.
• Planning the solution.
• Coding the program.
• Testing the program.
• Documenting the program.

Defining the problem

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.

Planning the problem

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 the Program

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

Leonardo Fibonacci, an Italian mathematician, designed the Fibonacci sequence in


the 13th century. Starting with zero and one, the series of numbers started

Ashfaque_Ajward KAN00128456
increasing, with each number to be equal to the sum of the two numbers before
everything.

1. Create 2 variables and initialize them with 0 and 1 (first = 0, second = 1)


2. Create another variable to keep track of the length of the Fibonacci sequence to be
printed (length)
3. Loop (length is less than series length)
4. Print first + second
5. Update first and second variable (first will point to the second, and the second
will point to first + second)
6. Decrement the length variable and repeat from step 3
7. Once the loop terminates, terminate the program

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

Python code in Fibonacci series

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

Python code in Factorial

Figure 5 Factorial code

Output

Ashfaque_Ajward KAN00128456
Figure 6 Positive Output

Figure 7 Negative 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

Defining the Problem


Identifying inputs, outputs, and operations that result in inputs and outputs makes up this
step. As an example, one issue requests that the user submit a round integer. As a result, the
program now outputs a number that is two times what the user provided. Thus, in this case,
user input determines what the program's output is. Therefore, you must focus entirely on
the program's input and output before starting to work on the code.

Planning the solution


But many inexperienced programmers skip this step. Before to writing the code, you should
first fix the issue. For instance, if you have to program a problem that requires you to
multiply 12 by 1000, you must first finish the math before starting to write the program.

Coding the problem


The next step is to write the program in the programming language of your choice that will
describe your solution.

Testing the problem


There are possibly some faults in the just written program. Test for them, then resolve
them. Use your favorite editor, such as the SUBLIME text editor, or the debugger
feature in your IDE, for example.

Documenting the program


The process of documenting is continual and important. Whenever needed, make sure
to document each line of your code. Tell, what the goal is for that line, and what that
block of code is meant to accomplish. It is crucial.

Big O notation and Efficiencies of algorithms

Big O notation

Big o notation is simplified analyses of an algorithm's efficiency. Big o notation is an


algorithm complexity in term of input size, and it gives the way to efficiency or code from
the machine is run out we don't care of the start the machine rather we assign in the basic
computer step of the code. We can use big o to analyze both time and space. There are
couple ways to look at the algorithm efficiencies. That we can divide as worst-case,
bestcase, and average case.
Ashfaque_Ajward KAN00128456
The best case is here we look at the most favorable situation and check the efficiency of the
algorithm. For an example sorting a nearly sported array. The worst case is here we look at
most adverse situation and analyze the efficiency of the algorithm. For example, sorting an
array arranged in descending order to ascending order and the average case is average of the
best case and the worst-case scenarios (Geekforgeeks.com, 2017).

The following is a list of common types of notations and their names

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

This immediately becomes a labor-intensive computing procedure. Watch how pointless


that is. Fibonacci (2) and Fibonacci (1) only call twice if the input is 4. Consider typing in a
greater number. The procedure will take a while. This technique quickly becomes quite
computationally demanding. Watch how pointless that is. Fibonacci (2) and Fibonacci (1)

Ashfaque_Ajward KAN00128456
only call twice if the input is 4. Consider typing in a greater number. The investigation will
take a while.

Our time complexity is Z(a) = Z(a-1) + Z(a-2) + X


Z(a) = H(2^(a-1)) + H(2^(a-2)) + H (1) related to the binary tree of calls that are made by
each recursive call. If you don't accept me, check below.

At large n, we obtain H(2^a), which is exponential time (slow).

Total cost = {c1*1} +{c2*1} + {c3*1} +{c4*1} +{c5*(n-1)} +{c6*n} +{c8*n} +{c9*n}+
{c10*n}

Total cost = (c5+c6+c7+c8+c9+c10) +c1+c2+c3+c4+c5

The domination factor is in, therefor Big O Value = O(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”)

Total cost=n (c3+c4+c5+c6+c7+c8+c9) +c1+c2+c3


The domination factor is in, therefor Big-O Value=0(n)
As a result, the Big-O complexity chart indicates that the factorial value Python code is
fairly efficient.

Activity 2

What is a Programming Paradigm?


Programming paradigms are different ways or styles in which a given program or
programming language can be organized. Each paradigm consists of certain structures,
features, and opinions about how common programming problems should be tackled.

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

Programming Paradigm Defined

Figure 8 Programming Paradigms


A programming paradigm is the classification, style or way of programming. It is an
approach to solve problems by using programming languages. Depending on the language,
the difficulty of using a paradigm differs.

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.

• Imperative: Programming with an explicit sequence of commands.


• Declarative: Programming by specifying the result a user wants, instead of how to get
it.

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

Procedural programming is a derivation of imperative programming, adding to it the feature of


functions (also known as "procedures" or "subroutines").

In procedural programming, the user is encouraged to subdivide the program execution into
functions, as a way of improving modularity and organization.

Figure 9 Ex Procedural code

Ashfaque_Ajward KAN00128456
Figure 10 Output

Comparing Procedural Programming vs. Object-Oriented Programming

Procedural Oriented Programming Object-Oriented Programming

In procedural programming, the In object-oriented programming, the


program is divided into small parts program is divided into small parts
called functions. called objects.

Ashfaque_Ajward KAN00128456
Procedural programming follows a Object-oriented programming follows a
topdown approach. bottom-up approach.

There is no access specifier in


procedural programming. Object-oriented programming has
access specifiers like private, public,
protected, etc.

Adding new data and functions is not


easy. Adding new data and function is easy.

Code reusability absent in procedural Code reusability present in


programming, objectoriented programming.

In procedural programming, Overloading is possible in


overloading is not possible objectoriented programming.
Table 4 Procedural vs Object- oriented

What is object-oriented programming?

Object-oriented programming (OOP) is a computer programming model that organizes


software design around data, or objects, rather than functions and logic. An object can be
defined as a data field that has unique attributes and behavior.
OOP focuses on the objects that developers want to manipulate rather than the logic
required to manipulate them. This approach to programming is well-suited for programs that
are large, complex, and actively updated or maintained. This includes programs for
manufacturing and design, as well as mobile applications; for example, OOP can be used for
manufacturing system simulation software.
The organization of an object-oriented program also makes the method beneficial to
collaborative development, where projects are divided into groups. Additional benefits of
OOP include code reusability, scalability, and efficiency.

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.

What is the structure of object-oriented programming?

The structure, or building blocks, of object-oriented programming include the following:

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.

Example code for OOP

Ashfaque_Ajward KAN00128456
Figure 11 OOP Snippet

Output

Figure 12 OOP output

What are the main principles of OOP?

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

Event-driven programming is a programming paradigm in which the flow of program


execution is determined by events - for example a user action such as a mouse click, key
press, or a message from the operating system or another program. An event-driven
application is designed to detect events as they occur, and then deal with them using an
appropriate event-handling procedure. The idea is an extension of interrupt-driven
programming of the kind found in early command-line environments such as DOS, and in
embedded systems (where the application is implemented as firmware).

Event-driven programs can be written in any programming language, although some


languages(Visual Basic for example) are specifically designed to facilitate event-driven
programming, and provide an integrated development environment (IDE) that partially
automates the production of code, and provides a comprehensive selection of built-in objects
and controls, each of which can respond to a range of events. Virtually all object-oriented and
visual languages support event-driven programming. Visual Basic, Visual C++ and Java are
examples of such languages.

Characteristics Of 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

Code For Event Driven Programming Automatic Events From Timer

Ashfaque_Ajward KAN00128456
Figure 16Even driven code for snippets

Figure 17Output

Relationship among procedural , event driven , OOP paradigms


Procedural programming means that you define a program and
its subprograms as a series of steps. In contrast, declarative
programs try to describe the result without regard to the steps

Ashfaque_Ajward KAN00128456
taken to computer it but rather some description or denotation of
the desired result.

Object oriented programming is a way of organizing code


around the principles of encapsulation, inheritance, substitution,
programming to interfaces, and so on. Object oriented programs
are usually mostly procedural.

Event based programming is about writing event handling


procedures and having the core event loop provided by the
underlying system. In this way you can save the trouble of writing
your own event loop and benefit from various libraries that
already work with the system provided event loop. Event based
programs are very often writing using object oriented style, but
not always.
These three categories are thus not related strictly hierarchically, but in common usage they
are mostly nested within one another.

Figure 18 Relationship among procedural , event driven , OOP paradigms


Activity 3

Design suitable algorithm for Vehicle traffic calculation

Rent Calculation

Ashfaque_Ajward KAN00128456
Psuedocode

Implement Day-Tour Calculation Pseudocode in C#

Ashfaque_Ajward KAN00128456
Ayubo

Figure 19 Day Calculation

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#

Figure 22 Long Tour Calculation

Ashfaque_Ajward KAN00128456
Main Program

Figure 23 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 26 Main Program


Output

Figure 27 Output

Ashfaque_Ajward KAN00128456
Database Structure of Auybo System

Database

Figure 28 Create Database

Ashfaque_Ajward KAN00128456
TABLES

Vehicle

Figure 29 Vehicle tables

Ashfaque_Ajward KAN00128456
Package

Figure 30 Package

Ashfaque_Ajward KAN00128456
Figure 31 Package 2

What is Visual Studio IDE

Visual Studio is an Integrated Development Environment (IDE) developed by


Microsoft to develop GUI(Graphical User Interface), console, Web applications,
web apps, mobile apps, cloud, and web services, etc. With the help of this IDE,
you can create managed code as well as native code. It uses the various
platforms of Microsoft software development software like Windows store,
Microsoft Silverlight, and Windows API, etc. It is not a language-specific IDE as
you can use this to write code in C#, C++, VB (Visual Basic), Python,
JavaScript, and many more languages. It provides support for 36 different
programming languages. It is available for Windows as well as for macOS.

History of Visual Studio

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.

There are 3 Types of Microsoft Visual Studio as follows Community

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.

Main feature of IDE

A software program known as an integrated development environment (IDE) combines


the fundamental instruments developers require to create and test software. An IDE
typically includes a code editor, compiler or interpreter, and debugger that a developer
can use via a single graphical user interface (GUI).

Some Basic features of IDE

1. Integration with version control

2. Integration with database system

3. On-the-fly syntax checking and help

4. Syntax coloring

5. Handles projects not only files of code

6. Finds where a method is used and draws a chart (not found in most IDEs
to-date)

7. Registers components (depending on your language)

8. Integration with GUI Editor(s)

Benefits of using IDEs


An IDE can improve the productivity of software developers thanks to
fast setup and standardization across tools.

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

GUI Design For Ayubo System

Log in Page

Figure 37 Login Page

MDI Parent for selecting


Vehicle Details

KAN00128456
Ashfaque_Ajward

Figure 38 Login Selection


Search

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

Figure 43 Calculate the Vehicle rent

Calculate the day

Figure 44 Calculate the day

Calculate the total cost

KAN00128456
Ashfaque_Ajward

Figure 45 Calculate the total cost

Package Detail Form (Search, Insert, Update, Delete)

Search

Figure 46 Package search

Insert

KAN00128456
Ashfaque_Ajward
Figure 47 Inesrt

Update

Figure 48 Update

Delete
KAN00128456
Ashfaque_Ajward

Figure 49 Delete

Day Hire Calculation

KAN00128456
Figure 50 Day Hire Calculation

Calculate the KM

Ashfaque_Ajward

Figure 51 Calculate the KM


KAN00128456
Calculate the Hours

Figure 52 Calculate the Hours

Calculate The Total Cost

Figure 53 Calculate The Total Cost


Ashfaque_Ajward KAN00128456
Calculate the Long Hire

Figure 54 Calculate the Long Hire

Ashfaque_Ajward KAN00128456
Calculate the Day

Figure 55 Calculate the Day

Calculate the KM

Figure 56 Calculate the KM


Ashfaque_Ajward KAN00128456
Calculate The Long Hire

Figure 57 Calculate The Long Hire

Why do we need to debug

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

• Features available n IDE for the debugging.


In the Visual studio which I built the system AyuboDrive, it contains a Debugging
Menu at the top bar of the Software.

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.

How Features Help

Here how I used Debugging Process:


• In my Ayubo system I had used the debugging system to identify the bugs and
corrected the errors. For my system the debugging was needed because of the
complexity of my coding and the program. The logical errors have been automatically
identified by the Visual studio. In every execution of the new added code I run the
program to test the errors. It showed he errors and I could fix them easily because of
the debugging Process. Here is a figure from my system when the error was identified.

• 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.

There are some benefits of coding standard, and they are:

• Increase efficiency

• Reduce complicity

• Minimize the risk of project failure

• Maintains should be easy

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.

Explain the coding standards

 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

Each piece of code begins with a declaration of a variable that


specifies the kind of data that may be placed into the given field.
As it would be extremely simple for me to grasp, all variables
that need to be declared were given their entire names.

Ashfaque_Ajward KAN00128456
Figure 62 Declaring a Variable

Alter the table

Figure 63 Alter the table

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

In the source code of a computer program, a remark is a


legible explanation for programmers. Consequently, they are
introduced to the source code to make it simpler for people to
understand it, while compilers and interpreters often disregard
them. However, I've used these remarks to explain how the
computations work.

Figure 65 Using comments


Coding standard for team
When developing application in a team, its highly important to have coding standards. For
example, Coding guidelines also help software developing teams to write consistent code
which is easy to read and understand for all team members. Establishing such guidelines
can be problematic if it is done wrong but it will be very beneficial for the whole team if it
is done the right way. The coding standards in a team help to reduce the risk of project
failed and the following coding standers help to developer for the main tent of the
Ashfaque_Ajward KAN00128456
software. The coding standers in a team help to minimize the risk of project failed and it
reduce the complicity. Another important benefit for a team is to identify the ongoing
process of the fellow team members who may be developing a different part of the same
process of the application. If a proper coding standard were maintained within a team, it
would be able to switch between teams as anytime as everyone is familiar with the process
of development. When coding standers are followed it is to make changes to the code
when ever needed. The coding standards are very important and useful for a team.

Coding standard for individual


Coding standard is very highly important when we work as individually. It is not the way
in which a team develops a program, an individual would develop it. For a individual
following coding standards helps to get a clear idea of what is happening within the code
and also in case the developing of the code it’s be stop the completion of the program code
be given to another individual it is also possible. However, another important benefit if that
it is possible to transfer the project to another programmer it can be done without a mess,
as it is easy to understand the coding if a single pattern is followed throughout the
program. When developing as an individual if coding standards are followed it will help
the individual to adapt to changes where he can go with the modern methods. If proper
coding standards, are it is possible to make changes to the system in a way that anyone
could understand. Finally, the coding standard are very important for individual.
(Coding standards: what are they, and why do you need them, n.d.)

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

Grading Criteria Achieved Feedback

LO1 Define basic algorithms to carry out an operation


and outline the process of programming an
application.

P1Provide a definition of what an algorithm is and outline


the process in building an application.

M1Determine the steps taken from writing code to


execution.

D1 Evaluate the implementation of an algorithm in a suitable


language. Evaluate the relationship between the written
algorithm and the code variant

Ashfaque_Ajward KAN00128456
LO2 Explain the characteristics of procedural,
objectorientated and event-driven programming,
conduct an analysis of a suitable Integrated
Development Environment (IDE)

P2Give explanations of what procedural, objectorientated,


and eventdriven paradigms are; their characteristics and the
relationship between them.

M2 Compare and contrast the procedural, object


orientated and event driven paradigms used in given
source code of an application

D2Critically evaluate the source code of an application which


implements the programming paradigms, in terms of the
code structure and characteristics.

LO3Implement basic algorithms in code using an IDE.

Ashfaque_Ajward KAN00128456
P3Write a program that implements an algorithm using an
IDE.

M3Use the IDE to manage the development process of the


program.

D3Evaluate the use of an IDE for development of


applications contrasted with not using an IDE.

LO4 Determine the debugging process and explain


the importance of a coding standard

P4Explain the debugging process and explain the debugging


facilities available in the IDE.

P5Outline the coding standard you have used in your code.

Ashfaque_Ajward KAN00128456
M4Evaluate how the debugging process can be used to help
develop more secure, robust applications.

D4 Critically evaluate why a coding standard is necessary in


a team as well as for the individual.

Ashfaque_Ajward KAN00128456
Ashfaque_Ajward KAN00128456

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy