M.M Rishad - Programming
M.M Rishad - Programming
Mr. Tharaka
Assessor Internal Verifier
Unit(s)
Assignment title
M. M. Mohammed Rishad
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.
P a g e 1 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Confirm action completed
Remedial action taken
Give details:
Programme Leader
signature (if required) Date
P a g e 2 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Higher Nationals - Summative Assignment Feedback Form
Student Name/ID M.M.Mohammed Rishad
Unit Title
Assignment Number Assessor Mr.Tharaka
03/10/2022 Date Received 1st
Submission Date submission
Date Received 2nd
Re-submission Date submission
Assessor Feedback:
LO1. Define basic algorithms to carry out an operation and outline the process of programming an application.
LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an analysis of a suita
Integrated Development Environment (IDE).
LO4. Determine the debugging process and explain the importance of a coding standard.
Pass, Merit & Distinction Descripts P4 P5 M4 D4
* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place and
grades decisions have been agreed at the assessment board.
Assignment Feedback
Formative Feedback: Assessor to Student
P a g e 3 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Action Plan
Summative feedback
Assessor Date
signature
[email protected] 03/10/2022
Student om Date
signature
General Guidelines
1. A Cover page or title page – You should always attach a title page to your assignment. Use
previous page as your cover sheet and make sure all the details are accurately filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.
1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
P a g e 5 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
4. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.
5. Use word processing application spell check and grammar check function to help editing
your assignment.
Important Points:
1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your
work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as illness,
you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.
9. If you use other people’s work or ideas in your assignment, reference them properly using
HARVARD referencing system to avoid plagiarism. You have to provide both in-text citation
and a reference list.
10. If you are proven to be guilty of plagiarism or any academic misconduct, your grade could be
reduced to A REFERRAL or at worst you could be expelled from the course
Student Declaration
I hereby, declare that I know what plagiarism entails, namely to use another’s work and to present
it as my own without attributing the sources in the correct way. I further understand what it means
to copy another’s work.
P a g e 6 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
6. I understand that my assignment will not be considered as submitted if this document is not
attached to the attached.
[email protected] 03/10/2022
Student’s Signature: Date:
(Provide E-mail ID) (Provide Submission Date)
P a g e 7 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number M.M.Mohammed Rishad
Issue Date
Submission Date
Submission Format
1. Written Report
This submission is in the form of an individual written report. This should be written in a concise, formal
business style using single spacing and font size 12. You are required to make use of headings, paragraphs
and subsections as appropriate, and all work must be supported with research and referenced using the
Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. (The
recommended word count is 1,500–2,000 words for the report excluding annexures)
3. Presentation
With the submitted system student should do a presentation to demonstrate the system that was
developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint slides while doing the
presentation, but live demonstration of the system is required. Evaluator will also check the ability to
modify and debug the system using the IDE.
LO1. Define basic algorithms to carry out an operation and outline the process of
programming an application.
P a g e 8 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
LO2. Explain the characteristics of procedural, object-orientated and event-driven
programming, conduct an analysis of a suitable Integrated Development
Environment (IDE).
LO4. Determine the debugging process and explain the importance of a coding
standard
P a g e 9 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
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.
F n = F n-1 + F n-2
Define what an algorithm is and outline the characteristics of a good algorithm. Write the
algorithms to display the Fibonacci series and the factorial value for a given number using
Pseudo code. Determine the steps involved in the process of writing and executing a
program.
Take a sample number and dry run the above two algorithms. Show the outputs at the end
of each iteration and the final output. Examine what Big-O notation is and explain its role in
evaluating efficiencies of algorithms. Write the Python program code for the above two
algorithms and critically evaluate their efficiencies using Big-O notation.
Activity 2
2.1 Explain what is meant by a Programming Paradigm and the main characteristics
of Procedural, Object oriented and Event-driven paradigms and the relationships among
them. Write small snippets of code as example for the above three programming
paradigms using a suitable programming language(s). you also need to critically
evaluate the code samples that you have given above in relation to their structure and
the unique characteristics.
Ayubo Drive is the transport arm of Ayubo Leisure (Pvt) Ltd, an emerging travel & tour
company in Sri Lanka. It owns a fleet of vehicles ranging from cars, SUVs to vans.
P a g e 10 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
The vehicles that it owns are hired or rented with or without a driver. The tariffs are based on
the vehicle type. Some of the vehicle types that it operates are, small car, sedan car, SVUs, Jeep
(WD), 7-seater van and Commuter van. New vehicle types are to be added in the future.
1. Rent (With or without driver) – For each type of vehicle rates are given per day, per week
and per month. Rate for a driver also given per day. Depending on the rent period the total
rent amount needs to be calculated. For example: if a vehicle is rented for 10 days with a
driver, total amount to be calculated as follows:
2. Hire (with driver only) – These are based on packages such as airport drop, airport pickup,
100km per day package, 200km per day package etc. Standard rates are defined for a
package type of a vehicle typeif that is applicable for that type of vehicle.For each package
maximum km limit and maximum number of hours arealso defined. Extra km rate is also
defined which is applicable if they run beyond the allocated km limit for the tour. For day
tours if they exceed max hour limit,a waiting charge is applicable for extra hours. Driver
overnight rate and vehicle night park rate also defined which is applicable for each night
when the vehicle is hired for 2 or more days.
Activity 3
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
P a g e 11 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
used for implementing the above functions.
Analyze the features of an Integrated Development Environment (IDE) and explain how
those features help in application development. Evaluate the use of the Visual
StudioIDE for your application development contrasted with not using an IDE.
Activity 4
2
3
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.
P a g e 12 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
P a g e 13 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Grading Rubric
P a g e 14 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
P2Give explanations of what procedural, objectorientated,
and eventdriven paradigms are; their characteristics and the
relationship between them.
P a g e 15 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
LO4 Determine the debugging process and explain
the importance of a coding standard
P a g e 16 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
P a g e 17 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Acknowledgement
I extend my sincere and heartfelt thanks to the module lecturer Mr Tharaka for providing me
the right ambiance for carrying out this work, innumerable acts of timely advice;
encouragement and I sincerely express my gratitude to him.
Last but not the least, I thank all others, and especially my classmates who in one way or
another helped me in the successful completion of this work.
I hope contributors will recognize that I have done my best to reflect the variety of views and
the wealth of information, which were so generously provided, to me. I takes full and sole
responsibility for the content of the report and for any errors or misrepresentations of fact or
opinion it may contain.
Regards,
Rishad.
P a g e 18 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Table of Contents
Acknowledgement....................................................................................................................18
Activity 01................................................................................................................................20
1. Define what an algorithm is..............................................................................................20
2.Outline the characteristics of a good algorithm.....................................................................20
3.Algorithms to display the Fibonacci series and the factorial value for a given number using
Pseudo code..............................................................................................................................21
4.Determine the steps involved in the process of writing and executing a program................22
5.Take a sample number and dry run the above two algorithms.Show the outputs at the end of
each iteration and the final output............................................................................................26
6.Examine what Big-O notation is and explain its role in evaluating efficiencies of
algorithms.................................................................................................................................27
Activity 2..................................................................................................................................31
2.1 What is Programming Paradigm........................................................................................31
2.2 The main characteristics of Procedural, Object oriented and Event-driven paradigms and
the relationships among them...................................................................................................31
Activity 3..................................................................................................................................38
Write suitable algorithms for vehicle tariffs calculation for rents and hires. Ideally 3 functions
should be developed for this purpose as above........................................................................38
3.2Use 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.....................................................42
3.3Analyze the features of an Integrated Development Environment (IDE) and explain how
those features help in application development.......................................................................45
3.4Evaluate the use of the Visual StudioIDE for your application development contrasted
with not using an IDE..............................................................................................................46
Activity 4..................................................................................................................................48
4.1.............................................................................................................................................48
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......................................48
4.2Explain 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.................................................................................59
4.3Outline 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.........60
P a g e 19 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Activity 01
Similarly, not all written computer instructions are algorithms. Some instructions must have
the following features in order to be classified as an algorithm:
P a g e 20 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Algorithm Characteristics:
3.Algorithms to display the Fibonacci series and the factorial value for a given number
using Pseudo code.
Step 1: Start
Step 2: Read number from User
Step 3: Initialize Variable a=0, b=1, i=1
Step 4: Display a, b
Step 5: While i<=n-2
C=a +b
Display c
a=c
i= i +1
END While
Step 7: Stop
P a g e 21 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Read number
Fact = 1, i = 1
WHILE i<=number
Fact=Fact*i i=i+1
ENDWHILE
WRITE Fact
Stop
4.Determine the steps involved in the process of writing and executing a program.
Developing software has steps that are similar to any problem-solving activity. There are
five important components to the programming process:
Assume that you are contacted because your services as a programmer are needed. To
evaluate the issue, you meet with the customers' users, or you meet with a systems analyst
who establishes the project. Finding out what you know (based on the facts provided as
input) and what you wish to obtain is specifically required for the task of characterizing the
P a g e 22 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
problem (output-the result). You finally produce a written agreement that specifies, among
other things, the kind of input, processing, and output needed. This is not a simple job.
The creation of a flowchart and the writing of pseudocode, or perhaps even both, are two
popular methods of problem-solving planning. A flowchart is essentially a visual depiction
of a problem-solving process in steps. It comprises of boxes and other symbols that indicate
activities together with arrows that show the program's direction. It is a road plan for what
and how your program will accomplish its goals. A common set of flowchart symbols has
been created by the American National Standards Institute (ANSI). Figure 1 depicts the
symbols and possible uses for them in a straightforward flowchart of a typical daily act—
preparing a letter for sending.
Pseudocode is a nonstandard language that resembles English and allows you to express
your answer with greater accuracy than you can in plain English, but with less precision
than is necessary when using a formal programming language. Pseudocode enables you to
concentrate on the logic of the program without having to worry about the specific syntax of
a particular programming language just yet. Pseudocode, however, cannot be run on a
computer. When we concentrate on language examples later in this chapter, we shall show
these.
3. Computer programming
The next stage for a programmer is to write the program, which entails expressing their
answer in a programming language. From the flowchart, pseudocode, or another tool, you
will transform the logic into a programming language. As we've already mentioned, a
programming language is a collection of rules that gives the computer a method to be told
what actions to do. There are several programming languages; some examples are BASIC,
COBOL, Pascal, FORTRAN, and C. Working with one or more of these may come up.
Later on in this chapter, we will go into further depth about the various languages.
P a g e 23 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Programming languages are far more exact even though they function somewhat
grammatically like the English language. You must strictly adhere to the language's rules—
its syntax—for your program to function. Of course, speaking the language fluently does
not ensure that your software will function, just as speaking English well does not
automatically imply that you are knowledgeable in the subject matter. The crucial thing to
remember is that using the language correctly comes first. Then, using a terminal or
personal computer, you must enter in your coded program in a way that the machine can
comprehend.
Another point: To generate a file that contains the program, programmers typically use a
text editor, which is somewhat akin to a word processing tool. But if you're just starting off,
you should probably write your computer code out first.
A well-designed software can supposedly be written right the first time, according to some
experts. In fact, they claim that there are mathematical techniques to demonstrate the
accuracy of a program. The majority of programmers, however, are accustomed to the
thought that their freshly built programs undoubtedly have a few defects because the world's
flaws still exist. This initially seems disheartening because programmers are often precise,
cautious, detail-oriented, and proud of their work. Nevertheless, there are several
possibilities to incorporate errors into programs, and you will likely discover lots of them,
just like those who came before you.
You must eventually get ready to test the software on a computer after you've coded it.
These stages are included in this step:
P a g e 24 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Translating. A translator is a software that, first, verifies that the programming language was
used correctly by examining your program's syntax and providing you with all syntax-error
alerts, or diagnostics, and, second, translates your program into a language that the machine
can comprehend.
As a byproduct of the process, the translator alerts you if you've utilized the programming
language incorrectly in any manner. Syntax errors are this category of error.
Detailed error messages are produced by the translator. For instance, if you accidentally
type N=2 *(I+J)) in FORTRAN with two closing parenthesis rather than one, you will
receive a notice that reads "UNMATCHED PARENTHESES." (Error messages may use
different phrasing depending on the translation.) Compilers are most often used to translate
programs. Your software is translated at once by a compiler. Your original program,
referred to as a source module, is translated into an object module by a compiler. During the
link/load step, prewritten programs from a system library may be included, creating a load
module. The computer can then run the load module at that point.
5. Program documentation
Although it is a continuous and important process, you could be anxious to engage in more
thrilling computer-related tasks, like many programmers are. A written full explanation of
the programming cycle and particular information about the program constitutes
documentation. The cause and nature of the issue, a narrative summary of the program,
logic tools like flowcharts and pseudocode, descriptions of the data records, program
listings, and testing findings are examples of typical program documentation resources. A
crucial component of documentation is also believed to be comments within the program
itself. As they code, many programmers keep notes. Program documentation may, in a
larger sense, be a component of system documentation as a whole.
P a g e 25 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
The astute programmer keeps the program's documentation up to date as it is designed,
developed, and tested. To aid in organizing program planning and to augment human
memory, documentation is required. In order to interact with people who are interested in
the software, particularly with other programmers who could be a member of a
programming team, documentation is also essential.
Additionally, since there is a lot of turnover in the computer sector, written documentation
is required so that people who follow you may fix any flaws you overlooked or modify the
software as needed.
5.Take a sample number and dry run the above two algorithms.Show the outputs at the
end of each iteration and the final output.
P a g e 26 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
6.Examine what Big-O notation is and explain its role in evaluating efficiencies of
algorithms.
if the absolute value of f(x) is at most a positive constant multiple of g(x) for all
sufficiently large values of x. That is, f(x)=O(g(x)) if there exists a positive real number M
and a real number x0 such that
Big O notation often only gives an upper bound on the function's growth rate when
describing a function.
P a g e 27 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
7.Write the Python program code for the above two algorithms
P a g e 28 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
P a g e 29 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
8.and critically evaluate their efficiencies using Big-O notation.
To obtain the output from the first input, step number is two. To obtain the output for the
second input, step number is 3. To obtain the output from input 3, step number is 7. To obtain
the result for the input 4, step number is 8. Step number is n + 3 in order to obtain the output
for the input n. Therefore, (the running time or number of steps)n + 3 represents the code's
efficiency.
To obtain the output from the Fifth input, step number is 120. To obtain the output
for the second input, step number is O. To obtain the output from input N, step
number is n. To obtain the result for the input 4, step number is O. Step number is
O(n!) in order to obtain the output for the input n. Therefore, (the running time or
number of steps)O(n!) represents the code's efficiency.
P a g e 30 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Activity 2
Numerous programming languages employ paradigms, but in order to do so, they must
adhere to a plan or process. The overview of programming languages and their paradigms is
provided here.
Paradigms:
In procedural programming paradigm, one defines a program and its subprograms as a
series of steps.
In event-driven programming paradigm, one defines what will occur when a user executes
an event.
Object-oriented programming paradigm is a way of organizing code around a collection of
objects based on the principles of encapsulation, inheritance, substitution, programming to
interfaces, and so on.
Procedural, event-driven and object-oriented paradigms are used to classify programming
languages.
A procedural programming paradigm is represented as a series of steps in which a computer
programmer writes a code to perform a specific task. The first line of code is executed first,
then the second line of code, then the third, up to last line of code. Therefore, procedural
programming is a top-down approach to executing lines of codes. The most popular
P a g e 31 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
languages that use procedural paradigm are BASIC, COBOL, PASCAL and FORTRAN. In
these languages, a program comprises of steps or procedures that operate on data.
Procedural programming has many characteristics like local variables, global variables, pre-
defined functions, modularity, and parameter passing in function and procedures.
While the procedural paradigm uses steps, the event-driven paradigm approach uses events
from the user to execute functions on the data. These events could be a simple mouse click
or a combination of key-presses from the user (like in GUI based programs) or could also be
a message from other programs. Programming languages constantly listen or sense for an
event, which then calls the respective function when the event is detected. Since most of the
GUI applications depend on user actions, these GUI programming languages will have an
event-driven paradigm based programming as an essential part. The characteristics of event-
driven programming are that these are service oriented, use event handlers and triggers,
have user-interfaces and are time driven. Most popular languages specially for GUI or
visual applications that use event-driven paradigm are visual C++, Java, Visual Basic.
The object-oriented paradigm is different from both the steps based paradigm of procedural
and the trigger/event based paradigm of event-driven, in the sense that the object-oriented
paradigm is based on objects and classes and their re-use to perform a specific code-
function. So, unlike the procedural paradigm, the object-oriented paradigm uses bottom-up
approach. In the simplest form, these objects contain data in the form of fields. Programs
are divided into smaller units known as objects belonging to a class. These objects interact
with each other through functions. Most popular languages that use object-oriented
paradigm are C++, Java, Objective-C, Python. The characteristics of languages using the
object-oriented paradigms are the use of objects, classes, encapsulation, inheritance, data
abstraction, dynamic binding, message passing and polymorphism.
P a g e 32 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
2.3 Write small snippets of code as example for the above three programming paradigms
using a suitable programming language(s).
P a g e 33 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
P a g e 34 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
P a g e 35 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
P a g e 36 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
2.4 You also need to critically evaluate the code samples that you have given above in
relation to their structure and the unique characteristics.
No matter how a program is designed overall, a framework or format is always used by the
programmer. Utilizing the proper data structures and formats, well-organized software is
created.
Variable Declaration
Control structures
A control structure is a slab used in computer programming that determines the execution
direction according on the parameters or conditions given.
P a g e 37 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Sentence structure
P a g e 38 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Activity 3
Write suitable algorithms for vehicle tariffs calculation for rents and hires. Ideally 3
functions should be developed for this purpose as above.
Start
Get values package_no , package type , start_km , end_km , start_time , end_time
total_hire_charge = 0 , total_hours = 0
Extra_hours = 0 , waiting_charges = 0
total_distance = 0 , extra_km = 0
calculate Total_hours = end_time - start_time
Get values package_rates , max_km , max_hour , extra_km_rates , extra_hour_rates
extra_hours = total_hours - max_hour
if (extra_hours >= 1),then
waiting charges = extra_hours*extra_hour_rates
else
waiting_charges = 0
end if
calculate total_distance = end_km - start_km
extra_km = total_distance - max_km
if (extra_km >= 1),then
extra_km_charge = extra_km*extra_km_rates
else
extratkm_charge = 0
end if
if (extra_hours >= 1 AND extrat+km >= 1),then
total_hire_charge = package_rates + waiting charges +extra_km_charge
else
if (extra_hours >=1),then
P a g e 39 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
‘total_hire charge = package_rates + extra_km_charge
else
if (extra_km >= 1),then
total_hire_charge = package_rates + extra_km_charge
else
total_hire_charge = package_rates
end if
end if
end if
stop
Start
Get values package_no , package type , start_km , end_km , start_date , end date
“
» night_parking charges = 0 , extra_km =
calculate Total_days = end_days - start_days
Get values package_rates , max_km , extra_km_rates , OverNight_cost , Night_parking
rates
if (Total_days >= 2),then
over_night_charges = Total_days * OverNight_cost
night_parking charges = Total_days * Night_parking_rates
else
//go to next line
end if
extra_kms = End_km - Start_km
if (extra_kms >= 1),then
extra_km_charges = extra_kms * Extra_km_rates
else
P a g e 40 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
J/go to next line
end if
if (Total_days >= 2 AND extra_kms >= 1),then
total_hire_charge = package_rates + over_night_charges +
night_parking charges + extra_km_charges
else
if (total_days >= 2),then
‘total_hire_charge = package_rates + over_night_charges +
night_parking_charges
else
if (extra_km >= 1,then
‘total_hire_charge = package_rates + over_night_charges +
night_parking charges
else
total_hire_charge = package_rates
end if
end if
end if
stop
Start
Get values vehicle_type , rented_date , return_date , driver_para
total_rent = 0
total_days = 0
no_of_months = 0
remaining_days = 0
no_of_weeks = 0
no_of_days = 0
Total_days = return_date - rented_date
No_of_months = total_days/30
P a g e 41 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
remaining days = total_days - (no_of_months * 30)
no_of_weeks = remaining _days/7
no_of_days = remaining days - (no_of_weeks * 7)
Get values monthly_rent , weekly rates , daily_rates , driver_cost
if driver_para = True,
total_rent =(no_pof_months*monthly_rates) + (no_of_weeks*weekly rates)
+ (no_of_days*daily rates) + (total_days*driver_cost)
else
if driver_para = False,
total_rent =(no_pof_months*monthly_rates) + (no_of_weeks*weekly_rates)
+ (no_of_days*daily rates)
end if
end if
stop
P a g e 42 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
3.2Use 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.
P a g e 43 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Long Tour Calculation Coding
P a g e 44 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
SQL Package Table Design
P a g e 45 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
3.3Analyze the features of an Integrated Development Environment (IDE) and explain
how those features help in application development.
The fundamental tools needed to create and test software are gathered in an integrated
development environment (IDE), which is a software package.
As they write, build, and test software, developers employ a variety of tools. The most
common development tools are text editors, code libraries, compilers, and test platforms. A
developer would have to choose, use, integrate, and manage each of these tools separately in
the absence of an IDE. One framework, application, or service known as an IDE combines
many of these development-related tools. Coding errors and typos can be found and reduced
thanks to the integrated toolset, which is made to make software development easier.
Others are for-profit products, while some IDEs are open source. Both standalone
applications and integrated development environments (IDEs) are available.
Common features of integrated development environments.
A code editor, a compiler or interpreter, and a debugger are typically included in an IDE and
are all accessed through a single graphical user interface (GUI). In the code editor, the user
creates and modifies source code. The compiler converts the source code into a language
that can be read and executed by a computer. The software is also tested by the debugger to
identify any problems or bugs.
Additionally, an IDE may include tools for build automation, programmable editors, object
and data modeling, unit testing, and a source code library.
The toolbar of an IDE resembles that of a word processor. The toolbar makes it easier to
organize by color, format source code, diagnose errors, and complete code automatically.
A developer or development team can manage changes to source code in a consistent way
through the interface of an IDE, compile and execute code incrementally, and execute code.
P a g e 46 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
IDEs are typically built to integrate with external version control libraries like GitHub and
Apache's Subversion.
The development of models can be supported by an IDE (MDD). An IDE is a tool that
allows developers to quickly and easily convert models into appropriate code. After that, the
IDE thoroughly automates the testing and debugging of the model-driven code. It is
possible to deploy the build for additional testing using the IDE or other tools after it has
completed a successful build and been properly tested.
Software developers' productivity can increase thanks to an IDE's quick setup and tool
standardization.
Without an IDE, developers must spend time selecting the right tools, setting them up, and
becoming familiar with how to use them. An integrated development environment contains
many, if not all, of the required dev-test tools.
IDEs are also created with a single user interface for all of their tools. By arranging the
features required for software development in the UI, an IDE can standardize the
development process.
How IDE features in an Integrated Development Environment (IDE) help in application
development.
1.It provides a centralized setting for the majority of a developer's requirements, including
platform-as-a-Service, debugging tools, and version control systems.
2. Capabilities for code completion can enhance programming workflow.
3. To guarantee top-notch code, it automatically scans for bugs and errors.
4. Refactoring tools make it easier for programmers to change names completely and
accurately.
5. Keep a fluid development cycle.
6. Boost productivity and contentment among developers.
7. Deliver top-notch software on time.
P a g e 47 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
3.4Evaluate the use of the Visual StudioIDE for your application development
contrasted with not using an IDE.
Programmers can edit, debug, build, and publish code using the Visual Studio IDE as a
creative launching pad. Unlike code editors or other IDEs that only offer a standard editor
and debugger, Visual Studios IDE also offers compilers, code completion tools, graphical
designers, and a variety of other features that aid programmers in the development process.
1. This offers suggestions for how to finish long strings of code, allowing programmers to
access databases or automatically write code to create a graphical user interface (GUI).
This doesn't save time because it only permits writing and editing of codes.
2. When working on large-scale development projects, the Visual studios IDE includes
features like
Complex project development can be challenging.
3. The Visual Studios IDE was created to do away with obstacles that slow down your
workflow; thanks to the available shortcuts, you can avoid using the mouse.
These features are not available in text editors (non-IDEs).
4. Because of the features available, it is best to develop secure, error-free programs or
projects in a shorter amount of time.
The best way to practice coding and takes more time than IDEs.
P a g e 48 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Activity 4
4.1
P a g e 49 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
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.
Login Interface
P a g e 50 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Login Form Coding
Login Success
P a g e 51 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Options
Options Forms
P a g e 52 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Rent Calculation Interface
P a g e 53 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Day Tour Interface
P a g e 54 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
New Entry Interface
P a g e 55 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Search Vehicle and delete vehicle coding
P a g e 56 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Delete Command Success Message
P a g e 57 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Vehicle Tariffs in SQL
P a g e 58 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Packages Adding Interface
P a g e 59 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Packages updated in SQL
P a g e 60 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
4.2Explain 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.2.1 The debugging process and the features available in Visual studio IDE
for debugging
What are the debugging processes?
1. Throughout the development process, software programs are put through extensive
testing, updating, troubleshooting, and maintenance. The software typically has bugs and
errors, which are regularly fixed. Debugging is the process of correcting a software bug.
2. It means finding, examining, and eliminating errors. This procedure starts when the
software doesn't work as intended and ends when the issue has been fixed and the software
has been tested successfully. But because errors must be fixed at every stage of debugging,
it is regarded as a very difficult and time-consuming task.
The steps in a debugging process, according to the website "The Economic Times," are as
follows:
3. Recreate the issue.
4. Speculate on the bug. Get as much feedback from the user as you can to determine the
precise cause.
5. When the bug manifests, take a program snapshot. Attempt to capture all of the program's
variable values and states at that moment.
6. Based on the state and action, analyze the snapshot. Attempt to determine the root of the
bug.
7. Fix the current bug, but also make sure that no new bugs appear.
P a g e 61 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
needs to be in "Break Mode" in order to be debugged. This means that the program can be
stopped after a specified line of code and that all active threads are also stopped. Use the
"Debug Break All menu item" or set breakpoints to activate breaker mode. Press F9 or
"Debug | Toggle Breakpoint" to add breaker points. The program will halt and enter break
mode once a break point has been set.
3. Navigate through code while in break mode: Break mode allows you to debug
interactively and watch code execution.
It is incredibly easy to debug apps and transform them into safe, bug-free programs thanks
to Visual Studios' features.
The "fault localization" phase in the debugging process is crucial, as was already mentioned.
Using the "select debug/start debugging" option, I was able to find and fix any errors while
the application was still running.
4.3Outline 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.
Coding standards
coding standards because if they are not, the code may be rejected during the organization's
code review procedure.
P a g e 62 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
1. Limited use of global - This refers to the types of data that can and cannot be declared
global.
2. Typical headers for various modules - The headers of various modules should adhere to a
standard format and contain certain information to make the code easier to understand and
maintain. The header format must include the following elements, which are used by
various businesses:
4.3.2 Critically evaluating why, a coding standard is necessary for the team as
well as for the individual
Advantages using of Coding standards.
P a g e 63 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
(Upadhyay, 2022)
(Metwalli, 2022)
(Britannica, 2022)
(Gillis, n.d.)
References
Britannica, T. E. o. E., 2022. Encyclopedia Britannica. [Online]
Available at: https://www.britannica.com/science/Fibonacci-number
Gillis, A. S., n.d. Techtarget. [Online]
Available at: https://www.techtarget.com/searchsoftwarequality/definition/integrated-
development-environment
[Accessed 2022].
Metwalli, S. A., 2022. Built In NationalBuilt In National. [Online]
Available at: https://builtin.com/data-science/python-code-snippets
Upadhyay, S., 2022. Simplilearn - Online Certification Training Course Provider. [Online]
Available at: https://www.simplilearn.com/tutorials/data-structure-tutorial/what-is-an-
algorithm#:~:text=An%20algorithm%20is%20a%20step,more%20than%20one
%20programming%20language.
P a g e 64 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01