0% found this document useful (0 votes)
28 views84 pages

programming assignment

programming assignment
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
28 views84 pages

programming assignment

programming assignment
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 84

‘Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)


INTERNAL VERIFICATION – ASSESSMENT DECISIONS

Programme title Higher National Diploma in Computing

Mr. Kelum suriya archchi Internal Verifier


Assessor
Unit(s) Unit 01: Programming

Assignment title Design &Implement a GUI based system using a suitable Integrated
Development Environment

Student’s name
H.P.Dileesha Mandara Prawarshana

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
Y/N
accurately?
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
Y/N
amending?

Assessor signature Date

Internal Verifier signature Date


Programme Leader signature (if required)
Date

H.P.D.Mandara Prawarshana 1 Unit 02 - Programming


Confirm action completed
Remedial action taken

Give details:

Assessor signature Date

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

H.P.D.Mandara Prawarshana 2 Unit 02 - Programming


Higher Nationals - Summative Assignment Feedback Form
Student Name/ID H.P.Dileesha Mandara Prawarshana
Unit Title Unit 01
Assignment Number 01 Assessor
18/05/2022 Date Received 1st 18/05/2022
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

H.P.D.Mandara Prawarshana 3 Unit 02 - Programming


Formative Feedback: Assessor to Student

Action Plan

Summative feedback

Feedback: Student to Assessor

Assessor Date
signature
mandarasfh@gmail.com 12/05/2022
Student Date
signature

H.P.D.Mandara Prawarshana 4 Unit 02 - Programming


Pearson Higher Nationals in
Computing
Unit 01: Programming
Assignment 01

H.P.D.Mandara Prawarshana 5 Unit 02 - Programming


General Guidelines

1. A Cover page or title page – You should always attach a title page to your assignment.
Use previous page as your cover sheet and make sure all the details are accurately filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.

Word Processing Rules

1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.
5. Use word processing application spell check and grammar check function to help editing
your assignment.

Important Points:

1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your
work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. If you are unable to hand in your assignment on time and have valid reasons such as illness,
you may apply (in writing) for an extension.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.
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

H.P.D.Mandara Prawarshana 6 Unit 02 - Programming


Student Declaration

I hereby, declare that I know what plagiarism entails, namely to use another’s work and to present
it as my own without attributing the sources in the correct way. I further understand what it means
to copy another’s work.

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


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

mandarasfh@gmail.com 12/05/2022
Student’s Signature: Date:
(Provide E-mail ID) (Provide Submission Date)

H.P.D.Mandara Prawarshana 7 Unit 02 - Programming


Higher National Diploma in Computing
Assignment Brief
Student Name /ID Number H.P.Dileesha Mandara Prawarshana /E131272

Unit Number and Title Unit 01: Programming

Academic Year 2021/22

Unit Tutor

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


Integrated Development Environment

Issue Date

Submission Date 18/05/2022

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:

H.P.D.Mandara Prawarshana 8 Unit 02 - Programming


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

LO2. Explain the characteristics of procedural, object-orientated and event-driven


programming, conduct an analysis of a suitable Integrated Development
Environment (IDE).

LO3. Implement basic algorithms in code using an IDE.

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

H.P.D.Mandara Prawarshana 9 Unit 02 - Programming


Assignment Brief and Guidance:

H.P.D.Mandara Prawarshana 10 Unit 02 - Programming


Activity 1

A. The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence
relation.
Fn = F n-1 + F n-2

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


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

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

Activity 2

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

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

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

The vehicles that it owns are hired or rented with or without a driver. The tariffs are based on
the vehicle type. Some of the vehicle types that it operates are, small car, sedan car, SVUs, Jeep
(WD), 7-seater van and Commuter van. New vehicle types are to be added in the future.

H.P.D.Mandara Prawarshana 11 Unit 02 - Programming


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

H.P.D.Mandara Prawarshana 12 Unit 02 - Programming


Activity 4

4.1 Design and build a small system to calculate vehicle hire amounts and record them in a
database for customer billing and management reporting forAyubo drive. This includes the
completing the database design started in 3.2 and implementing one or more GUIs for
vehicle, vehicle type, and package add/edit/delete functions. It essentially requires an
interface for hire calculation and recording function described above. Generating customer
reports and customer invoices are not required for this course work.

4.2 Explain debugging process and the features available in Visual studio IDE for debugging
your code more easily. Evaluate how you used the debugging process to develop more
secure, robust application with examples.

4.3 Outline the coding standards you have used in your application development. Critically
evaluate why a coding standard is necessary for the team as well as for the individual.

H.P.D.Mandara Prawarshana 13 Unit 02 - Programming


H.P.D.Mandara Prawarshana 14 Unit 02 - Programming
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)

H.P.D.Mandara Prawarshana 15 Unit 02 - Programming


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.

H.P.D.Mandara Prawarshana 16 Unit 02 - Programming


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.

H.P.D.Mandara Prawarshana 17 Unit 02 - Programming


Acknowledgement

The timely and effective completion of the book would not have been possible without the
assistance and support of many people. I want to use this occasion to express my gratitude to
everyone who assisted me in some way throughout this crucial project, whether directly or
indirectly. First of all, I wish to express my sincere gratitude and due respect to my Mr. Kelum
suriya archchi lectures in department of Computing Esoft Metro Campus Matara. I give him a great
heartfelt thanks for his invaluable advice, constant encouragement, and positive support, all of
which greatly aided me during my time at work. I'd want to thank him for always taking an active
interest in my questions and making useful advice.

H.P.D.MANDARA PRAWARSHYANA

H.P.D.Mandara Prawarshana 18 Unit 02 - Programming


TABLE OF CONTENTS

Acknowledgement ..............................................................................................................................18

Learning Outcomes 01: ..................................................................................................................... 23

1.1 An algorithm .......................................................................................................................... 23


1.2 Features of a good algorithm. ................................................................................................ 25
1.4 The Fibonacci numbers are the numbers in the following integer sequence. ........................27
1.5 Steps taken from code writing to execution. ..........................................................................28
1.6 (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..)Fibonacci pattern take a sample number
and solve the pattern. .................................................................................................................. 30
1.7 Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to
(n) take a sample ......................................................................................................................... 33
1.8 What is a BIG-0 ? and its function ........................................................................................ 36
1.9 Evaluate Fibonacci and factorial efficiencies using Big-O notation ..................................... 37
..................................................................................................................................................... 37
1.10 Evaluate the implementation of an algorithm in a suitable language. Evaluate the
relationship between the ............................................................................................................. 37

Learning Outcomes 02: ..................................................................................................................... 38

2.1 What does a programming paradigm mean ? ........................................................................ 38


2.2 Procedural programming ....................................................................................................... 39
2.3 Procedural programming pseudo code example ................................................................... 39
2.4 Procedural programming python code ...................................................................................40
..................................................................................................................................................... 41
2.5 Object-oriented programming ...............................................................................................42
2.6 pseudo Code for object -oriented programming .................................................................... 42
..................................................................................................................................................... 43
2.7 Python Code for object -oriented programming .................................................................... 43
2.8 Event-driven programming ....................................................................................................45
2.9 Python Code for Event - driven programming ...................................................................... 45
2.10 C# Code for Event - driven programming ........................................................................... 47

H.P.D.Mandara Prawarshana 19 Unit 02 - Programming


2.10 Comparison of Procedural, object-oriented and event driven programming .......................48
2.11 Differences between Procedural , Object-oriented and Event-driven programming. ..........49

Learning Outcomes 03: ..................................................................................................................... 50

3.1 Introduction of rent service ....................................................................................................50


3.2 RENT Calculation ..................................................................................................................51
3.3 DAY Hire Calculation ........................................................................................................... 55
3.4 LONG Hire Calculation ........................................................................................................58
3.5 Use of IDE for application development ............................................................................... 62

Learning Outcomes 04: ..................................................................................................................... 64

4.1Ayubo drive application ..........................................................................................................64


4.2 Main interfaces of the Ayubo Drive application ................................................................... 64
4.3 AYUBO Car rent other pages ................................................................................................70
4.4 C# Design code(AUBO rent server software) ....................................................................... 73
4.5 SYSTEM DATABASE ........................................................................................................ 79
4.6 Importance of coding standard for the team as well as for the individual .............................83
Reference ..................................................................................................................................... 84

H.P.D.Mandara Prawarshana 20 Unit 02 - Programming


FIGURE
Figure 1 : compiler and interpreter ( Guru99.com 2017) ......................................................... 29
Figure 2 :pseudo code (the Author) .............................................................................................30
Figure 3 :flowchart (the Author) ............................................................................................... 31
Figure 4 :python code (the Author) ........................................................................................... 32
Figure 5 :python code output (the Author) ................................................................................ 32
Figure 6 :flowchart (the Author) ............................................................................................... 33
Figure 7 :pseudo code (the Author) ...........................................................................................34
Figure 8 :python code (the Author) ........................................................................................... 35
Figure 9 :python code output (the Author) ................................................................................ 35
Figure 10 : BIG -O Complexity chart(medium .com) .................................................................36
Figure 11 -That is , it divided into 2 part(https://www.freecodecamp.org ) .............................. 38
Figure 12 -pseudo code(the author/2022) .................................................................................. 40
Figure 13 -python code for PROCEDURAL programming(the author/2022) ............................ 41
Figure 14 -python display(the author/2022) .............................................................................. 41
Figure 15 -pseudo code(the author/2022) .................................................................................. 43
Figure 16 -object oriented python code (the author/2022) ........................................................ 44
Figure 17 -python display(the author/2022) .............................................................................. 44
Figure 18 even - driven python code (the author/2022) ...........................................................46
Figure 19 - display(the author /2022) ........................................................................................ 46
Figure 20 - c# even - driven programming(the author/2022) .................................................... 47
Figure 21 - c# code even - driven programming(the author/2022) .............................................47
Figure 22 - rent calculation(the author/2022) ........................................................................... 51
Figure 23 -rent calculation(the author/2022) ............................................................................ 52
Figure 24 - rent code(the author/2022) .....................................................................................52
Figure 25 -start and end date(the author/2022) .........................................................................53
Figure 26 - rent calculation code (the author/2022) ..................................................................53
Figure 27 -rent calculation(the author/2022) ............................................................................ 54
Figure 28 - new rent add(the author/2022) ............................................................................... 54
Figure 29 - day hire calculation(the author/2022) .....................................................................55
Figure 30 - day hire calculation(the author/2022) .....................................................................55
Figure 31 - day hire calculation(the author/2022) .....................................................................56
Figure 32 - day hire calculation(the author/2022) .....................................................................56
Figure 33 - day hire calculation(the author/2022) .....................................................................57
Figure 34 - day hire calculation(the author/2022) .....................................................................57
Figure 35 - long hire calculation(the author/2022) ................................................................... 58
Figure 36 - long hire calculation(the author/2022) .................................................................... 59
Figure 37 -long hire calculation(the author/2022) .................................................................... 59
Figure 38 long hire calculation(the author/2022) ......................................................................60
Figure 39 long hire calculation(the author/2022) ......................................................................60
Figure 40 - long hire calculation(the author/2022) ................................................................... 61
Figure 41 - long hire calculation(the author/2022) .................................................................... 61
Figure 42 - long hire calculation(the author/2022) .................................................................... 62
H.P.D.Mandara Prawarshana 21 Unit 02 - Programming
Figure 43 - Login page(the author/2022) ....................................................................................65
Figure 44 - Home interface(the author/2022) ............................................................................ 66
Figure 45 -customer page(the author/2022) .............................................................................. 67
Figure 46 -add new user(the author/2022) .................................................................................67
Figure 47 - update data(the author/2022) ..................................................................................68
Figure 48 -update success data(the author/2022) ......................................................................68
Figure 49 - delete data(the author/2022) .................................................................................... 69
Figure 50 -delete data success(the author/2022) ....................................................................... 69
Figure 51 customer page(the author/2022) ................................................................................70
Figure 52 - vehicle (the author/2022) .........................................................................................71
Figure 53 - vehicle type(the author/2022) ...................................................................................71
Figure 54 - package page(the author/2022) ...............................................................................72
Figure 55 - home button(the author/2022) ................................................................................. 72
Figure 56 - driver page(the author/2022) ....................................................................................73
Figure 57 - login page(the author/2022) ....................................................................................74
Figure 58 -lodging code(the author/2022) ................................................................................. 74
Figure 59 - login code(the author/2022) .................................................................................... 75
Figure 60 main page(the author/2022) ...................................................................................... 76
Figure 61 -home code(the author/2022) .................................................................................... 76
Figure 62 -home code(the author/2022) .................................................................................... 77
Figure 63 insert code (the author/2022) .....................................................................................77
Figure 64 - edit data(the author/2022) ....................................................................................... 78
Figure 65 data save code(the author/2022) ............................................................................... 78
Figure 66 -customer table (the author2022) .............................................................................. 79
Figure 67 - vehical (the author/2022) .........................................................................................80
Figure 68 vehical (the author/2022) ...........................................................................................80
Figure 69 -packeg(the author/2022) .......................................................................................... 81
Figure 70 packeg(the author/2022) ............................................................................................81
Figure 71 LOGIN(THE AUTHOR/2022) .........................................................................................82

TABLE
Table 1 : The flowchart Symbols ( the Author) ............................................................................26
Table 2 - notation and name(the author/2022) ...........................................................................37
Table 3 -difference between for algorithm and code(the author/2022 ....................................... 37
Table 4 -difference (the author/2022) .........................................................................................49

H.P.D.Mandara Prawarshana 22 Unit 02 - Programming


Learning Outcomes 01:

1.1 An algorithm
An Algorithm is a set of steps that are used to solve a problem .That is simple steps to solve a
specific problem class .An algorithm has the ability to solve a problem easily and has a set of rules to
follow.
What is a further algorithm for mailing this letter? And how to solve a problem by it shown below.

1. Write an article first.


2. Second fold the article.
3. Third put in and envelope.
4. Write the address instead of four.
5. Stamping Instead of five.
6. Posting the letter for six.

Accordingly An algorithm must be executed step by step and sometimes the sequence of several
steps may be changed but also to the process presented by it .No harm done. When writing an
algorithm its order is very important and if it is arranged in sequence then the whole algorithm will
fail and it will be difficult to solve the problem .Define basic algorithms to carry out an operation and
outline the process of programming an application.
When studying an algorithm ,3 control structures can be identified .That is

I. Sequential
Here the algorithm operates in straightforward order from top to bottom ,from the initial step to be
final step .for example,
(Going up and down stairs is like walking up or down stairs.)
II. Selection
That is ,what are the step to be executed according to the satisfaction (1) or non-satisfaction (0) of
the condition included in the algorithm? , is the moment of deciding .for example,
(Passing a subject .more than 35 points?)

H.P.D.Mandara Prawarshana 23 Unit 02 - Programming


H.P.D.Mandara Prawarshana 24 Unit 02 - Programming
III. Repetition
Repetition is the process of repeating an algorithm until it satisfies a condition. For example,
(Is to read a paragraph and find the number of words in it.)

1.2 Features of a good algorithm.


 Productivity – Every step of an algorithm must be able to be performed in a given period of
time . that is , every step must be basic and essential .
 That is correct - When an algorithm given the correct information for each input , the
output also given the correct information.
 Having an input- That is,an algorithm must have one or more inputs to make good sense.
 Having an output- That is even if there is more then one input in an algorithm , the output
should be the same as one .
 Clear and vague things - Every input ,every function, and every output of the algorithm
should be clearly represented
 Finiteness - The Algorithm must end after a limited number of steps.
 Feasibility - Must be able to work with the available resources.
 Independent - An algorithm should have step by step instructions that can be found
independently of any program code.

1.3 The Programming process


Problem solving involves a task - like step. In a programming,there are a number of steps involved in
solving a problem. As those steps defining the problem , planning the solution , coding the program ,
testing the program , documenting the program consists of five steps.

a. Problem identification (Conclusion)


The first step is to Analyse the programming system and identify the inputs , processes and outputs
required.That is at this stage think about what the problem is and how to identify the problem and fix
it, At this stage the solution is to try to identify what is appropriate and examine the problem
carefully. So the Author here tries to tailor exactly what the program needs.

H.P.D.Mandara Prawarshana 25 Unit 02 - Programming


b. Planning the solution
That is ,it can be identified as the second step in a programming process.This step involves drawing
flow chart and pseudo code , two common methods of problem solving,At this stage it is possible to
solve the problem in writing As the two methods of solving , It uses both flowchart and pseudo code
to simplify and present an algorithm desing and to better understand the algorithm.

1.3.1 Flowchart
A flowchart is a algorithm that uses a flowchart to graphically present a step by step build or
build. A standard coding system has been introduced to create an algorithm. It can be seen in the
table below.

Beginning or end

Input and output

process

Decision

Connector

Flow direction

Table 1: The flowchart Symbols ( the Author)

1.3.2 Pseudo code

This can be identified as the second stage of problem solving . this written using simple English
word. This can be seen as the first encoding . this coding the computer is also unable o understand.

H.P.D.Mandara Prawarshana 26 Unit 02 - Programming


The following is how each expression of the algorithm is expressed in simple English word.
BEGIN / END
INPUT
OUTPUT / DISPLAY
PROCESS
IF…..THEN , ELSE, ENDIF
FOR…….DO
WHILE, END WHILE

c. Coding the program


That is , it can be identified as the next step of a programmer. This can be identified as a solution in a
programming language. Many computer languages can be found for encoding.
Machine code , an original computer language, is visible and difficult to write in that language
(written in format 1 ,0), making it very easy for a computer to understand.
Used today python , c# ,c++,c, Java programming language can be identified.this is easy to write and
the computer needs a converter to understand it.

d. Testing the program

Some experts insist that a well-designed program cab be written correctly for the first time. Of
course it should be checked. That is it should be given to a certain group and the problem that arise
from it should be identified and rectified.

e. Documenting the program

Documenting the program can be identified as the final step after completing all the steps in the
program. All codes will be explained so that this code can be understood.

1.4 The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..
The pseudo code associated with this algorithm is shown below.(first question assignment.)

H.P.D.Mandara Prawarshana 27 Unit 02 - Programming


Begin
enter the number (n)
x=0
z=1
y=0
fib=0
display(" Fibonacci number is")
while (i<n)
display(fib)
fib=z+y
z=y
y=fib
x=x+1
end while
end

1.5 Steps taken from code writing to execution.


The 4 step from code writing to execution are defined.

 Coding
Encoding is also sometimes referred to as a computer programmer. That is , creating a series of
computer instructions.
Ex- pseudo code Python code

Begin
Enter the number(N)
X=0 N = (input(“enter the number “))
Y=1 X=0
Do While N >= 0 : Y=1
Z=X+Y Do While N >= 0 :
Display (Z) Z=X+Y
End While Print (Z)
End

H.P.D.Mandara Prawarshana 28 Unit 02 - Programming


 Documenting the program

Software or programming is the process of documenting any written text that is detailed to its users.
This is a crucial part of the overall software development process.
Ex-
N = (input(“enter the number “)) # input the number
X=0 # substitutes 0 for x
Y=1 # substitutes 1 for y
Do While N >= 0 : #N is greater than or equal to 0
Z=X+Y
Print (Z) # output z

 Compiling and running the program


That is , it is a transition from one language to another. These are converted in to machine code using
compiler and interpreter

Figure 1 : compiler and interpreter ( Guru99.com 2017)


.

H.P.D.Mandara Prawarshana 29 Unit 02 - Programming


 Execution

A converter converts the code into machine code and obtains the final output. For example
A code encoded in c# translated by c# compiler by final output.

C# code C# compiler output

coding translate output

1.6 (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..)Fibonacci pattern take a
sample number and solve the pattern. (first question , assignment)

pseudo code

Figure 2:pseudo code (the Author)

H.P.D.Mandara Prawarshana 30 Unit 02 - Programming


Flowchart

Figure 3 :flowchart (the Author)

Enter the number = 10


X=0
Z=1
Y=0
Fib=0
Display = Fibonacci Number is
I < n? = yes First output is 0

Display (fib number)= 0


Fib = 1(z)+0(y) = 1
1(z)=0(y) = 0
Y(1)=1(fib) = 1

H.P.D.Mandara Prawarshana 31 Unit 02 - Programming


Python code

Figure 4 :python code (the Author)

Take a sample number and get the final output

Figure 5 :python code output (the Author)

H.P.D.Mandara Prawarshana 32 Unit 02 - Programming


1.7 Factorial of a non-negative integer, is multiplication of all integers smaller
than or equal to (n) take a sample number and solve the pattern. (factorial of 6 is
6*5*4*3*2*1 which is 720.) (second question assignment)

Flowchart

Figure 6 :flowchart (the Author)

H.P.D.Mandara Prawarshana 33 Unit 02 - Programming


pseudo code

Figure 7 :pseudo code (the Author)

H.P.D.Mandara Prawarshana 34 Unit 02 - Programming


Python code

Figure 8 :python code (the Author)

Take a sample number and get the final output

Figure 9 :python code output (the Author)

H.P.D.Mandara Prawarshana 35 Unit 02 - Programming


1.8 What is a BIG-0 ? and its function

The BIG-0 digit is the mathematical number that describes the function financially when value is
inclined towards the identical. In computers science the algorithm classifies the BIG-0 digit as the
input size increases and their running time increases. This can also the explain the complexity of the
algorithm.
Simply put, a BIG-0 digit is the language used to find the solution to a problem ,no matter how long
it, takes for an algorithm to take effect.

This is useful in Analyzing an algorithm. Here the letter “n” produces the input size and the function
“g(n)=n2” around “0( )” gives us an idea of how complex the algorithm is about the input size Big 0
notation we use to talk about how long it takes for an algorithm to take for an algorithm to effect.
The figure below illustrates this further. (what is the BIG 0 / geeksforgeeks.org/2022)

Figure 10 : BIG -O Complexity chart(medium .com)

H.P.D.Mandara Prawarshana 36 Unit 02 - Programming


1.9 Evaluate Fibonacci and factorial efficiencies using Big-O notation

Find the Big O values of the aforementioned algorithms and select the one with the lowest number to
discover which is the most efficient. Fibonacci series and factorial sequence have big O values of
O(2) and O(n!) respectively.

The following is a list of common types of notation and their names.

Notation Name

O(1) Constant

O(N) Linear

O(N2) Quadratic

O(LogN) Logarithmic

Table 2 - notation and name(the author/2022)

1.10 Evaluate the implementation of an algorithm in a suitable language.


Evaluate the relationship between the written algorithm and the code variant
All information related to the problem should always be kept in mind to solve a problem before
coding. These steps are required to solve each problem and can also be described as an algorithm.Its
does not say how to find solutions based on the problem and how to build solutions.

The code is often less complex and does not appear to be repetitive or critical. Simply put ,a code is
a set of instructions assigned to operate a machine. The difference between an algorithm and a code.
Algorithm Code

A series of well designed steps to solve a big Advising on the operation of a machine.
problem.

Table 3 -difference between for algorithm and code(the author/2022

H.P.D.Mandara Prawarshana 37 Unit 02 - Programming


Learning Outcomes 02:

2.1 What does a programming paradigm mean ?

programming paradigm is the classification of programming languages according to their


Characteristics . that is it solves a problem using a programming language. That is even if a problem
is solved using a programming language in order to make them work , they all need to follow a
certain strategy. This can also be referred to as the programming paradigm. Martin Fowler has also
come up with a definition for this .

Any fool can write code that a computer can understand. Good programmers write code that
humans can understand.
― Martin Fowler (https://www.freecodecamp.org/)

Figure 11 -That is , it divided into 2 part(https://www.freecodecamp.org )

H.P.D.Mandara Prawarshana 38 Unit 02 - Programming


2.2 Procedural programming

Procedural programming is a programming paradigm that solves problems in a top-down or


linear manner. Procedures or subroutines are used to do out calculations. Intuitive
programming is another name for procedural programming. A program in procedural
programming is made up of data and modules/procedures that operate on it.

FORTRAN, Python, ALGOL, Pascal, C, BASIC, and Java are examples of procedural
programming languages.

Main characteristics

 Procedural programming follows a top-down approach

 Predefined functions-an instruction derived from library which is identified by specific


name and built-in high-level languages

 The program is divided into blocks of codes called functions, where each function
performs a specific task

 In a software, data is free to move about.

 It is easy to follow the logic of a program.

 By invoking another function, a function can have access to its data.

 Data and functions are separate from one another.

2.3 Procedural programming pseudo code example


Below is the pseudo code for PROCEDURAL programming

H.P.D.Mandara Prawarshana 39 Unit 02 - Programming


Figure 12 -pseudo code(the author/2022)

2.4 Procedural programming python code


Below is the python code for PROCEDURAL programming

H.P.D.Mandara Prawarshana 40 Unit 02 - Programming


Figure 13-python code for PROCEDURAL programming(the author/2022)

Figure 14 -python display(the author/2022)

H.P.D.Mandara Prawarshana 41 Unit 02 - Programming


2.5 Object-oriented programming
The programming paradigm of object-oriented programming (OOP) organizes software
design around data rather than functions and logic. An object is a data field with its own set
of properties and behaviour. Object-oriented programming (OOP) focuses on the things that
developers want to manage rather than the logic needed to do so. This method of
programming is ideally suited to big, sophisticated, and well-maintained projects.

Main characteristics

 Polymorphism: This refers to the ability to exist in several forms. An operator can be
overloaded to add two integer integers and two floats, for example.

 Data Hiding: Data can keep hidden inside the class by presenting it as private. When data
or functions declared as private, it can only accessed by the class where it defined.

 Encapsulation: Encapsulation is capturing data and keeping it safely and securely from
outside interfaces.

 Re usability: Time saving technique used by programmers because code size is reduced.
it is achieved by inheritance and here new features are added to the existing structure and
reuse it.

 Abstraction: Specifying what to do but not how to accomplish it; a versatile feature for
getting a broad overview of an object's capabilities.

 Inheritance: Process of creating a class from a base class that has all of the base class's
features as well as some of its own

2.6 pseudo Code for object -oriented programming

Below is the pseudo code for object -oriented programming

H.P.D.Mandara Prawarshana 42 Unit 02 - Programming


Figure 15 -pseudo code(the author/2022)

2.7 Python Code for object -oriented programming


Below is the python code for object -oriented programming

H.P.D.Mandara Prawarshana 43 Unit 02 - Programming


Figure 16 -object oriented python code (the author/2022)

Figure 17 -python display(the author/2022)

H.P.D.Mandara Prawarshana 44 Unit 02 - Programming


2.8 Event-driven programming

A program that is event-driven responds primarily to user events or other comparable input.
The emergence of event handlers and other resources in application development and other
forms of programming is due to the concept of event-driven programming. An event-driven
program recognizes events as they occur and replies using a suitable event-handling strategy.

Even though event-driven programming can be written in any programming language, some
languages are designed expressly for it. Event-driven programming is supported by almost all
object-oriented and graphic programming languages. Visual Basic, Visual C++, and Java are
examples of such languages.

Main characteristics

 Trigger Functions: Functions that run according to the currently happening event

 Service Oriented: It use to create applications for services and only uses a small amount
of computer processing resources.

 Time Driven: It is a code that set for time. It can be once an hour, week or a month. For
an example, user can set time to update windows.

 Events: The mouse, keyboard, and user interface are examples of events that must be
triggered in the program in order to occur, implying that the user must interact with some
object in the program.

2.9 Python Code for Event - driven programming


Below is the python code for even - driven programming

H.P.D.Mandara Prawarshana 45 Unit 02 - Programming


Figure 18 even - driven python code (the author/2022)

Figure 19 - display(the author /2022)

H.P.D.Mandara Prawarshana 46 Unit 02 - Programming


2.10 C# Code for Event - driven programming
Below is the c# code for even - driven programming

Figure 20 - c# even - driven programming(the author/2022)

C# code

Figure 21- c# code even - driven programming(the author/2022)

H.P.D.Mandara Prawarshana 47 Unit 02 - Programming


2.10 Comparison of Procedural, object-oriented and event driven
programming

Procedural programming uses a set of instructions to tell the computer how to perform
activities in a specific order. The control flow of the program is explicitly controlled here.
This approach works as a state transformation model, starting with the initial state, moving
through a series of assignments, and eventually generating the output in the final phase.
Procedural programming makes use of procedures and subroutines. Procedural
programming starts with a problem (procedure) and carefully breaks it down into sub
procedures. The downsides of this type of programming include the fact that software
maintenance can be time-consuming and difficult, and that changes to the main process (top)
might influence the sub procedures and sub-sub procedures, affecting all activities.

The notion of objects that interact with the actual world is used to develop computer
programs in object-oriented programming. The most common object-oriented programming
languages are class-based, which implies that objects are instances of classes that also
identify their types. Procedural code is easier to write for simpler code, but it gets more
complicated and difficult to manage as the program grows larger. Simple readability is
enabled by OOP, which speeds up both development and project administration.

The cornerstone for constructing software in event driven programming is events.


These events can be human actions (for example, clicking a button, pushing a key, typing, o
r speaking commands) or system events (for example, program launching). This isn't just a
programming language; it can be done in any programming language. Especially useful for
user interface design.

Below table shows differences between procedural , object-oriented and event-driven


programming.

H.P.D.Mandara Prawarshana 48 Unit 02 - Programming


2.11 Differences between Procedural , Object-oriented and Event-driven
programming.

Procedural programming Object-oriented Event-driven


programming programming

Overloading is not feasible n object- provides a graphical user


with procedural programming. oriented programming, interface for programming
overloading is feasible.

The approach to procedural A bottom- focuses on selection user


programming is top-down. up method is used in object- interface
oriented programming.

Examples: C, FORTRAN, Examples: C++, Java, actions are defined on


Pascal, Basic, etc. Python, C#, etc. events.

most common languages


Procedure abstraction is used The idea of data abstraction which follow this paradigm
in procedural programming. is used in object- are visual basic and c#
oriented programming.

In procedural programming, In object-oriented


the program is split down programming, the program
into separate components is divided into separate
called functions. portions called objects.

The unreal world is the Object-oriented


basis for procedural programming is grounded
programming. in reality

Table 4 -difference (the author/2022)

H.P.D.Mandara Prawarshana 49 Unit 02 - Programming


Learning Outcomes 03:

Ayubo Drive is the transportation division of Ayubo Leisure (Pvt) Ltd, a Sri Lank travel and t
our company. The company leases vehicles on a rental basis. The company owns a range of
car , SUV , van and ECT. The company also leases luxury vehicles. In addition, the company
also provides drivers.
The company has decided to develop software to streamline the information retrieval and
increase the security of the information. Here the company has decided to created a special
calculator. The company has taken steps to manufacture this machine to suit the company.
Below are the facts and pictures related to the calculator.

3.1 Introduction of rent service

Here the company wants to create a calculator to calculate the rent. Here the rent should be
designed so that the daily ,rent and monthly rent can be calculated. In addition, if you need a
driver, you will have to pay extra. The calculation is done according to the following
equation and c# software is used to created.

Total rent = weekly Rent x 1 + daily Rent x 3 + daily Driver Cost x 10

Below are the relevant codes and screen shot for the calculator machine design for rent using
the C# software. Here the interface is designed to make it easy for the user to control. Below
are the details of the rent calculation. Rent the rent is calculated as follows.
RENT CALULATION
In this case, the user will be required to pay the required rent.

DAY CALCULATION
Here the rent is calculated per day

LONG CALCULATON
Rent is calculated monthly or longer.

H.P.D.Mandara Prawarshana 50 Unit 02 - Programming


3.2RENT Calculation

This calculator calculates daily and monthly rent. This is designed to make it easier for the
user. That is, the following is the interface of the rental machine.

Figure 22 - rent calculation(the author/2022)

INSTRUCTIONS OF USE

Here you have to put the customer ID and the vehicle ID FIRST. The start day and end
dates of the rent must be given correctly. The number of days between those given days
should be recorded accurately. By providing that information accurately, calculations for the
day, week and monthly are performed and those calculations are displayed accurately. In
addition the total amount will be calculated after paying the drivers fee. In addition, it is
possible to add a new rent. The date collected will also be displayed. In addition, it is possible
to view the collected data.

The total amount is shown below.

H.P.D.Mandara Prawarshana 51 Unit 02 - Programming


Figure 23 -rent calculation(the author/2022)

RENT C# CODE
The following are the codes used to created the rent machine

Figure 24 - rent code(the author/2022)

H.P.D.Mandara Prawarshana 52 Unit 02 - Programming


ADD Start date and end date

Figure 25 -start and end date(the author/2022)

Figure 26 - rent calculation code (the author/2022)

H.P.D.Mandara Prawarshana 53 Unit 02 - Programming


Figure 27 -rent calculation(the author/2022)

NEW DATA ADD


Here you have to click on the new button to calculate the new rent.
Show rent
details

New
rent add

Data
save Figure 28 - new rent add(the author/2022)

H.P.D.Mandara Prawarshana 54 Unit 02 - Programming


3.3DAY Hire Calculation
This machine can calculation the daily rent. This interface can be used to collect one day
rental. The final fare can be obtained by completing the extra hour, extra KM , driver
charging with the driver ID and package ID. By completing this correctly the total rent can
be calculation. The following is an interface created to calculate one day rent

Display
Total rent

Figure 29 - day hire calculation(the author/2022)

DAY HIRE CALCULTION C# CODE


Below is the code used to calculate the one day rent. The c# software is used for this.

Figure 30 - day hire calculation(the author/2022)

H.P.D.Mandara Prawarshana 55 Unit 02 - Programming


Figure 31 - day hire calculation(the author/2022)

Figure 32- day hire calculation(the author/2022)

H.P.D.Mandara Prawarshana 56 Unit 02 - Programming


Figure 33 - day hire calculation(the author/2022)

Figure 34 - day hire calculation(the author/2022)

H.P.D.Mandara Prawarshana 57 Unit 02 - Programming


3.4LONG Hire Calculation
This is used to calculation rent on a monthly or longer basis. The following interface is used
for this purpose. The final rent can be obtained by providing the correct information for this
and this is designed so that the final rent can be seen below.

Show total rent

Figure 35 - long hire calculation(the author/2022)

LONG HIRE CALCULTION C# CODE


Below is the code used to calculate the long day rent. The c# software is used for this.

H.P.D.Mandara Prawarshana 58 Unit 02 - Programming


Figure 36- long hire calculation(the author/2022)

Figure 37 -long hire calculation(the author/2022)

H.P.D.Mandara Prawarshana 59 Unit 02 - Programming


Figure 38 long hire calculation(the author/2022)

Figure 39 long hire calculation(the author/2022)

H.P.D.Mandara Prawarshana 60 Unit 02 - Programming


Figure 40 - long hire calculation(the author/2022)

Figure 41- long hire calculation(the author/2022)

H.P.D.Mandara Prawarshana 61 Unit 02 - Programming


Fi
gure 42- long hire calculation(the author/2022)

3.5Use of IDE for application development


What is the IDE?
Developers and consumers can utilize IDEs to design software applications. Most integrated
development environments (IDEs) support many programming languages and include a
compiler/interpreter, source code editor, and debugger. The code can be distributed for
further software development after it has been validated for faults.
Because different tools do not need to be manually installed and integrated as part of the
setup process, an IDE allows developers to start writing new apps fast.

H.P.D.Mandara Prawarshana 62 Unit 02 - Programming


Features of an IDE for application development

 Compiler
Compilers convert programming languages like C and C++ into machine languages like
binary code. The compiler then checks for correctness and improves the code's performance.
 Text editor
To write and run source code, most IDEs include a text editor.
 Code completion
This functionality helps programmers by highlighting common code components that should
be incorporated while developing code. This feature helps you save time and avoid syntax
problems.
 Integrations and plugins
Because the IDE serves as a portal for building apps, the ability to integrate all other
development tools will increase workflow and productivity. Visual Studio, for example,
allows you to deal with SQL.
 Pre designed project templates
Visual Studio has a variety of project templates that support many languages and platforms,
such as windows forms apps, console apps, and web apps.
So, as I was building my app, these features came in handy since they aid with debugging by
automatically testing for faults to verify code quality, and code completion capabilities make
the coding process easier while saving time. When designing the software, these features
boosted my productivity and enjoyment.

Image 1- IDE(http://theteacher.info)

H.P.D.Mandara Prawarshana 63 Unit 02 - Programming


Learning Outcomes 04:

4.1Ayubo drive application


Ayubo Drive is a subdivision of Ayubo Leisure (Pvt) Ltd in Sri Lanka which is dedicated
for travel & tourism purposes.In addition to the calculator in the above software , a user
page, a customer page , a vehicle page and package page should be created to retain the
information. In addition it should be configured to allow new data to be entered , update
and deleted. The following vehicles should be added to the vehicle page here and then new
vehicle should be created in such a way that they can be added. The following are the
relevant vehicle.
small car
sedan car
SUVs
Jeep (WD)
7-seater van
commuter van
In addition, it hopes to add more vehicles in the future.

4.2 Main interfaces of the Ayubo Drive application

The main interface of the software are classified as login page and home page as well as
customer page ,vehicle page ,driver page, packeg, staff page and rent page. This software
first finds the login page and then the home page. Then you can see the relevant pages for
entering data.

LOGIN INTERFACE

This is the first page the user encounters. Here you will be able to log in by entering the
correct user name and password of the user. Below is the interface created for logging in
and code associated with it. This is created by linking it to a database and logging in.

H.P.D.Mandara Prawarshana 64 Unit 02 - Programming


Enter the user
name

Enter the
password

Click the Login


Button

Figure 43- Login page(the author/2022)

HOME INTERFACE

You can see the home page by logging in correctly. On the home page you will see some data
entry buttons. Here you will find six buttons per six page. This is given separately below.
 Customer page
This module supports new, update, delete and save information about customers

 Vehicle page
This module supports new, update, delete and save information about vehicle. Existing
vehicles are added to this.

 Driver page
This module supports new, update, delete and save information about driver

 Packeg page
This module supports new, update, delete and save information about packeg

 Add user/ Admin page


This module supports new, update, delete and save information about add user and admin

H.P.D.Mandara Prawarshana 65 Unit 02 - Programming


 Rent page
Here the rent is calculated. That is, the rent for one day, weekly and monthly rental vehicles
is calculated here.

The following is an interface designed for the home.

LOGIN
Page

Figure 44 - Home interface(the author/2022)

There are six buttons here. Namely customer, vehicle, packeg, driver, add user and admin and
rent(calculation). in addition, a logout button has been created here. You can see the login by
clicking on this.
These are just two of the main interface in the software. The software c# used to create and
encode these two interfaces and the encoding of these two interface is given below.

Add User Page


Information relevant to the add user id displayed on this page. Here you can enter, update
and delete user information. That is everything relevant to the user is done here. The
following is an interface created for entering Add user information.

H.P.D.Mandara Prawarshana 66 Unit 02 - Programming


Figure 45 -customer page(the author/2022)

Insert add user data


An add button has been created at this interface to add a new user. For that you have to give
the username ,password and role and click on the new button. For that, username is
“mandara” and password is “mandara123” . the following is how to add a new user.

Click the
new button

After click
the save
button

Figure 46 -add new user(the author/2022)

H.P.D.Mandara Prawarshana 67 Unit 02 - Programming


Edit add user data
the edit button is used to change the user information entered here. The following is a
modification of a users information.

1 Click edit Change


button password

2 click
Save
button

Before
change

Figure 47 - update data(the author/2022)

After providing the relevant information and making changes, click on the save button

Click
OK
button

Figure 48 -update success data(the author/2022)

H.P.D.Mandara Prawarshana 68 Unit 02 - Programming


Delete add user data
Here all the information of the user is deleted. That is, you can delete the relevant data by
selecting the desired user and clicking the delete button.

Figure 49- delete data(the author/2022)

Here a message is displayed to the user and by clicking on it the relevant data can be deleted.

Click the
delete
button

Select the
row

Figure 50 -delete data success(the author/2022)

H.P.D.Mandara Prawarshana 69 Unit 02 - Programming


4.3 AYUBO Car rent other pages

Customer page

This page display customer information and can be used to data enter, data update and data
delete information. The customer page is designed to be easy for the user to handle and the
following is the customer page.

Figure 51 customer page(the author/2022)

There are separate buttons for entering data, deleting data and updating data and a button to
go back the home page,

Vehicle page
This page display vehicle information and can be used to data enter, data update and data
delete information. The vehicle page is designed to be easy for the user to handle and the
following is the vehicle page.

H.P.D.Mandara Prawarshana 70 Unit 02 - Programming


Figure 52 - vehicle (the author/2022)

Here the vehicle types and vehicle brand are added that is the existing vehicles of the rental
company are added for this. That is as follows.

Figure 53- vehicle type(the author/2022)

H.P.D.Mandara Prawarshana 71 Unit 02 - Programming


Package page

This is page of package information and can be used to data enter, data update and data
delete information. The package page is designed to be easy for the user to handle and the
following is the package page.

Figure 54 - package page(the author/2022)

There are separate buttons for entering data, deleting data and updating data and a button to
go back the home page,

Figure 55 - home button(the author/2022)

H.P.D.Mandara Prawarshana 72 Unit 02 - Programming


Driver page

This is page of driver information and can be used to data enter, data update and data delete
information. The driver page is designed to be easy for the user to handle and the following
is the driver page. There are separate buttons for entering data, deleting data and updating
data and a button to go back the home page,

Figure 56- driver page(the author/2022)

In addition, a special machine has been create in this software which has all the above details.

4.4C# Design code(AUBO rent server software)


The c# software was used for this purpose and the codes used to create it are shown
separately below.

H.P.D.Mandara Prawarshana 73 Unit 02 - Programming


LOGIN PAGE CODE
This is designed to allow the User to log in, which can be entered by entering the correct user
name and password.

Figure 57 - login page(the author/2022)

LOGIN CODE

Figure 58 -lodging code(the author/2022)

H.P.D.Mandara Prawarshana 74 Unit 02 - Programming


Figure 59 - login code(the author/2022)

Incorrect user name and password type


That is, it is linked to the database, preventing unauthorized access.

Show massage
box

H.P.D.Mandara Prawarshana 75 Unit 02 - Programming


HOME PAGE

Figure 60 main page(the author/2022)

The main page is displayed by logging in and it is configured to go to the ports. Below are
the codes used to navigate to other pages.

Figure 61 -home code(the author/2022)

H.P.D.Mandara Prawarshana 76 Unit 02 - Programming


Figure 62 -home code(the author/2022)

INSERT CODE
Here the date entry is done. The following code is used for data entry. Here you can see the
new buttons on all pages

Figure 63 insert code (the author/2022)

H.P.D.Mandara Prawarshana 77 Unit 02 - Programming


EDIT CODE
Below is the code for updating the data , that is this button is used to update the data in the
database.

Figure 64- edit data(the author/2022)

SAVE CODE

When the data is updated , it will be saved here

Figure 65 data save code(the author/2022)

H.P.D.Mandara Prawarshana 78 Unit 02 - Programming


DELETE CODE

Data deletion takes place here. The relevant code is as follows

4.5SYSTEM DATABASE
All the information in the software is saved here. That is, it was created in the c# software
itself

CUSTOMER table

Figure 66 -customer table (the author2022)

H.P.D.Mandara Prawarshana 79 Unit 02 - Programming


VEHICLE table

Figure 67 - vehical (the author/2022)

Figure 68 vehical (the author/2022)

H.P.D.Mandara Prawarshana 80 Unit 02 - Programming


PACKAGE table

Figure 69 -packeg(the author/2022)

Figure 70 packeg(the author/2022)

H.P.D.Mandara Prawarshana 81 Unit 02 - Programming


LOGIN TABLE

Figure 71 LOGIN(THE AUTHOR/2022)

H.P.D.Mandara Prawarshana 82 Unit 02 - Programming


4.6Importance of coding standard for the team as well as for the individual

Imagine that someone writes a program without proper coding standards, it will be really
difficult for other people to understand it and make changes and even the same programmer
will be unable to understand it after few years if he did not adopt proper coding methods.
So ,code should be simple without too many functionalities and all the aspects of code should
be explicitly explained without hiding anything. the programmer who writes the code should
keep in mind that he/she will not be able to edit code every time therefore code should be
well
documented and readable so that any other programmer in the company can makes changes
to
the code.
Moreover, software development organizations concern whether their programmers maintain
the coding standards because the code will be so complicated to understand and modify when
coding standards are not adopted
therefore ,when working as a team in an office environment, coding standard gives an even
look to the codes made by different programmers. It makes code readable, consistent and
reduces complexity. It aids reusability of the code and helps to detect errors while increasing
efficiency of the software made by programmers. A good programmer is always conscious
about the consistency and flexibility of the code so that it can be easily modified by other
programmers in the team for future requirements.
A coding standard make sure that all programmers within the team writing the code in a
specific programming language following some rules. coding standards reduce many issues
associated with project failures and extra cost incurred in the project. As an
individual ,knowing
these good practices in coding will improve programming skills required to enter the carrier
as
a programmer and the demand for his/her knowledge in the workplace.

H.P.D.Mandara Prawarshana 83 Unit 02 - Programming


Reference

GeeksforGeeks. 2022. Analysis of Algorithms | Big-O analysis - GeeksforGeeks. [online] Available at:
<https://www.geeksforgeeks.org/analysis-algorithms-big-o-analysis/> [Accessed 30 April
2022].

wikipedia.org. 2022. Algorithm - Wikipedia. [online] Available at:


<https://en.wikipedia.org/wiki/Algorithm> [Accessed 1 May 2022].

Introduction of Programming Paradigms - GeeksforGeeks. [online] Available at:


<https://www.geeksforgeeks.org/introduction-of-programming-paradigms/> [Accessed 1
May 2022].

Procedural programming - Wikipedia. [online] Available at:


<https://en.wikipedia.org/wiki/Procedural_programming> [Accessed 3 May 2022].

Object-Oriented Programming in C++. [online] Available at:


<https://www.educative.io/courses/learn-object-oriented-programming-in-

cpp/myN3AMzrrKG?aid=5082902844932096&utm_source=google&utm_medium=paid&
utm_campaign=dynamic_core&utm_term=&utm_campaign=%5BDynamic%5D+Program
ming+Verticals&utm_source=adwords&utm_medium=ppc&hsa_acc=5451446008&hsa_ca
m=16452540641&hsa_grp=134303344735&hsa_ad=585203141479&hsa_src=g&hsa_tgt=
dsa-
831905621435&hsa_kw=&hsa_mt=&hsa_net=adwords&hsa_ver=3&gclid=Cj0KCQjwpv2
TBhDoARIsALBnVnlSRd9vLbVTuK4bNULGpue4eWENoq9OqN8nLsHsHvzu93pV1tmr
zQwaAgEbEALw_wcB> [Accessed 3 May 2022].

Event-Driven Programming. [online] Available at:


<https://www.tutorialspoint.com/concurrency_in_python/concurrency_in_python_eventdri
ven_programming.htm> [Accessed 4 May 2022].

H.P.D.Mandara Prawarshana 84 Unit 02 - Programming

You might also like