0% found this document useful (0 votes)
43 views

M.M Rishad - Programming

The document is an internal verification form for an assessment of a Higher National Diploma in Computing student. The internal verifier checked that the assessor's evaluation of the student's assignment matched the criteria in the assignment brief, was justified by comments on the student work, and accurately assessed the work. The internal verifier confirmed that the feedback to the student was constructive, linked to assessment criteria, and identified opportunities for improved performance. The internal verification found no need to amend the assessment decision.

Uploaded by

Rishad Jobbs
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

M.M Rishad - Programming

The document is an internal verification form for an assessment of a Higher National Diploma in Computing student. The internal verifier checked that the assessor's evaluation of the student's assignment matched the criteria in the assignment brief, was justified by comments on the student work, and accurately assessed the work. The internal verifier confirmed that the feedback to the student was constructive, linked to assessment criteria, and identified opportunities for improved performance. The internal verification found no need to amend the assessment decision.

Uploaded by

Rishad Jobbs
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 64

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)


INTERNAL VERIFICATION – ASSESSMENT DECISIONS
Programme title Higher National Diploma in Computing

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.

INTERNAL VERIFIER CHECKLIST

Do the assessment criteria awarded match


those shown in the assignment brief?
Y/N
Is the Pass/Merit/Distinction grade awarded
justified by the assessor’s comments on the Y/N
student work?
Has the work been assessed
accurately? Y/N

Is the feedback to the student:


Give details:
• Constructive?
• Linked to relevant assessment criteria?
Y/N
• Identifying opportunities for
Y/N
improved performance?
Y/N
• Agreeing actions?
Y/N
Does the assessment decision need
amending? Y/N

Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if required)
Date

P a g e 1 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Confirm action completed
Remedial action taken

Give details:

Assessor signature Date


Internal Verifier
signature Date

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.

Pass, Merit & Distinction Descripts P1 M1 D1

LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an analysis of a suita
Integrated Development Environment (IDE).

Pass, Merit & Distinction Descripts P2 M2 D2

LO3. Implement basic algorithms in code using an IDE.

Pass, Merit & Distinction Descripts P3 M3 D3

LO4. Determine the debugging process and explain the importance of a coding standard.
Pass, Merit & Distinction Descripts P4 P5 M4 D4

Grade: Assessor Signature: Date:


Resubmission Feedback:

Grade: Assessor Signature: Date:


Internal Verifier’s Comments:

Signature & Date:

* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place and
grades decisions have been agreed at the assessment board.

Assignment Feedback
Formative Feedback: Assessor to Student

P a g e 3 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Action Plan

Summative feedback

Feedback: Student to Assessor

Assessor Date
signature
[email protected] 03/10/2022
Student om Date
signature

Pearson Higher Nationals in


Computing
P a g e 4 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Unit 01: Programming
Assignment 01

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.

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.

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


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

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

Unit Number and Title Unit 01: Programming

Academic Year 2021/22

Unit Tutor Mr.Tharaka

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


Integrated Development Environment

Issue Date

Submission Date

IV Name & Date

Submission Format

This submission will have 3 components

1. Written Report

This submission is in the form of an individual written report. This should be written in a concise, formal
business style using single spacing and font size 12. You are required to make use of headings, paragraphs
and subsections as appropriate, and all work must be supported with research and referenced using the
Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. (The
recommended word count is 1,500–2,000 words for the report excluding annexures)

2. Implemented System (Software)


The student should submit a GUI based system developed using an IDE. The system should connect with a
backend database and should have at least 5 different forms and suitable functionality including insert,
edit and delete of main entities and transaction processing.

3. Presentation
With the submitted system student should do a presentation to demonstrate the system that was
developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint slides while doing the
presentation, but live demonstration of the system is required. Evaluator will also check the ability to
modify and debug the system using the IDE.

Unit Learning Outcomes:

LO1. Define basic algorithms to carry out an operation and outline the process of
programming an application.

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

LO3. Implement basic algorithms in code using an 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

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


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

Define what an algorithm is and outline the characteristics of a good algorithm. Write the
algorithms to display the Fibonacci series and the factorial value for a given number using
Pseudo code. Determine the steps involved in the process of writing and executing a
program.
Take a sample number and dry run the above two algorithms. Show the outputs at the end
of each iteration and the final output. Examine what Big-O notation is and explain its role in
evaluating efficiencies of algorithms. Write the Python program code for the above two
algorithms and critically evaluate their efficiencies using Big-O notation.

Activity 2

2.1 Explain what is meant by a Programming Paradigm and the main characteristics
of Procedural, Object oriented and Event-driven paradigms and the relationships among
them. Write small snippets of code as example for the above three programming
paradigms using a suitable programming language(s). you also need to critically
evaluate the code samples that you have given above in relation to their structure and
the unique characteristics.

Activity 3 and Activity 4 are based on the following Scenario.

Ayubo Drive is the transport arm of Ayubo Leisure (Pvt) Ltd, an emerging travel & tour
company in Sri Lanka. It owns a fleet of vehicles ranging from cars, SUVs to vans.

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.

Vehicle rent and hire options are described below.

1. Rent (With or without driver) – For each type of vehicle rates are given per day, per week
and per month. Rate for a driver also given per day. Depending on the rent period the total
rent amount needs to be calculated. For example: if a vehicle is rented for 10 days with a
driver, total amount to be calculated as follows:

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

2. Hire (with driver only) – These are based on packages such as airport drop, airport pickup,
100km per day package, 200km per day package etc. Standard rates are defined for a
package type of a vehicle typeif that is applicable for that type of vehicle.For each package
maximum km limit and maximum number of hours arealso defined. Extra km rate is also
defined which is applicable if they run beyond the allocated km limit for the tour. For day
tours if they exceed max hour limit,a waiting charge is applicable for extra hours. Driver
overnight rate and vehicle night park rate also defined which is applicable for each night
when the vehicle is hired for 2 or more days.

Activity 3

Function 1: Rent calculation.


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

Function 2: Day tour - hire calculation.


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

Function 3: Long tour - hire calculation.


Calculate total hire_value when vehicle_no, package_type, start_date, end_date,
start_km_reading, end_km_reading parameters are sent in. Should return base_hire_charge,
overnight_stay_charge and extra_km_charge as output parameters.

Write suable algorithms for vehicle tariff calculation for rents and hires. Ideally 3
functions should be developed for this purpose as above. Use the visual studio IDE
(using C#.net) to Implement the above algorithms and design the suitable database
structure for keeping the tariffs for vehicle types and different packages which must be

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

Grading Criteria Achieved Feedback

LO1 Define basic algorithms to carry out an operation


and outline the process of programming an
application.

P1Provide a definition of what an algorithm is and outline


the process in building an application.

M1Determine the steps taken from writing code to


execution.

D1 Evaluate the implementation of an algorithm in a suitable


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

LO2 Explain the characteristics of procedural,


objectorientated and event-driven programming,
conduct an analysis of a suitable Integrated
Development Environment (IDE)

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.

M2 Compare and contrast the procedural, object


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

D2Critically evaluate the source code of an application which


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

LO3Implement basic algorithms in code using an IDE.

P3Write a program that implements an algorithm using an


IDE.

M3Use the IDE to manage the development process of the


program.

D3Evaluate the use of an IDE for development of


applications contrasted with not using an IDE.

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

P4Explain the debugging process and explain the debugging


facilities available in the IDE.

P5Outline the coding standard you have used in your code.

M4Evaluate how the debugging process can be used to


help develop more secure, robust applications.

D4 Critically evaluate why a coding standard is necessary in


a team as well as for the individual.

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

1. Define what an algorithm is

A mathematical problem can be solved in a finite number of stages using an algorithm,


which is described as "a set of rules to be followed in computations or other problem-
solving procedures" or "a technique for doing so, generally including recursive operations."
As a result, an algorithm is a constrained collection of procedures used to address a
particular problem.
According on your objectives, algorithms might be straightforward or complex.
Similar to this, algorithms in programming aid in the completion of a task to generate the
desired result.
The developed algorithms are language-independent, which implies that they may be
implemented in any language and provide the same outcomes.

2.Outline the characteristics of a good algorithm.

Similarly, not all written computer instructions are algorithms. Some instructions must have
the following features in order to be classified as an algorithm:

The algorithm should be explicit and unambiguous.


Each of its phases should be obvious in every way and lead to only one meaning.
Well-Defined Inputs: If an algorithm requires inputs, they should be well-defined inputs.
Well-Specified Outputs: The algorithm's output must be clearly defined and well-defined.
Finite-ness: The algorithm must be finite, that is, it must end within a finite period.
Feasible: The method must be simple, general, and practical enough to be run with the
resources provided. It must not include any futuristic technologies or anything else.
Language Independence: The intended algorithm must be language-independent, i.e. it must
be merely simple instructions that may be implemented in any language and still provide the
desired results.

P a g e 20 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Algorithm Characteristics:

It should end after a certain amount of time.


It must generate at least one output.
It should accept 0 or more input.
It should be deterministic, which means it should provide the same result for every input
instance.
Every step in the algorithm must be effective, which means that each step must perform
some function.

3.Algorithms to display the Fibonacci series and the factorial value for a given number
using Pseudo code.

Pseudocode for Finding Fibonacci Series

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

Pseudocode for Finding Factorial of Number

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.

The Programming Process

Developing software has steps that are similar to any problem-solving activity. There are
five important components to the programming process:

1. Identifying the problem


2. Making the Solution
3. Computer programming
4. Evaluation of the program
5. Program documentation

1. Identifying the problem

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.

2. . Making the Solution

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.

4. Evaluation of the program

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:

Desk-checking. Similar to how a programmer who is seeking a shortcut and quick to


execute the program on a computer after it is created would occasionally skip this step, too.
However, by carefully desk-checking, you may find a number of mistakes and ultimately
end up saving time. Desk-checking involves just sitting down and mentally going over the
program's logic in an effort to verify that it is error-free and functional. A walkthrough is a
technique used by many businesses to advance this stage in which a group of programmers
—your peers—reviews your software and makes collegial comments.

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.

Debugging. Debugging, a phrase frequently used in programming, is the process of


identifying, finding, and fixing defects (mistakes), typically by executing the program.
These flaws are logical mistakes, such as instructing a computer to repeat an action while
failing to instruct it on how to stop. You run the application during this step using test data
you create. To ensure that you test every component of the software, you must carefully
arrange the test data.

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.

f(x)=O(g(x))f(x)=O(g(x)) as x\to \infinx→∞

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

|f(x)|\le Mg(x)∣f(x)∣≤Mg(x) for all x\ge x_0x≥x


0
Big O notation is a type of mathematical notation that expresses how a function limits itself
when its argument goes towards a certain value or infinity.
Big O notation in computer science is used to categorize algorithms based on how their
runtime or space needs increase as the input size rises. Big O notation categorizes functions
based on their rates of growth, allowing for the representation of several functions with the
same growth rate using the same notation.

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.

Critically evaluate the code for Fibonacci series.

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.

Big-O Notation = F(n-1)+F(n-2)


Best Case F(n-1) Comparison Item Found in the 1 st
middle element
Worst Case F(n-2) Comparison Searching for non existing
elements
Average Case F(n-1)+F(n-2) comparison Average of above 2

Critically evaluate the code for factorial numbers.

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.

Big-O Notation =O(n!)


Best Case The Search ends in success The element being
with just one comparison. searched maybe found at
the first position.
Worst case The Search terminates in The element being
success with “ n “ searched maybe existing
comparisons. at the last position or not
exist in the list at all.
Average Case O(n!) comparison

P a g e 30 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Activity 2

2.1 What is Programming Paradigm

A programming paradigm is a category, a fashion, or a method of programming. It is a


strategy for problem-solving that makes use of programming languages. The difficulty of
applying a paradigm varies by language.

A program's categorization, style, or approach are all examples of programming formats. It


is a method of problem-solving that makes use of programming languages. A paradigm can
be used with varying degrees of difficulty depending on the language.

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.

2.2 The main characteristics of Procedural, Object oriented and Event-driven


paradigms and the relationships among them.

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.

We can speak to computers in a language they can understand thanks to computer


programming languages. The simplest kind of language that computers can comprehend is
binary, which is simply made up of the digits 1 and 0. Programming languages are widely
used in the computer industry.

The following components comprise a computer program:

 Organizing the Program

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

During execution or runtime, values are stored in variables. A decent programming


language must include an adequate variable declaration mechanism, even if some
programming languages provide the programmer the option to bypass variable declaration.

 Structures that include loops

Looping is a technique used in computer programming to repeat statements in particular


circumstances. There are various distinct loop types, and each one differs somewhat
depending on the programming language. Loops will keep running until the exit condition is
met.

 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

Programmers use programming notation in an illustrative way to create programs in


computer programming. Therefore, it is essential that the notation have a straightforward
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.

Function 1: Rent calculation.

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

Function 2: Day tour - hire calculation.

Start
Get values package_no , package type , start_km , end_km , start_date , end date

total_hire_charge = 0 , total_days = 0 , over_night_charges


» 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

Function 3: Long tour - hire calculation.

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.

Rent Calculation Coding

Day Tour Calculation Code

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

SQL Tariffs 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.

Benefits of using IDEs

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.

About Visual Studio 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.

Visual Studio IDE Vs Not Using an IDE

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

Long Tour Interface

P a g e 54 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
New Entry Interface

New Vehicle registration Coding

New Vehicle Registration Success Message

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

Update Vehicle Tariffs Coding

Tariffs Update Success Message

P a g e 57 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Vehicle Tariffs in SQL

Linked to Visual Studios database for tariffs

P a g e 58 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Packages Adding Interface

Packages Adding Coding

P a g e 59 | 64
M.M.Mohammed Rishad (COL00087877) Programming – 01
Packages updated in SQL

Linked Visual Studio Database for packages

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.

Features available in Visual studios IDE to debug.


1. Attaching the debugger: In Visual Studio, debugging will launch automatically after you
press F5 or "select Debug | Start Debugging."
2. Debugger Break Mode: The debugged process

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.

Use the process of debugging to produce more dependable, secure apps

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

outstanding software Developers and development companies uphold coding standards,


which are a clear and uniform style of coding. Based on their needs, what works best for
their organization, and the kind of software being developed, organizations or programmers
create coding standards. It is crucial to maintain

coding standards because if they are not, the code may be rejected during the organization's
code review procedure.

4.3.1 Some common coding standards

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.

1. They speed up software development and improve software efficiency.


2. They assist in the early detection of errors.
3. They make a code easier to read and comprehend while lowering its complexity within
the code.
4. It lowers the software development's unforeseen costs. When creating programs, it's
important to consider time, money, debugging, and
future revisions of it When coding, having a set of standards aids in meeting those
requirements.
As was already mentioned, coding standards increase efficiency and decrease development
while assisting us in spotting errors at an early stage, a software's execution time.
Additionally, these standards improve the readability and comprehension of the code,
particularly for other developers who may work on updates in the future or troubleshoot
errors that were initially missed. By putting it easier to read, comprehend, and debug,
lowering costs for the company as a result. positively impact a person, group, or both. As a
result, as previously mentioned, having Coding standards facilitate time, cost, and
debugging savings.

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

You might also like