programming assignment
programming assignment
Assignment title Design &Implement a GUI based system using a suitable Integrated
Development Environment
Student’s name
H.P.Dileesha Mandara Prawarshana
Give details:
Internal Verifier
Date
signature
Programme Leader
Date
signature (if required)
LO1. Define basic algorithms to carry out an operation and outline the process of programming an application.
LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an analysis of a suita
Integrated Development Environment (IDE).
LO4. Determine the debugging process and explain the importance of a coding standard.
Pass, Merit & Distinction Descripts P4 P5 M4 D4
* Please note that grade decisions are provisional. They are only confirmed once internal and external moderation has taken place and
grades decisions have been agreed at the assessment board.
Assignment Feedback
Action Plan
Summative feedback
Assessor Date
signature
mandarasfh@gmail.com 12/05/2022
Student Date
signature
1. A Cover page or title page – You should always attach a title page to your assignment.
Use previous page as your cover sheet and make sure all the details are accurately filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.
1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
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
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.
mandarasfh@gmail.com 12/05/2022
Student’s Signature: Date:
(Provide E-mail ID) (Provide Submission Date)
Unit Tutor
Issue Date
Submission Format
1. Written Report
This submission is in the form of an individual written report. This should be written in a concise, formal
business style using single spacing and font size 12. You are required to make use of headings, paragraphs
and subsections as appropriate, and all work must be supported with research and referenced using the
Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. (The
recommended word count is 1,500–2,000 words for the report excluding annexures)
3. Presentation
With the submitted system student should do a presentation to demonstrate the system that was
developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint slides while doing the
presentation, but live demonstration of the system is required. Evaluator will also check the ability to
modify and debug the system using the IDE.
LO4. Determine the debugging process and explain the importance of a coding
standard
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
Define what an algorithm is and outline the characteristics of a good algorithm. Write the
algorithms to display the Fibonacci series and the factorial value for a given number using
Pseudo code. Determine the steps involved in the process of writing and executing a
program.
Take a sample number and dry run the above two algorithms. Show the outputs at the end
of each iteration and the final output. Examine what Big-O notation is and explain its role in
evaluating efficiencies of algorithms. Write the Python program code for the above two
algorithms and critically evaluate their efficiencies using Big-O notation.
Activity 2
2.1 Explain what is meant by a Programming Paradigm and the main characteristics
of Procedural, Object oriented and Event-driven paradigms and the relationships
among them. Write small snippets of code as example for the above three
programming paradigms using a suitable programming language(s). you also need to
critically evaluate the code samples that you have given above in relation to their
structure and the unique characteristics.
Ayubo Drive is the transport arm of Ayubo Leisure (Pvt) Ltd, an emerging travel & tour
company in Sri Lanka. It owns a fleet of vehicles ranging from cars, SUVs to vans.
The vehicles that it owns are hired or rented with or without a driver. The tariffs are based on
the vehicle type. Some of the vehicle types that it operates are, small car, sedan car, SVUs, Jeep
(WD), 7-seater van and Commuter van. New vehicle types are to be added in the future.
1. Rent (With or without driver) – For each type of vehicle rates are given per day, per week
and per month. Rate for a driver also given per day. Depending on the rent period the total
rent amount needs to be calculated. For example: if a vehicle is rented for 10 days with a
driver, total amount to be calculated as follows:
2. Hire (with driver only) – These are based on packages such as airport drop, airport pickup,
100km per day package, 200km per day package etc. Standard rates are defined for a
package type of a vehicle typeif that is applicable for that type of vehicle.For each package
maximum km limit and maximum number of hours arealso defined. Extra km rate is also
defined which is applicable if they run beyond the allocated km limit for the tour. For day
tours if they exceed max hour limit,a waiting charge is applicable for extra hours. Driver
overnight rate and vehicle night park rate also defined which is applicable for each night
when the vehicle is hired for 2 or more days.
Activity 3
Write suable algorithms for vehicle tariff calculation for rents and hires. Ideally 3
functions should be developed for this purpose as above. Use the visual studio IDE
(using C#.net) to Implement the above algorithms and design the suitable database
structure for keeping the tariffs for vehicle types and different packages which must be
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.
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.
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
Acknowledgement ..............................................................................................................................18
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
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.
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?)
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
process
Decision
Connector
Flow direction
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.
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.
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.)
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
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
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.
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
Flowchart
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)
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.
Notation Name
O(1) Constant
O(N) Linear
O(N2) Quadratic
O(LogN) Logarithmic
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.
Any fool can write code that a computer can understand. Good programmers write code that
humans can understand.
― Martin Fowler (https://www.freecodecamp.org/)
FORTRAN, Python, ALGOL, Pascal, C, BASIC, and Java are examples of procedural
programming languages.
Main characteristics
The program is divided into blocks of codes called functions, where each function
performs a specific task
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
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.
C# code
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.
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.
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.
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.
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.
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.
RENT C# CODE
The following are the codes used to created the rent machine
New
rent add
Data
save Figure 28 - new rent add(the author/2022)
Display
Total rent
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)
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.
Enter the
password
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
LOGIN
Page
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.
Click the
new button
After click
the save
button
2 click
Save
button
Before
change
After providing the relevant information and making changes, click on the save button
Click
OK
button
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
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.
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.
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.
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.
There are separate buttons for entering data, deleting data and updating data and a button to
go back the home 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,
In addition, a special machine has been create in this software which has all the above details.
LOGIN CODE
Show massage
box
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.
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
SAVE CODE
4.5SYSTEM DATABASE
All the information in the software is saved here. That is, it was created in the c# software
itself
CUSTOMER table
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.
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].
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].