unit-01-programming-assignment-reworded insha
unit-01-programming-assignment-reworded insha
lOMoARcPSD|42842578
Higher Nationals
Internal verification of assessment decisions – BTEC (RQF)
INTERNAL VERIFICATION – ASSESSMENT DECISIONS
Programme title Higher National Diploma in Computing
Design & Implement a GUI based system using a suitable Integrated Development
Assignment title
Environment
Student’s name Fathima Insha/
1|Page
lOMoARcPSD|42842578
Programme Leader
signature (if required) Date
2|Page
lOMoARcPSD|42842578
LO4. Determine the debugging process and explain the importance of a co ding standard.
Resubmission Feedback:
* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place
and grades decisions have been agreed at the assessment board.
Assignment Feedback
3|Page
lOMoARcPSD|42842578
Action Plan
Summative
feedback
Date
Assessor signature
2025/04/20
4|Page
lOMoARcPSD|42842578
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 compulsory information mentioned will result in rejection of your work.
2. Carefully check the hand in date and the instructions given in the assignment. Late submissions
will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as illness, you
may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them properly using
HARVARD referencing system to avoid plagiarism. You have to provide both in-text citation and a
reference list.
10. If you are proven to be guilty of plagiarism or any academic misconduct, your grade could
bereduced to A REFERRAL or at worst you could be expelled from the course
5|Page
lOMoARcPSD|42842578
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.
6
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
7
T.M..Sabrin/COL00143342 Unit-01 Programming 7 |No.01
Assignment Page
Downloaded by Mohamed Muthaiyb ([email protected])
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No. 01
lOMoARcPSD|42842578
Unit Tutor
Issue Date
Submission Date
Submission Format
This submission will have 3 components
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)
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.
8
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
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
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, ……..
Fn = F n-1 + F n-2
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
and carry out an analysis of writing the code phase by discussing the potential challenges
9
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
faced.
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 Compare and discuss 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) and critically evaluate
the code samples that you have given above in relation to their structure and the unique
characteristics.
Grifindo Toys is a small-scale Toy building company which is located in United Kingdom (UK)
and currently they have 50 employees working at their headquarters. They are looking for a simple
payroll system to calculate the salaries of their employees and you are hired as a freelance software
developer to build their payroll system.
Grifindo Toys Payroll System mainly contains five components and the specifications for the
10
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
1. Employee Component.
Admin should be able to register employee details to the system (including monthly
salary, overtime rates-hourly, allowances).
Admin should be able to update all employee details in the system (Update and
Delete including monthly salary, overtime rates-hourly, allowances).
Admin should be able to view individual employee details, view all employees
details, search employees.
2. Salary Component
Admin should be able to input the date range to calculate the salary. Salary cycle
begin date and the end date should be given to calculate the monthly salary. Salary
cycle begin date and end date will be defined in the settings component and if the
user enters something else the system should display an error message.
The admin should be able to enter the no of leaves an employee has taken with
number of absent days, no of holidays for the given date range. If an employee has
worked any overtime hours the admin should be able to enter that also when
calculating the Base pay value.
11
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
All the calculated No-pay-value, Base-pay-value and Gross pay value should record
in the database under each employee for each month. This component should
generate reports such as monthly salary report for an employee, overall salary
summary for couple of months for an employee, No-pay-value, base-pay-value, and
gross pay value of all the employees for a given month range.
3. Settings Component
This component should allow the admin to change parameter values such as
12
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Activity 3
Write the complete pseudocode for the salary component of the above system (report
generation is not needed). Use the visual studio IDE (using C#.net) to implement the above
three components. Ideally there should be three separate classes for the above three
components and the developer can decide the methods which need to include in those
classes. Design the suitable database structure for keeping the data of the above system.
Analyze the features of an Integrated Development Environment (IDE) and explain how
those features help in application development. Evaluate the use of the Visual StudioIDE
for your application development contrasted with not using an IDE.
Activity 4
2.1 Design and build a small GUI system for the above scenario and it should be a complete
functional system with all the functions which has described in the above scenario with the
database structure which has designed in activity 3.
2.2 Examine debugging process and the features available in Visual studio IDE for debugging your
code more easily. Evaluate how you used the debugging process to develop more secure,
robust application with examples.
2.3 Explain and 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.
13
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Grading Rubric
14
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
15
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Acknowledgment
First of all, I would like to thank Our batch coordinators for guiding us through the lessons. And also, I
thank ESOFT Metro Campus for this valuable opportunity.
Mohamed Sabrin
16
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Contents
Acknowledgement…………………………………………………………………………...14
1.1 Define what an algorithm is and outline the characteristics of a good algorithm.
Develop algorithms for linear search and binary search using Pseudo
code………………..19 1.2 Describe the steps involved in the process of writing and
executing a program. Take an array of 10 or more elements and dry run the above two
algorithms. Show the outputs at
the end of each iteration and the final output……………………..………………………..29
1.3 Define what Big-O notation is and explain its role in evaluating efficiencies of algorithms.
Write the Python program code for the above two algorithms and critically
evaluate their efficiencies using Big-O notation……………………………………………34
2.1 Define what is meant by a Programming Paradigm. Explain the main characteristics of
Procedural, Object oriented and Event-driven paradigms and the relationships among
them…………………………………………………………………………………………39
2.2 Write small snippets of code as example for the above three programming paradigms
using a suitable programming language(s)…………………………………………………42
2.3 Critically evaluate the code samples that you have above in relation to their structure
and the unique characteristics………………………………………………………………47
In the second example this codded example for Object oriented programming paradigm using
the programming language C#. The Object-oriented programming is based on the concept
of "objects"…………………………………………………………………………………50
Activity 03………………………………………………………………………………….53
3.1 Design suable algorithms for vehicle tariff calculation for rents and hires. Ideally 3
functions should be developed for this purpose as follows………………………….....53 3.2
Implement the above algorithms using visual studio IDE (using C#.net) and design the
suitable database structure for keeping the tariffs for vehicle types and different packages
which must be used for implementing the above functions……………………..56 3.3
Analyze the features of an Integrated Development Environment (IDE) and explain how
17
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
those features help in application development. Evaluate the use of the Visual Studio IDE
for your application development contrasted with not using an IDE…………………72
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 for Ayubo drive. This includes the
completing the database design started in 3.2 and implementing one or more GUIs for
vehicle, vehicle type, and package add/edit/delete functions. It essentially requires an
interface for hire calculation and recording function described above. Generating customer
reports and customer invoices are not required for this course work………………………
77 4.2 What is debugging an application? Explain 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………………………………..110
4.3 Explain 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…...115
List of references…………………………………………………………………………...119
Figure of contents
Figure 1 How Linear search works…………………………………………………………25
Figure 2 How Binary search works…………………………………………………………27
Figure 3 Output for the C++ code…………………………………………………………..43
Figure 4 Output for the C# code…………………………………………………………….45
Figure 5 Output for the python paradigm…………………………………………………...46
Figure 6 Flowchart for rent calculation……………………………………………………..53
Figure 7 Flow chart for day tour hire calculation…………………………………………...54
Figure 8 Flow chart for long tour hire calculation………………………………………….55
Figure 9 output for rent calculation code….………………………………………………..57
Figure 10 Output for day tour calculation…………………………………………………..59
Figure 11 Output for long tour calculation…………………………………………………61
Figure 12 Ayubo Drive Database Structure………………………………………………62
Figure 13 insert values for package registration……………………………………………62
Figure 14 Before update…………………………………………………………………….64
18
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
19
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
20
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Activity 01
1.1 Define what an algorithm is and outline the characteristics of a good algorithm.
Develop algorithms for linear search and binary search using Pseudo code.
The algorithm is a process or formula for solving the problems. It is based on conducting a
sequence of specified actions. It is commonly used for data processing, calculation, and
other related computer and mathematical operations. In computer programming, by using
algorithms we can create functions. Those functions can serve as small programs that can be
mention by a larger program.
When we think of an algorithm is in the most common way it is not just in regards to
computer algorithms are in everywhere. Such as a recipe for making a food is an algorithm.
The technique we use to solve the addition or long division problems are an algorithm and
the process of folding a shirt or a pair of pants are an also algorithm. Even our morning
routine could be considered an algorithm (Techtarget.com, 2022).
An example for algorithm to calculate its average and then display the result.
Begin
Input a,b,c,d,e
Total = a+b+c+d+e
Average = total/5
Print average
End
21
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Flow chart
We can use simple symbols and arrows to describe relationships in a flow chart. In a
flowchart, the Start and end of programs are represented by an oval shape. An input/output
is represented by the parallelogram, An a process is represented by a rectangle shape, a
decision is represented by a diamond shape and the flow line is represented by an arrow
(Techtarget.com, 2022).Flow chart Symbols
Start/End
Process
Input /Output
22
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Decision
Flow line
Pseudocode
The pseudocode is an informal method of a programming that is does not required any strict
programming language syntax or fundamental technology. It can be used for creating an
outline or a rough draft of program. Pseudocode is sometimes used as a detailed step by
step in the process of developing a program. The pseudocode is allows to designers or lead
the programmers to show the design in a great details and also provides programmers a
detailed design for the next procedure of writing code in a specific programming language.
(economictimes.indiatimes.com, 2022).
23
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
start
marks = 45
Yes
if marks > =75 Grade = <Distinction=
Yes
if marks > =55 Grade = <Credit=
Yes
if marks > =35 Grade = <Pass=
Grade = <Fail=
Print Grade
End
Begin
Marks= 45
If Marks > = 75 Then
24
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Finiteness-: an algorithm is should be terminate without any number of steps and each step
must be finish in finite amount of time.
Definiteness-: the procedure of algorithm is should be clearly and exactly define and there
should not be any uncertainty.
Input-: an algorithm is must have zero or more but must be limitation number of inputs.
Output -: an algorithm should have one or more defined outputs and should match the
desired output.
Effectiveness-: an algorithm is should be effective. Effective means that procedure should be
mention as most important and should be executing in limitation time
Uniqueness-: each step taken in the algorithm should give a definite result. The results
should not change by any means.
Feasibility-: the algorithm should be possible and practicable in real life. It should not be
abstract or imaginary.
25
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Precision-: a good algorithm must have some outlined steps. The steps should be exact
enough and not variable (Owlgen.com, 2022).
Liner search
The linear search is a very simple and basic search algorithm. In Linear search we search an
element or value in a provide array by traversing the array from the starting until the desired
element or value is found (studytonight.com, 2022).
26
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Example:-
27
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
BEGIN LINEARSAERCH
lastIndex = ARRAYLENGTH(array) `
FoundIt = false
Index = 1
Read Find
FoundIt = true
ENDIF
index= Index + 1
ENDWHILE
ELSE
ENDIF
END LINEARSAERCH
Binary search
Rather than searching individual elements sequentially a sorted array can be more
efficiently searched using binary search. We compare the middle element and continue the
search on upper or lower half or the array based on the value is greater or smaller than the
middle. This continues until the value is found at the middle or until we confirm the value is
not present (Geeksforgeeks, 2022).
28
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Example -:
29
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
A program is a set of step-by-step instructions that directs the computer to do the tasks we
want it to do and produce the results we want (homepage.cs.uri.edu, 2022)
The most important steps in writing and executing a computer program would be like this
30
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
31
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Dry run
The dry run is can be test or check performed on a program. Run to check the performance
or stability of a particular program before it is made available (computerhope.com, 2022).
The dry run conducted by using a trace table. Trace table is track the values of variables as
they change throughout the program. This is useful when a program is not producing the
desired result (101computing.com, 2022)
32
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
2 9 False
3 12 False
4 33 True
[2,5,9,12,33,47,24,50,67,3] 50 0 2 False Found
1 5 False
2 9 False
3 12 False
4 33 False
5 47 False
6 24 False
33
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
7 50 True
2 9 False
3 12 False
4 33 False
5 47 False
6 24 False
7 50 False
8 67 False
9 3 False
Dry run for binary search
Array= [2,9,14,22,38,29,46,58,66,90]
[2,9,14,22,38,29,46,58,66,90] 14 0 9 4
0 3 1
2 3 2 Found
34
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
[2,9,14,22,38,29,46,58,66,90] 29 0 5 Found
[2,9,14,22,38,39,46,58,66,90] 90 0 09 5
8 09 09
8 09 9
09 09 09 Found
35
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
1.3 Define what Big-O notation is and explain its role in evaluating efficiencies
of algorithms. Write the Python program code for the above two algorithms
and critically evaluate their efficiencies using Big-O notation.
O(1) Constant
O(N) Linear
O(N2) Quadratic
O(LogN) Logarithmic
Constant O(1)
This is called constant. O(1) is describes 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).
36
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Linear O(N)
This is called has linear O(N) is a describes the algorithm is which performance will be
raise 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 amount of elements in the array
(robbell.net, 2009).
Quadratic O(N²)
This is call quadratic. The running time of the algorithm -. So it’s N multiplied by N. An 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(LogN)
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).
37
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
print(arr)
# searching element
38
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
In the python code a While search is being found which needs to be run until the define
condition is met. Once the condition is met the code starts to execute the next set of
instructions. Once it is done a if condition is being given as to check whether the
predefined condition is met. According to this it is seen that the time consumed depend
on the list of elements available. But in Binary Search, the elements are divided into 2,
39
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
thus it will reduce the time. There for as the notation for efficiency it could be stated as
O(Log n).
Activity 02
The programming paradigm is the way of a thinking about or approaching the problems
and also programming paradigm is an important style of a build the structure and
elements of the program. The styles and capabilities of the programming languages are
describe by their paradigms (Quora.com, 2022).
Procedural
Procedural programming is a list of instructions to telling a Computer Step-by- Step. In an
order of how to performance the first Code to the Second and So forth which may
contain loops (Prezi.com, 2011).
The main characteristics of procedural paradigm
The first most important paradigm is puts much importance on Things to be done. And
also the large problems are divided into a smaller programs known as a functions. The
most of the functions are share global data and data move openly around on the system
from function to functions. The functions are transfer data from one form to another
form. Also top down approach in the program designing. And also finally appropriate and
effective techniques are unavailable to secure data of a function from others
(onlineclassnotes.com, 2013).
Object oriented
Object orientated is the programmer examines the problem in an old fashioned way. It
does not write and algorithm but instead breaks down the problem of elements into
classes the process used to create an object is called instantiation (Prezi.com, 2011).
40
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
The most important and the first object oriented paradigm is encapsulation an
encapsulation is a capturing data and keeping it safely and securely from the outside
interfaces. And also inheritance is the process by which a class can be derived from a
base class with all the features of base class and some of its own. This increases code
reusability. The variety is the ability to the exist in various forms. For example an
operator can be over loaded so as to the add a two integer numbers and add two floats.
And also finally abstraction is the ability to the represent the data at a very conceptual
level without any details. They are characteristics of the object oriented paradigm
(careerride.com, 2016).
Event-driven paradigms
Event driven paradigm which is determined by events or user actions. An example we
can get clicking on a mouse. It can only be used using a graphical user interface. Which is
one of its main features. It can interact with any hardware that is attached to a computer
and it is not a Complex program to use. A program can easily be developed and all of the
properties used in the program are all independent so they can save altogether saving
the programmer time and effort saving them separately (Prezi.com, 2011).
41
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Relationship among Procedural, Event Driven and Object Oriented Programming. The
procedural paradigm is we looking at the process needed to solve a problem. There a
definite process and the flow of the data is highly predictable.
Also the object oriented is we observing at the actors and the creating a objects to
represent those actors. For an example and an emulator for a movie line queue. We have
got people the line and a ticket booth. So we build objects around those actors.
The event driven is a used when we have impulsive the moments that need to be taken
care of. We can add some event handlers to the both procedural and the object oriented
paradigms. So as a standalone, it’s not a complete paradigm. For the instance the
procedural report writer a could have an a event to handle out of the papers or the
object oriented program could be have an a event to the handle. when lightning hits a
person standing line for the movie. Events are more a feature to add to other stuff.
2.2 Write small snippets of code as example for the above three programming
paradigms using a suitable programming language(s).
#include "stdafx.h"
#include <iostream>
42
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
{
float n1, n2, n3;
43
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
A simple calculator is created using C# console applications where the sum of the two
numbers entered by the user is displayed. And the difference between the two numbers
entered will be displayed below.
namespace consoleApplication5
{
public class oopprogram
{
public class simplecalculator
{
public double add(double number1, double number2)
{
return number1 + number2;
}
public double minus(double number1, double number2)
{
return number1 - number2;
}}
static void Main(string[] args)
{
Console.Write("Type your first Number: "); double x = double.Parse(Console.ReadLine());
Console.Write("Type your second Number: "); double y
44
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
}
Output for the above C# code
45
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
46
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
The uniqueness of this language is that it uses shift operators(<<) for its coding. After the
steps are instructed to the computer it needs to be instructed to the computer the to
pause the program in order to see the output, if system(<pause=) is not included the user
will not be able to see the output.
47
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
using System;
using System.Collections.Generic;
using System.Linq; using
System.Text; using
System.Threading.Tasks;
namespace consoleApplication5
{
public class oopprogram
{
public class simplecalculator
{
public double add(double number1, double number2)
{
return number1 + number2;
}
48
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
}
}
}
In the second example this codded example for Object oriented programming paradigm
using the programming language C#. The Object-oriented programming is based on the
concept of "objects". In this object-oriented programs, we can see that the code is well
structured, and
the programmer makes it easy. However there are two main classes <oopprogram> and
<simplecalculate> and we have the <main> method under the <oopprogram> class. The
<total> function under the <simplecalculate> class. The one of the unique features of
objectoriented programming is that it has classes and objects. In this code almost all
have public access specifiers.
The Classes, Object and Methods
Classes
Object
Method
49
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
In our last example python language is being used to code the event driven program. I
used mouse click event on this program. An a mouse click event is for an each widget it’s
possible to bind python functions and methods to an event. If the defined event occurs
in the widget, the handler function is called with event object describing the event. Every
time we move the mouse in the message widget, the position of the mouse pointer will
be printed (python-course.eu, 2022).
Here the coded program actually uses python turtle, which is used in drawings in python.
A mouse event is a bit different from a keypress event because its handler needs two
parameters to receive x, y coordinate information telling us where the mouse was when
the event occurred.
50
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
This turtle method allows us to move the turtle to an absolute coordinate position. I
named the handler function h1 it like this.
So what this program does is move the turtle and draw a line to wherever the mouse is
clicked and this program is very is to use. An a mouse click event is very useful and
import event.
Activity 03
3.1 Design suable algorithms for vehicle tariff calculation for rents and hires. Ideally 3
functions should be developed for this purpose as follows:
51
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Rent calculation
52
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
53
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
54
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
calculation code
if (numberDays < 7)
{
charges = day * 2000; //2000 per
Day charges
}
if (numberDays >= 7 || numberDays < 30)
{
charges = week * 8500 + day * 2000; //8500 per
week charges
}
if (numberDays >= 30)
{
charges = month * 32000 + week * 8500 + day * 2000; //32000 per
month charges
}
55
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
if (checkBox1.Checked)
{
Check = 1500 * numberDays; // per
Driver Charge } if (checkBox2.Checked)
{
Check = 0;
}
56
57
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
58
driverovernightcharge = int.Parse(textBox7.Text); if
(numberDay > 2)
{
overnight = (numberDay - 2) * 500 + parking+ driverovernightcharge;
}
customername = textBox12.Text; customercontactno =
int.Parse(textBox13.Text); packagetype = textBox9.Text;
vehicaletype =
comboBox1.Text; vehicleno = textBox1.Text;
maximumkm = int.Parse(textBox3.Text);
pricepercharge = int.Parse(textBox8.Text);
driverovernightcharge = int.Parse(textBox7.Text);
if (numberDay > 2)
{
driverovernightcharge = (numberDay - 2) * 250;
}
BHC = maximumkm * pricepercharge + driverovernightcharge;
textBox5.Text = BHC.ToString(); double total = overnight + EKM + BHC;
textBox2.Text = EKM.ToString(); textBox6.Text = overnight.ToString();
textBox4.Text = total.ToString();
}
59
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Database structure for keeping the tariffs for vehicle types and different packages.
The system is supported by two databases. Where login database stores the login
information and the Login activity log. The vehicle tariff and packages details are two
tables have been created under this database. While the database stores the vehicle
details and package details respectively and it is able to easily insert, update and delete
the data within the database.
60
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Figure 13 insert values for package registration Message box for package registration
61
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
}
Update value for package registration
Before update package price
62
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
63
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Before delete
After delete
64
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
65
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
66
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
67
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
68
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
3.3 Analyze the features of an Integrated Development Environment (IDE) and explain
how those features help in application development. Evaluate the use of the Visual
Studio IDE for your application development contrasted with not using an IDE.
69
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Debugger
70
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
The debugger is helps to observe the run time behavior of the program and find the
problems. The debugger is works with all the Visual Studio programming languages and
there are associated libraries. The debugger we can break the execution of the program
to examine the all code ,examine and edit the all variables, view the registers, see
entirely the instructions created from the source code and view the memory space used
by the application (msdn.microsoft.com, 2015).
Compiler
This compiler tool is help to transforms the source code written in a human readable and
writable language into the form executable by the computer.
The source code editor is the text editor program it’s help to designed a specifically for
the editing source code of a computer programs. It’s may be standalone application or it
may be built into an integrated development environment (IDE) or web browser.
And also the source code editors are to a fundamental programming tool as a
fundamental job of the programmers is to write and edit the source code
The debugger is works with all visual Studio program. In the Visual Studio program
context when the debug the application it usually mean that we are running the
application with debugger attached so that is in debugger mode. The errors are show in
the error list when the application is being debugged. If Integrated development system
(IDE) is not using in visual studio errors could not be identify until the program is entire
run.
71
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
The source code editor is the text editor program it’s help to designed a specifically for
the editing source code of a computer programs. In the role of the source code editor
Visual Studio Code is allows to changing the code page in which the active document is
saved, the character that identifies line break and the programming language of the
active document. Once the program is being run it is also able to edit the source code
while on run mode in order to adjust any mistakes. If an IDE has not been used the entire
code need to be typed manually and there is a higher percentage to make errors.
72
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Toolbox
The visual studio provide. Toolbox displays icons for controls and other items that we can
add to Visual Studio projects. We can dock the Toolbox and we can pin it open or set it to
Auto Hide. Toolbox icons can be dragged to a design view or pasted in a code editor. Also
action adds the fundamental code to create an instance of the Toolbox item in the active
project file. If IDE has not been used for this the traditional text editors does not contains
these kind of tools thus does not assist it creating Graphical User Interfaces.
Visual Studio contains a built in compact Structured Query Language version where
database can be created within Visual Studio without creating a database using a
database software and exporting it to Visual Studio. This makes programmer’s workload
less and the complexity of the program reduces and it is the necessity of most of the
programs to contain a database in order to records details of the functions of the
program.
If a text editor has been used for this without an IDE this task might be much tougher as
it needs longer time and knowledge in exporting a Database.
73
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
Compiler
Visual Studio contains an inbuilt compiler, which converts the source code into machine
code automatically, and it saves the time of the programmer. If the IDE does not contain
the compile in built source, code has converted to the machine code separately
otherwise, the machine would not understand the given instructions.
Activity 04
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 for Ayubo drive. This
includes the completing the database design started in 3.2 and implementing one or
more GUIs for vehicle, vehicle type, and package add/edit/delete functions. It
essentially requires an interface for hire calculation and recording function described
above. Generating customer reports and customer invoices are not required for this
course work.
74
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
A login page designed using role base facility. The logins are available within the
database Login which is created to store the user name, password and user type. All
three fields should tally in order for a particular user to login.
Two users are included and they are Admin and Receptionist.
Login form exit button
75
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
using System;
using System.Collections.Generic;
using System.ComponentModel; using
System.Data; using System.Drawing;
using
System.Linq; using
System.Text; using
System.Threading.Tasks; using
System.Windows.Forms; using System.Data.SqlClient;
namespace Ayubo_Leisure
{
public partial class Form1 : Form
{
SqlConnection con = new SqlConnection(@"Data
Source=DESKTOPLVB5OI9\SQLEXPRESS;Initial Catalog=Login;Integrated
Security=True"); public Form1()
{
InitializeComponent();
timer1.Start();
}
private void Form1_Load(object sender, EventArgs e)
{
textBox1.Text = Properties.Settings.Default.username;
}
private void button1_Click(object sender, EventArgs e)
{
Properties.Settings.Default.username = textBox1.Text;
Properties.Settings.Default.Save();
76
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|42842578
sda.Fill(dt);
string cmbItemValue = comboBox1.SelectedItem.ToString(); if
(dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i]["usertype"].ToString() == cmbItemValue)
{
MessageBox.Show("You are successfuly login as" + dt.Rows[i]
[2]);
if (comboBox1.SelectedIndex == 0)
{
77
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
this.Hide();
Form8 fr = new Form8(); fr.ShowDialog();
}
else {
this.Hide();
fr.ShowDialog();
}
} else
{
MessageBox.Show("Incorrect username and password!");
}}
private void button2_Click(object sender, EventArgs e)
{
comboBox1.Text = string.Empty; textBox2.Text =
string.Empty;
}
private void button3_Click(object sender, EventArgs e)
{ this.Dispose();
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
this.textBox2.PasswordChar =
this.checkBox1.Checked ? char.MinValue : '●';
}
private void timer1_Tick(object sender, EventArgs e) {
78
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{ this.Dispose();
}
}
}
Login as a admin
79
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
If I login as admin it display main menu like this. There are three functions available in
main menu.
80
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
{
public partial class Form8 : Form
{ public
Form8()
{
InitializeComponent();
}
}
private void button1_Click(object sender, EventArgs e)
{ this.Hide();
Form3 fr = new Form3(); fr.ShowDialog();
}
private void button5_Click(object sender, EventArgs e)
{ this.Hide(); Form6
fr = new Form6();
fr.ShowDialog();
}
private void button2_Click(object sender, EventArgs e)
{ this.Hide();
Form1 fr = new Form1(); fr.ShowDialog();
}
private void button3_Click(object sender, EventArgs e)
{ this.Hide();
Form9 fr = new Form9(); fr.ShowDialog();
81
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
}
private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
{ this.Hide();
Form1 fr = new Form1(); fr.ShowDialog();
}
}
}
Vehicle registration
82
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
Before update
83
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
84
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
85
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
86
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
87
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
88
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
89
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
90
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
If I login as receptionist it display main menu like this. There are three functions available
in main menu and they are.
91
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
System.ComponentModel; using
System.Data; using
System.Drawing; using
System.Linq; using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Ayubo_Leisure
{
public partial class Form2 : Form
{ public
Form2()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{}
private void button2_Click(object sender, EventArgs e)
{ this.Hide(); Form4 fr =
new Form4();
fr.ShowDialog();
}
private void button3_Click(object sender, EventArgs e)
{ this.Hide();
Form5 fr = new Form5(); fr.ShowDialog();
}
private void button4_Click(object sender, EventArgs e)
{ this.Hide();
Form7 fr = new Form7(); fr.ShowDialog();
}
private void button5_Click(object sender, EventArgs e)
{
92
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
}
private void button1_Click_1(object sender, EventArgs e)
{ this.Hide();
Form1 fr = new Form1(); fr.ShowDialog();
}
93
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
con.Close(); data_view();
MessageBox.Show("Upadted Successfully!");
}
Delete values
94
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
for delete
95
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
96
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
for update
cmd.ExecuteNonQuery();
con.Close(); data_view();
MessageBox.Show("Upadted Successfully!");
97
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
98
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
99
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
for insert
100
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
101
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
102
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
103
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
The debugging application is the routine the process of a locating and the removing
computer program bugs, errors and abnormalities. Which is methodically handled by the
software programmers through debugging tools and also debugging checks detects and
corrects errors or a bugs to the allow proper program operation according to the set of
specifications and also the debugging is also known as debug.
And also developing the software programs are undergo heavy
testing ,updating ,troubleshooting and the maintenance and also usually the software
include errors and the bugs. Which are the routinely removed. In this debugging process
complete software programs are regularly compiled and the executed to the identify and
rectify the issues. The large software programs which contain millions of the source code
lines are divided into the small components. For an efficiency each component is the
debugged separately at first followed by the program as a whole
(economictimes.indiatimes.com, 2018).
The features available in integrated development environment for debugging Debugging
menu
The top level debug menu has the most common debug commands
Break point
The break point is an intentional stop marked in the code of the application where
execution pauses for the debugging. This is allows the programmer to inspect the
internal state of the application at that point.
104
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
Run to click
The run to click is a related to setting a temporary breakpoint and also run to click is a
near for getting the around quickly within a visible the region of app code.
Examine an exception
The exception is an indication of an error state that is occurs to while a program is being
executed. We can be should provide the handlers that respond to the most important
exceptions.
105
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
Configuration manager have been used to choose the method of debugging of with ion
the various phases in the process. The active solution platform is not and the
configuration mode can be choose from debug and release.
Evaluate how you used the debugging process to develop more secure, robust
application with examples.
106
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
faults and errors in my application code helping me to correct that faults and errors.
However, almost many of my applications developed literally are so huge in context of
code and complexity. The application is created in this valuation is an example of it in a
generally main way.
Creating these types of applications confidently basically had generally lot of fault and
errors in it, but however the debugging features are in the Visual studio IDE usually has
done a absolutely great role in the resolving them one of the basically main ways I
mostly got very out of fault and errors was, when the Visual studio IDE identifies faults
and present the errors with its place.so it very easy and useful to solve problems.
However particularly many logical errors will be automatically identified by the visual
studio IDE. But the Breakpoints feature for all intents and purposes has actually helped
me in identifying those conceptual errors in my code. The figure shows the way I used
the breakpoints feature to debug my application, which specifically is quite significant.
However, when debugging the application it is possible to identify the errors and faults,
which have been created in the system. When these errors are identified beforehand,
therefore it is possible for use to make sol.
Using the process of debugging it was able to identify the errors with in they stem easier
to identify the errors before hand. In case we have missed to declare a variable it will be
shown from the debug and will assist us in redirecting and understanding as what the
error is.
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.
107
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
Figure 55 Exception
4.3 Explain 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.
One of most essential factors in software system is the consisting of the coding standard.
This is because of it positively affecting the quality of the system, during the time the use
of software system, we need to ensure that the guideline do not deny each other. The
source code that use the stand should be also be harmony with the standard. The
completed source code should introduce as if a single developer has written the code. .
Increase efficiency
Reduce complicity
Minimize the risk of project failure
108
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
In developing this application, I have used of several coding standards and I have used a
good file structure, use of comments, indentation patterns, and variable declaration.
However, these coding standards are very useful and important to my Ayubo drive
application.
Use of comments
When making databases the renaming of the tables has been done according to the
name of the form.
109
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
Variable declaration
The variables are declared at the beginning in each if the code in order to specify the
type of the data type that can be entered I the particular field. All the varaibles are to be
declared were used with the full name as it would be very easy for me to understand.
Indentation patterns
110
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
The coding standers in a team help to minimize the risk of project failure and reduce
complicity. Another important benefit for a team is to identify the ongoing process of
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 standards are followed it is to make changes to the code
whenever needed. Actually, coding standards are very important and useful for a team.
Coding standard for individual
111
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
Coding standard is very highly important when we work as individuals. 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 a 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.
112
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
113
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
`
lOMoARcPSD|42842578lOMoARcPSD|16719580
https://www.veracode.com/security/integrated-development-environments. [Accessed
31 July 2022].
msdn.microsoft.com.2022.debugger. [ONLINE]Availableat
https://msdn.microsoft.com/en-us/library/sc65sadd.aspx. [Accessed 31 July 2022].
114
T.M..Sabrin/COL00143342 Unit-01 Programming Assignment No.01
Downloaded by Mohamed Muthaiyb ([email protected])
lOMoARcPSD|16719580 lOMoARcPSD|42842578
`
Gantt chart
Downloaded by Mohamed Muthaiyb ([email protected])