Sample Programming Assignment PDF
Sample Programming Assignment PDF
Sample Programming Assignment PDF
Assignment title
Student’s name
List which assessment criteria Pass Merit Distinction
the Assessor has awarded.
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.
Action Plan
Summative feedback
Assessor Date
signature
Student Date
signature
Important Points:
1. Check carefully the hand in date and the instructions given with the assignment. Late
submissions will not be accepted.
2. Ensure that you give yourself enough time to complete the assignment by the due date.
3. Don’t leave things such as printing to the last minute – excuses of this nature will not be
accepted for failure to hand in the work on time.
4. You must take responsibility for managing your own time effectively.
5. 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.
6. Failure to achieve at least a PASS grade will result in a REFERRAL grade being given.
7. Non-submission of work without valid reasons will lead to an automatic REFERRAL. You will
then be asked to complete an alternative assignment.
8. Take great care that if you use other people’s work or ideas in your assignment, you properly
reference them, using the HARVARD referencing system, in you text and any bibliography,
otherwise you may be guilty of plagiarism.
9. If you are caught plagiarising you could have your grade reduced to A REFERRAL or at worst
you could be excluded 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.
Unit Tutor
Assignment Title Design & Implement a GUI based system using a suitable
Integrated Development Environment
Submission Format
1. Written Report
This submission is in the form of an individual written report. This should be written in a concise, formal
business style using single spacing and font size 12. You are required to make use of headings,
paragraphs and subsections as appropriate, and all work must be supported with research and
referenced using the Harvard referencing system. Please also provide a bibliography using the Harvard
referencing system. (The recommended word count is 1,500–2,000 words for the report excluding
annexures)
3. Presentation
With the submitted system student should do a presentation to demonstrate the system that was
developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint slides while doing the
presentation, but live demonstration of the system is required. Evaluator will also check the ability to
modify and debug the system using the IDE.
LO1. Define basic algorithms to carry out an operation and outline the process of
programming an application.
LO4. Determine the debugging process and explain the importance of a coding
standard
Activity 1
Searching on an array/list is to find a given element on the array and return whether it is found
or not and return its position if found. Linear search and binary search are two popular
searching algorithms on arrays.
1.1 Define what an algorithm is and outline the characteristics of a good algorithm. Develop
algorithms for linear search and binary search using Pseudo code.
1.2 Describe the steps involved in the process of writing and executing a program. Take an
array of 10 or more elements and dry run the above two algorithms. Show the outputs at
the end of each iteration and the final output.
1.3 Define what Big-O notation is and explain its role in evaluating efficiencies of algorithms.
Write the Python program code for the above two algorithms and critically evaluate their
efficiencies using Big-O notation.
Activity 2
2.1 Define what is meant by a Programming Paradigm. Explain the main characteristics of
Procedural , Object oriented and Event-driven paradigms and the relationships among
them.
2.2 Write small snippets of code as example for the above three programming paradigms using
a suitable programming language(s).
2.3 Critically evaluate the code samples that you have 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
Unit 01: Programming 10
Assignment 01
(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 type if that is applicable for that type of vehicle. For each package
maximum km limit and maximum number of hours are also 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
3.1 Design suable algorithms for vehicle tariff calculation for rents and hires.
3.2 Implement the above algorithms using visual studio IDE (using C#.net) and design the
suitable database structure for keeping the tariffs for vehicle types and different packages
which must be used for implementing the above functions.
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 for Ayubo drive. This includes the
completing the database design started in 3.2 and implementing one or more GUIs for
vehicle, vehicle type, and package add/edit/delete functions. It essentially requires an
interface for hire calculation and recording function described above. Generating customer
reports and customer invoices are not required for this course work.
4.2 What is debugging an application? Explain the features available in Visual studio IDE for
debugging your code more easily. Evaluate how you used the debugging process to develop
more secure, robust application with examples.
4.3 Explain the coding standards you have used in your application development. Critically
evaluate why a coding standard is necessary for the team as well as for the individual.
20-27
P1 Provide a definition of what an algorithm is and outline
the process in building an application.1.1
26-27
M1 Determine the steps taken from writing code to
execution.
61-63
M2 Analyze the common features that a developer has
access to in an IDE.
44-46
D2 Critically evaluate the source code of an application,
which implements the programming paradigms, in terms of
the code structure and characteristics.
48-60
P3 Write a program that implements an algorithm using an
IDE.
64-87
M3 Use the IDE to manage the development process of the
-program.
95-98
P4 Explain the debugging process and explain the
debugging facilities available in the IDE.
99-101
P5 Outline the coding standard you have used in your code.
95-98
M4 Evaluate how the debugging process can be used to
help develop more secure, robust applications.
99-102
D4 Critically evaluate why a coding standard is necessary in
a team as well as for the individual.
1.1 Define what an algorithm is and outline the characteristics of a good algorithm.
Develop algorithms for linear search and binary search using Pseudo code.
The algorithm is a process or formula for solving the problems. It is based on conducting a
sequence of specified actions. It is commonly used for data processing, calculation, and other
related computer and mathematical operations. In computer programming, by using
algorithms we can create functions. Those functions can serve as small programs that can be
mention by a larger program.
When we think of an algorithm is in the most common way it is not just in regards to
computer algorithms are in everywhere. Such as a recipe for making a food is an algorithm.
The technique we use to solve the addition or long division problems are an algorithm and
the process of folding a shirt or a pair of pants are an also algorithm. Even our morning
routine could be considered an algorithm (Techtarget.com, 2018).
An example for algorithm to calculate its average and then display the result.
Begin
Input a,b,c,d,e
Total = a+b+c+d+e
Average = total/5
Print average
End
Flow chart
We can use simple symbols and arrows to describe relationships in a flow chart. In a
flowchart, the Start and end of programs are represented by an oval shape. An input/output is
represented by the parallelogram, An a process is represented by a rectangle shape, a decision
is represented by a diamond shape and the flow line is represented by an arrow
(Techtarget.com, 2018).Flow chart Symbols
Start/End
Process
Input /Output
Decision
Pseudocode
The pseudocode is an informal method of a programming that is does not required any strict
programming language syntax or fundamental technology. It can be used for creating an
outline or a rough draft of program. Pseudocode is sometimes used as a detailed step by step
in the process of developing a program. The pseudocode is allows to designers or lead the
programmers to show the design in a great details and also provides programmers a detailed
design for the next procedure of writing code in a specific programming language.
(economictimes.indiatimes.com, 2018).
Begin
Marks= 45
If Marks > = 75 Then
Grade = “Distinction”
Else If Mark > = 55 Then
Grade =”Credit”
Else If Mark> = 35 Then
Grade = “Pass”
Else
Grade = “Fail”
End If
End If
End If
Print Grade
End
Finiteness-: an algorithm is should be terminate without any number of steps and each step
must be finish in finite amount of time.
Definiteness-: the procedure of algorithm is should be clearly and exactly define and there
should not be any uncertainty.
Input-: an algorithm is must have zero or more but must be limitation number of inputs.
Output -: an algorithm should have one or more defined outputs and should match the desired
output.
Uniqueness-: the each step taken in the algorithm should give a definite result. The results
should not change by any means.
Feasibility-: the algorithm should be possible and practicable in real life. It should not be
abstract or imaginary.
Precision-: a good algorithm must have some outlined steps. The steps should be exact
enough and not variable (Owlgen.com, 2018).
Liner search
The linear search is a very simple and basic search algorithm. In Linear search we search an
element or value in a provide array by traversing the array from the starting until the desired
element or value is found (studytonight.com, 2018).
Example:-
BEGIN LINEARSAERCH
lastIndex = ARRAYLENGTH(array)`
FoundIt = false
Index = 1
Read Find
FoundIt = true
ENDIF
index= Index + 1
ENDWHILE
ELSE
ENDIF
END LINEARSAERCH
Rather than searching individual elements sequentially a sorted array can be more efficiently
searched using binary search. We compare the middle element and continue the search on
upper or lower half or the array based on the value is greater or smaller than the middle. This
continues until the value is found at the middle or until we confirm the value is not present
(Geeksforgeeks, 2018).
Example -:
A program is a set of step-by-step instructions that directs the computer to do the tasks we
want it to do and produce the results we want (homepage.cs.uri.edu, 2017)
The most important steps in write and executing a computer program would be like this
Dry run
The dry run is can be test or check performed on a program. Run to check the performance
or stability of a particular program before it is made available (computerhope.com, 2018).
The dry run conducted by using a trace table. Trace table is track the values of variables as
they change throughout the program. This is useful when a program is not producing the
desired result (101computing.com, 2018)
[2,5,9,12,33,47,24,50,67,3] 33 0 2 False
1 5 False Found
2 9 False
3 12 False
4 33 True
[2,5,9,12,33,47,24,50,67,3] 50 0 2 False
1 5 False Found
2 9 False
3 12 False
4 33 False
5 47 False
6 24 False
[2,5,9,12,33,47,24,50,67,3] 99 0 2 False
1 5 False
2 9 False
Not Found
3 12 False
4 33 False
5 47 False
6 24 False
7 50 False
8 67 False
9 3 False
[2,9,14,22,38,29,46,58,66,90] 14 0 9 4
0 3 1
2 3 2 Found
[2,9,14,22,38,29,46,58,66,90] 29 0 5 Found
[2,9,14,22,38,39,46,58,66,90] 90 0 09 5
8 09 09
8 09 9
09 09 09 Found
O(1) Constant
O(N) Linear
O(N2) Quadratic
O(LogN) Logarithmic
This is called constant. O(1) is describes an algorithm that will be always execute in the
equal time regardless of the size of the input data set. The algorithm does a constant number
of operations independent on the input (rob-bell.net, 2009).
Linear O(N)
This is called has linear O(N) is a describes the algorithm is which performance will be raise
the linearly and in the direct proportion to the size of the input data set. The best example
for linear time complexity is the linear search where an element is searched through an array
sequentially. The time depends on the amount of elements in the array (rob-bell.net, 2009).
Quadratic O(N²)
This is call quadratic. The running time of the algorithm is as a result of performing a linear
operation N times. So it’s N multiplied by N. An a common sorting algorithms like bubble
sort, selection sort and insertion sort takes O(N²). This is common with algorithms that
involve nested iterations over the data set. Deeper nested iterations will result in O(N 3),
O(N4)and etc. (rob-bell.net, 2009).
Logarithmic O(LogN)
This is called logarithmic. The running time of the algorithm is decreased by some factor
with each step. A very simple and small example of this type is an algorithm that keeps
dividing the input by two. A binary search algorithm follows the same rule (rob-bell.net,
2009).
arr = []
print(arr)
# searching element
position = 0
if item == arr[position]:
break
break
position += 1
In linear search a particular element is searched through an array in a sequential order. If the
provided array contains a few elements, finding the required. Element is easy, but if the array
contains more elements, then it will appear a bit tough as it will consist more and more time.
Therefore this can be considered as an time complexity notation where the consummation
depends on the on the size of the input.
lst = []
for n in range(size):
numbers = int(input("Enter any number: \t"))
lst.append(numbers)
lst.sort()
print('\n\nThe list will be sorted, the sorted list is:', lst)
x = int(input("\nEnter the number to search: "))
binary_sort(lst, size, x)
In the python code a While search is being found which needs to be run until the define
condition is met. Once the condition is met the code starts to execute the next set of
instructions. Once it is done a if condition is being given as to check whether the predefined
condition is met. According to this it is seen that the time consumed depend on the list of
elements available. But in Binary Search, the elements are divided into 2, thus it will reduce
the time. There for as the notation for efficiency it could be stated as O(Log n).
The programming paradigm is the way of a thinking about or approaching the problems
and also programming paradigm is an important style of a build the structure and
elements of the program. The styles and capabilities of the programming languages are
describe by their paradigms (Quora.com, 2017).
Procedural
Procedural programming is a list of instructions to telling a Computer Step-by- Step. In
an order of how to performance the first Code to the Second and So forth which may
contain loops (Prezi.com, 2011).
The main characteristics of procedural paradigm
The first most important paradigm is puts much importance on Things to be done. And
also the large problems are divided into a smaller programs known as a functions. The
most of the functions are share global data and data move openly around on the system
from function to functions. The functions are transfer data from one form to another form.
Also top down approach in the program designing. And also finally appropriate and
effective techniques are unavailable to secure data of a function from others
(onlineclassnotes.com, 2013).
Object oriented
Object orientated is the programmer examines the problem in an old fashioned way. It
does not write and algorithm but instead breaks down the problem of elements into
classes the process used to create an object is called instantiation (Prezi.com, 2011).
The most important and the first object oriented paradigm is encapsulation an
encapsulation is a capturing data and keeping it safely and securely from the outside
interfaces. And also inheritance is the process by which a class can be derived from a
base class with all the features of base class and some of its own. This increases code
reusability. The variety is the ability to the exist in various forms. For example an
operator can be over loaded so as to the add a two integer numbers and add two floats.
And also finally abstraction is the ability to the represent the data at a very conceptual
level without any details. They are characteristics of the object oriented paradigm
(careerride.com, 2016).
Event-driven paradigms
Event driven paradigm which is determined by events or user actions. An example we can
get clicking on a mouse. It can only be used using a graphical user interface. Which is one
of its main features. It can interact with any hardware that is attached to a computer and it
is not a Complex program to use. A program can easily be developed and all of the
properties used in the program are all independent so they can save altogether saving the
programmer time and effort saving them separately (Prezi.com, 2011).
The procedural paradigm is we looking at the process needed to solve a problem. There a
definite process and the flow of the data is highly predictable.
Also the object oriented is we observing at the actors and the creating a objects to
represent those actors. For an example and an emulator for a movie line queue. We have
got people the line and a ticket booth. So we build objects around those actors.
The event driven is a used when we have impulsive the moments that need to be taken
care of. We can add some event handlers to the both procedural and the object oriented
paradigms. So as a standalone, it’s not a complete paradigm. For the instance the
procedural report writer a could have an a event to handle out of the papers or the object
oriented program could be have an a event to the handle. when lightning hits a person
standing line for the movie. Events are more a feature to add to other stuff.
In this C++ program the user is asked to enter three numbers and also this program is
finds out the largest number of the among three numbers entered by the user and the
displays it with a proper message.
#include "stdafx.h"
#include <iostream>
A simple calculator is created using C# console applications where the sum of the two
numbers entered by the user is displayed. And the difference between the two numbers
entered will be displayed below.
namespace consoleApplication5
{
public class oopprogram
{
public class simplecalculator
{
public double add(double number1, double number2)
{
return number1 + number2;
}
{
Console.Write("Type your first Number: ");
import turtle
turtle.setup(400,500)
wn = turtle.Screen()
wn.bgcolor("lightgreen")
tess = turtle.Turtle()
tess.color("blue")
tess.pensize(3)
tess.shape("turtle")
tess.goto(x, y)
wn.mainloop()
#include "stdafx.h"
#include <iostream>
In the first example this codded example Procedural programming paradigm using the
programming language C++. When referring the structure of this code the header files need
to be predefined. Then the input and out needs to be declared using cin and cout variables.
Cout is used to define the phrase to be displayed. The phrases written in front couts is
displayed in the console window when the program is being run. Once the output is
declared the numbers entered by the user is declared. 3 if conditions are being used to
choose between the 3 numbers as to find out which one is the largest number.
The user can able to enter the values of his choice. The declared variable n1, n2 and n3 is
being used here.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace consoleApplication5
{
public class oopprogram
{
public class simplecalculator
{
public double add(double number1, double number2)
{
return number1 + number2;
}
the programmer makes it easy. However there are two main classes <oopprogram> and
<simplecalculate> and we have the <main> method under the <oopprogram> class. The
<total> function under the <simplecalculate> class. The one of the unique features of object-
oriented programming is that it has classes and objects. In this code almost all have public
access specifiers.
Classes
Object
Method
import turtle
turtle.setup(400,500)
wn = turtle.Screen()
wn.title("How to handle mouse clicks on the window!")
wn.bgcolor("lightgreen")
tess = turtle.Turtle()
tess.color("blue")
tess.pensize(3)
tess.shape("triangle")
In our last example python language is being used to code the event driven program. I used
mouse click event on this program. An a mouse click event is for an each widget it’s
possible to bind python functions and methods to an event. If the defined event occurs in the
widget, the handler function is called with event object describing the event. Every time we
move the mouse in the message widget, the position of the mouse pointer will be printed
(python-course.eu, 2017).
Here the coded program actually uses python turtle, which is used in drawings in python. A
mouse event is a bit different from a keypress event because its handler needs two parameters
to receive x, y coordinate information telling us where the mouse was when the event
occurred.
So what this program does is move the turtle and draw a line to wherever the mouse is
clicked and this program is very is to use. An a mouse click event is very useful and import
event.
3.1 Design suable algorithms for vehicle tariff calculation for rents and hires. Ideally 3
functions should be developed for this purpose as follows:
Rent calculation
int charges = 0;
if (numberDays < 7)
{
charges = day * 2000; //2000 per
day charges
}
if (numberDays >= 7 || numberDays < 30)
{
charges = week * 8500 + day * 2000; //8500 per
week charges
}
if (numberDays >= 30)
{
charges = month * 32000 + week * 8500 + day * 2000; //32000 per
month charges
}
if (checkBox1.Checked)
{
Check = 1500 * numberDays; // per
Driver Charge
}
if (checkBox2.Checked)
{
Check = 0;
}
maximumkm = int.Parse(textBox9.Text);
priceperkm = int.Parse(textBox10.Text);
textBox5.Text = Extra.ToString();
textBox7.Text = THC.ToString();
driverovernightcharge = int.Parse(textBox7.Text);
if (numberDay > 2)
{
overnight = (numberDay - 2) * 500 + parking+ driverovernightcharge;
}
customername = textBox12.Text;
customercontactno = int.Parse(textBox13.Text);
packagetype = textBox9.Text;
vehicaletype = comboBox1.Text;
vehicleno = textBox1.Text;
maximumkm = int.Parse(textBox3.Text);
pricepercharge = int.Parse(textBox8.Text);
driverovernightcharge = int.Parse(textBox7.Text);
if (numberDay > 2)
{
driverovernightcharge = (numberDay - 2) * 250;
}
Database structure for keeping the tariffs for vehicle types and different packages.
The system is supported by two databases. Where login database stores the login information
and the Login activity log. The vehicle tariff and packages details are two tables have been
created under this database. While the database stores the vehicle details and package details
respectively and it is able to easily insert, update and delete the data within the database.
Before delete
After delete
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "insert into vehicalregistration values('" +
textBox1.Text + "','" + comboBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text
+ "')";
cmd.ExecuteNonQuery();
con.Close();
data_view();
MessageBox.Show("Vehical Registration Inserted successfully!");
Before update
Debugger
The debugger is helps to observe the run time behavior of the program and find the
problems. The debugger is works with all the Visual Studio programming languages and
there are associated libraries. The debugger we can break the execution of the program to
examine the all code ,examine and edit the all variables, view the registers, see entirely the
instructions created from the source code and view the memory space used by the
application (msdn.microsoft.com, 2015).
Compiler
This compiler tool is help to transforms the source code written in a human readable and
writable language into the form executable by the computer.
The source code editor is the text editor program it’s help to designed a specifically for the
editing source code of a computer programs. It’s may be standalone application or it may be
built into an integrated development environment (IDE) or web browser.
And also the source code editors are to a fundamental programming tool as a fundamental
job of the programmers is to write and edit the source code
Debugger
The debugger is works with all visual Studio program. In the Visual Studio program context
when the debug the application it usually mean that we are running the application with
debugger attached so that is in debugger mode. The errors are show in the error list when
the application is being debugged. If Integrated development system (IDE) is not using in
visual studio errors could not be identify until the program is entire run.
Display the error Message
The source code editor is the text editor program it’s help to designed a specifically for the
editing source code of a computer programs. In the role of the source code editor Visual
Studio Code is allows to changing the code page in which the active document is saved, the
character that identifies line break and the programming language of the active document.
Once the program is being run it is also able to edit the source code while on run mode in
order to adjust any mistakes. If an IDE has not been used the entire code need to be typed
manually and there is a higher percentage to make errors.
Visual Studio contains a built in compact Structured Query Language version where
database can be created within Visual Studio without creating a database using a database
software and exporting it to Visual Studio. This makes programmer’s workload less and the
Compiler
Visual Studio contains an inbuilt compiler, which converts the source code into machine
code automatically, and it saves the time of the programmer. If the IDE does not contain the
compile in built source, code has converted to the machine code separately otherwise, the
machine would not understand the given instructions.
4.1 Design and build a small system to calculate vehicle hire amounts and record them
in a database for customer billing and management reporting for Ayubo drive. This
includes the completing the database design started in 3.2 and implementing one or
more GUIs for vehicle, vehicle type, and package add/edit/delete functions. It
essentially requires an interface for hire calculation and recording function described
above. Generating customer reports and customer invoices are not required for this
course work.
A login page designed using role base facility. The logins are available within the
database Login which is created to store the user name, password and user type. All three
fields should tally in order for a particular user to login.
Two users are included and they are Admin and Receptionist.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Ayubo_Leisure
{
public partial class Form1 : Form
{
SqlConnection con = new SqlConnection(@"Data Source=DESKTOP-
LVB5OI9\SQLEXPRESS;Initial Catalog=Login;Integrated Security=True");
public Form1()
{
InitializeComponent();
timer1.Start();
}
sda.Fill(dt);
string cmbItemValue = comboBox1.SelectedItem.ToString();
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (dt.Rows[i]["usertype"].ToString() == cmbItemValue)
{
MessageBox.Show("You are successfuly login as" + dt.Rows[i]
[2]);
if (comboBox1.SelectedIndex == 0)
{
this.Hide();
Form8 fr = new Form8();
fr.ShowDialog();
}
else
{
this.Hide();
}
}
else
{
MessageBox.Show("Incorrect username and password!");
}
}
}
}
}
Login as a admin
If I login as admin it display main menu like this. There are three functions available in main
menu.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Ayubo_Leisure
{
public partial class Form8 : Form
{
public Form8()
{
InitializeComponent();
}
this.Hide();
Form3 fr = new Form3();
fr.ShowDialog();
}
this.Hide();
{
this.Hide();
Form1 fr = new Form1();
fr.ShowDialog();
}
}
}
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "insert into vehicalregistration values('" +
textBox1.Text + "','" + comboBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text
+ "')";
cmd.ExecuteNonQuery();
con.Close();
data_view();
MessageBox.Show("Vehical Registration Inserted successfully!");
Before update
If I login as receptionist it display main menu like this. There are three functions available in
main menu and they are.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Ayubo_Leisure
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
con.Close();
data_view();
MessageBox.Show("Upadted Successfully!");
}
The debugging application is the routine the process of a locating and the removing computer
program bugs, errors and abnormalities. Which is methodically handled by the software
programmers through debugging tools and also debugging checks detects and corrects errors
or a bugs to the allow proper program operation according to the set of specifications and also
the debugging is also known as debug.
And also developing the software programs are undergo heavy testing ,updating
,troubleshooting and the maintenance and also usually the software include errors and the
bugs. Which are the routinely removed. In this debugging process complete software
programs are regularly compiled and the executed to the identify and rectify the issues. The
large software programs which contain millions of the source code lines are divided into the
small components. For an efficiency each component is the debugged separately at first
followed by the program as a whole (economictimes.indiatimes.com, 2018).
Debugging menu
The top level debug menu has the most common debug commands
The break point is an intentional stop marked in the code of the application where execution
pauses for the debugging. This is allows the programmer to inspect the internal state of the
application at that point.
Run to click
The run to click is a related to setting a temporary breakpoint and also run to click is
a near for getting the around quickly within a visible the region of app code.
The exception is an indication of an error state that is occurs to while a program is being
executed. We can be should provide the handlers that respond to the most important
exceptions.
Configuration manager have been used to choose the method of debugging of with ion the
various phases in the process. The active solution platform is not and the configuration mode
can be choose from debug and release.
In my case I have used the debugging process broadly in developing my applications, which
is fairly significant. It kind of has done a main role in identifying and spotting many faults
and errors in my application code helping me to correct that faults and errors. However,
almost many of my applications developed literally are so huge in context of code and
complexity. The application is created in this valuation is an example of it in a generally main
way.
Creating these types of applications confidently basically had generally
lot of fault and errors in it, but however the debugging features are in the Visual studio IDE
usually has done a absolutely great role in the resolving them one of the basically main ways
I mostly got very out of fault and errors was, when the Visual studio IDE identifies faults and
present the errors with its place.so it very easy and useful to solve problems. However
particularly many logical errors will be automatically identified by the visual studio IDE. But
the Breakpoints feature for all intents and purposes has actually helped me in identifying
those conceptual errors in my code. The figure shows the way I used the breakpoints feature
to debug my application, which specifically is quite significant. However, when debugging
the application it is possible to identify the errors and faults, which have been created in the
system. When these errors are identified beforehand, therefore it is possible for use to make
sol.
Using the process of debugging it was able to identify the errors with in they stem easier to
identify the errors before hand. In case we have missed to declare a variable it will be shown
from the debug and will assist us in redirecting and understanding as what the error is.
Figure 54 Exception
Coding stands are can be accepted as a collection of procedure for a specific programming
language that determines the programming style, procedure methods for various aspects of
the program written in that language. There are some critical attributes of software
development (webguruz.in 2017).
Coding stands for ensure that all developments write the code in a particular meaningful
language write according to the guidelines specified. This makes the code easy to understand
and provides counting in the code.
One of most essential factors in software system is the consisting of the coding standard. This
is because of it positively affecting the quality of the system, during the time the use of
software system, we need to ensure that the guideline do not deny each other. The source
code that use the stand should be also be harmony with the standard. The completed source
code should introduce as if a single developer has written the code. .
Increase efficiency
Reduce complicity
Minimize the risk of project failure
Maintains should be easy
Correction of bugs
A comprehensive view
On developing this application, I have used some of several coding standards and they are I
have used a good file structure, use of comments, indentation patterns and variable
declaration. However, these coding standards are very useful and important to my Ayubo
drive application.
Use of comments
When making databases the renaming of the tables have been done according to the name of
the form.
The variables are being declared at the beginning in each if the code in order to specify the
type of the data type that can be entered I the particular field. All the varaibles are to be
declared were used with the full name as it would be very easy for me to understand.
Indentation patterns
Indentation is one of the most important aspects in any programming domain. Indentation is
the placement of text farther to the right, or left, to separate it from surrounding
text. Indent style, in programming a convention governing the indentation of blocks of code
to convey the program structure.
When developing application in a team, its highly important to have coding standards.For
example Coding guidelines also help software developing teams to write consistent code
which is easy to read and understand for all team members. Establishing such guidelines can
be problematic if it is done wrong but it will be very beneficial for the whole team if it is
done the right way. The codeing standards in a team help to reduce the risk of project falier
and also the following codeing standets help to developer for the maintent of the software .
The codeing standets in a team help to minimize the risk of project failer and it reduce the
compleccity. Another important benefit for a team is to identify the ongoing process of the
fellow team members who may be developing a different part of the same process of the
application. If a proper coding standard were maintained within a team, it would be able to
switch between teams as anytime as everyone is familiar with the process of development.
When codeing standats are followed it is to make changes to the code when ever needed.
Actually the coding standards are very important and useful for a team.
Coding standard is very very highly important when we work as induvidually. It is not the
way in which a team develops a program, an individual would develop it. For a individual
following coding standards helps to get a clear idea of what is happening within the code and
also in case the devolopeing of the code it’s be stop the completion of theprogramme code be
given to a onther individual it is also possiable. How ever, another important benefit if that it
is possible to transfer the project to another programmer it can be done without a mess, as it
is easy to understand the coding if a single pattern is followed throughout the program. When
developing as an individual if coding standards are followed it will help the individual to
adapt to changes where he can go with the modern methods. If proper coding standards are it
is possibale to make changes to the system in a way that any one could understand. Finally
the coding standard are very important for individual.