You are on page 1of 64

Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Table of Contents
Task: 01...........................................................................................................................................7
1.1 Object Oriented Programming Language..............................................................................7
1.1.1 What is the Programming Language..............................................................................7
1.1.2 Generation of programming language............................................................................7
Task: 02.........................................................................................................................................15
2.1 Objects of “Super Sonic” Company....................................................................................15
Task: 03(a).....................................................................................................................................17
3.1 Class Diagram......................................................................................................................17
Task: 03(b).....................................................................................................................................18
3.2 Sequence Diagram...............................................................................................................18
Task: 03(c).....................................................................................................................................19
3.3 ER Diagram.........................................................................................................................19
Task: 03(d).....................................................................................................................................20
3.4 Use case Diagram................................................................................................................20
Task: 04.........................................................................................................................................21
4.1 Login form.......................................................................................................................21
Task: 05.........................................................................................................................................24
5.1 Association..........................................................................................................................24
5.2 Composite............................................................................................................................25
5.3 Aggregation.........................................................................................................................26
Task: 06(a).....................................................................................................................................27
6.1 Polymorphism......................................................................................................................27
Task: 06(b).....................................................................................................................................28
6.2 Control Structures................................................................................................................28
Task: 07.........................................................................................................................................30
7.1 Integrated Development Environment.................................................................................30
7.1.1 Visual Studio Ultimate 2013........................................................................................30
7.1.2 New Project..................................................................................................................31
7.1.3 Solution Explorer..........................................................................................................32
7.1.4 Toolbox.........................................................................................................................33
7.1.5 Editors and Designers...................................................................................................33
7.1.6 Properties Windows......................................................................................................34

Velusamy Dharshika Page 1


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

7.1.7 Advantages of using integrated development environment..........................................35


Test: 08..........................................................................................................................................36
8.1 Test Cases............................................................................................................................36
Task: 09.........................................................................................................................................41
9.1 Analyze the test cases..........................................................................................................41
Task: 10.........................................................................................................................................44
10.1Feedbacks Methods............................................................................................................44
10.1.1 Questioners.................................................................................................................44
10.1.2 Interview.....................................................................................................................45
Task: 11.........................................................................................................................................46
Task : 12........................................................................................................................................49
12.1 Maintenance and guide......................................................................................................49
12.2 Comments..........................................................................................................................51
12.3 Installation.........................................................................................................................56

Velusamy Dharshika Page 2


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

List of Figures
Figure 1(Programming Language)..................................................................................................8
Figure 2(Programming Language)..................................................................................................8
Figure 3(OOP)...............................................................................................................................13
Figure 4(OOP)...............................................................................................................................13
Figure 5(OOP)...............................................................................................................................14
Figure 6(OOP)...............................................................................................................................14
Figure 7(Class Diagram)................................................................................................................17
Figure 8(Sequence Diagram).........................................................................................................18
Figure 9(ERD)...............................................................................................................................19
Figure 10(Use case diagram).........................................................................................................20
Figure 11(Login Form)..................................................................................................................21
Figure 12(Login Form)..................................................................................................................21
Figure 13(Staff Details).................................................................................................................22
Figure 14(Staff Details).................................................................................................................22
Figure 15(Staff Details).................................................................................................................23
Figure 16(Staff Details).................................................................................................................23
Figure 17(Polymorphism)..............................................................................................................27
Figure 18(Control Structures)........................................................................................................28
Figure 19(Control Structures)........................................................................................................29
Figure 20(IDE)...............................................................................................................................30
Figure 21(IDE)...............................................................................................................................30
Figure 22(IDE)...............................................................................................................................31
Figure 23(IDE)...............................................................................................................................31
Figure 24(IDE)...............................................................................................................................32
Figure 25(IDE)...............................................................................................................................32
Figure 26(IDE)...............................................................................................................................33
Figure 27(IDE)...............................................................................................................................33
Figure 28(IDE)...............................................................................................................................34
Figure 29(IDE)...............................................................................................................................34
Figure 30(Login Form)..................................................................................................................46
Figure 31(Login Form)..................................................................................................................47
Figure 32(Passengers Detail).........................................................................................................47
Figure 33(Passengers Detail).........................................................................................................48
Figure 34(Passengers Detail).........................................................................................................48
Figure 35(Login Form)..................................................................................................................49
Figure 36(Admin)..........................................................................................................................49
Figure 37(Staff).............................................................................................................................50
Figure 38(Staff).............................................................................................................................50
Figure 39(Comments)....................................................................................................................51
Figure 40(Comments)....................................................................................................................52
Figure 41(Comments)....................................................................................................................53
Figure 42(Comments)....................................................................................................................53

Velusamy Dharshika Page 3


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 43(Installation)...................................................................................................................56
Figure 44(Installation)...................................................................................................................56
Figure 45(Installation)...................................................................................................................57
Figure 46(Installation)...................................................................................................................57

Velusamy Dharshika Page 4


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

List of Tables
Table 1.............................................................................................................................................8
Table 2...........................................................................................................................................37
Table 3...........................................................................................................................................37
Table 4...........................................................................................................................................37
Table 5...........................................................................................................................................38
Table 6...........................................................................................................................................38
Table 7...........................................................................................................................................38
Table 8...........................................................................................................................................38
Table 9...........................................................................................................................................38
Table 10.........................................................................................................................................39
Table 11.........................................................................................................................................39
Table 12.........................................................................................................................................39
Table 13.........................................................................................................................................39
Table 14.........................................................................................................................................40
Table 15.........................................................................................................................................40
Table 16.........................................................................................................................................40
Table 17.........................................................................................................................................40
Table 18.........................................................................................................................................41
Table 19.........................................................................................................................................41
Table 20.........................................................................................................................................41
Table 21.........................................................................................................................................41
Table 22.........................................................................................................................................42
Table 23.........................................................................................................................................42
Table 24.........................................................................................................................................42
Table 25.........................................................................................................................................42
Table 26.........................................................................................................................................42
Table 27.........................................................................................................................................43
Table 28.........................................................................................................................................43
Table 29.........................................................................................................................................43
Table 30.........................................................................................................................................43
Table 31.........................................................................................................................................44
Table 32.........................................................................................................................................44
Table 33.........................................................................................................................................44
Table 34.........................................................................................................................................44
Table 35.........................................................................................................................................45

Velusamy Dharshika Page 5


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 01
1.1 Object Oriented Programming Language
Let’s we discuss about the programming languages.

1.1.1 What is the Programming Language


 A programming language is a set of rules that provides a way of telling computer what
operations to perform.
 A programming language is a set of rules for communication an algorithm.
 English is a language; it has words, symbols and grammatical rules.
 The programming language also has words, symbols and rules of grammars.
 The grammatical rules are called syntax.
 Each programming language has different set of syntax rule.

1.1.2 Generation of programming language


 First generation
 Second generation
 Third generation
 Fourth generation
 Fifth generation

1.1.2.1 First Generation of Programming Language


 The first generation of programming language, or 1GL, is machine language.
 Machine language is a set of instructions.
 The data is computer’s central processing unit that can execute directly.
 Machine language statements are written in binary code, and each statement corresponds to
one machine action.
 Machine language only can computer understand directly.

Velusamy Dharshika Page 6


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 1(Programming Language)

1.1.2.2 Second Generation of Programming Language


 The second generation programming language, or 2GL, is assembly language.
 Assembly language is the human-readable notation for the machine language used to control
specific computer operation.
 An assembly language programmer writes instructions using symbolic instruction codes that
are meaningful abbreviations or mnemonics.
 An assembler is a program that translates assembly language into machine language.
 Since assembly language consists of human-readable abbreviations’, that assembler must first
convert assembly language into machine-readable language before the computer can readily
understand its instruction.

Figure 2(Programming Language)

Velusamy Dharshika Page 7


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

1.1.2.3 Third Generation of Programming Language


 The third generation of programming languages, 3GL, or procedure languages uses a series
of English-like words that are closer to human language to write instructions.
 High-level programming languages make complex programming simpler and easier to read,
write and maintain.
 Programs written in a high level programming language must to translate into machine
language by a complier or interpreter.
 Complier:
 Separate program that generates programming list (Consists of errors)
 Program that converts entire source program into machine language before executing
 Interpreter:
 Program that translates and executes one program code statement at a time.
 PASCAL, FORTRAN, BASIC, COBAL, C and C++ are examples of third generation
programming languages.

FORTRAN

 FORTRAN: FORmula TRANslation


 Developed at IBM in the mid-1950s
 The first high-level language
 Features:
 High-exactness arithmetic
 Capability of handling complex numbers
 Exponentiation computation.

COBAL
 Common Business Oriented Language.
 It developed in 1959.
 It designed to be common to many different computers.

Velusamy Dharshika Page 8


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Pascal
 Invented by Nicklaus Wirth (1971)
 Pascal was designed
To teach programming to invoices by emphasizing the structure programming
approach.
 Pascal became the most popular language in academic.

C
 Developed by Dennis Ritchie at Bell Laboratories (1970s)
 Provides control and efficiency of assembly language.
 Often used for system programs.
 Most of the UNIX operating system written in c
 Features:
 C has all the high-level instructions
 C has low-level instructions
 C is very efficient language; its instructions are short.
 C has been standardized by ANSI and ISO

Ada
 It was created for the U.S. Department of Defense (DOD)
 Features:
 Ada has high-level instructions
 Ada has instructions to allow real-time processing
 This makes it suitable for process control.
 Ada has parallel-processing capabilities. It can run on mainframe computers with multi
processor.

1.1.2.4 Forth Generation of Programming Language


 The fourth generation programming language is non-procedural language.
 In 4GL users can access to data in a database.
 A very high-level programming language is often referred to as goal-oriented programming
language because it is usually limited to a very specific application and it might use syntax
that is never used in other programming languages.

Velusamy Dharshika Page 9


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

 SQL,NOMAD and FOCUS are example of fourth generation programming languages

1.1.2.5 Fifth Generation of Programming Language


 The fifth generation programming language or visual programming language is also known
as natural language.
 It provides a visual or graphic interface, called a visual programming environment, for
creating source codes.
 Fifth generation programming allows people to interact with computers.

Programming Languages – Comparison

1GL 2GL 3GL 4GL 5GL


Machine Assembly High level Non procedural (Prolog, Visual
language language languages (C++. languages Studio)
Pascal) (Oracle. SQL)
Instructions are Instructions are Instructions are Very power Support
unique binary symbolic codes powerful user fuller very user knowledge
codes (machine friendly. friendly. representations
language) rather than data

Memory Memory Rich in data More data types Special


accessed by addressed by types support intelligent
addressed using identifiers database. searching
techniques.

Table 1

Object Oriented Programming Language

 Object-oriented programming is a programming technique that makes use of objects.


 An object commonly means a compilation of attributes (object element) and behaviors
(methods) encapsulate on an entity.
 It is abstract representation of a ‘thing’ in the real world.
 Object means an object is an instance of classes.
 An object has a structure which is represented by the attributes.
 Following example illustrates the different between objects and classes.

Velusamy Dharshika Page 10


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Person Object 1: Person Class Name

Name Vinushika
Attribute
Height 5.9 feet
Class
Weight Object
70kg
Age
26

Eat () Eat ()
Method
Sleep () Sleep ()

Principles of Object Oriented Programming

Inheritance
 Inheritance is an OOP feature that allows developing class once, and then reusing the code
over and over as the basis of new classes.
 For an example if we take car, bus, and three-wheeler all are classes. It can be come under
vehicle class is the super class (Base class), and other classes are sub classes (Derived class).
Now we can discuss how to apply inheritances into C# application. The given example will
tell about the inheritance. In this example the base class is salary, derived class is
ManagerSalary.

Figure 3(OOP)

Velusamy Dharshika Page 11


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Constructors
 Constructors are special class methods that are executed when a new instance of class is
created.
 Constructors are used to initialize the data members of the object.
 Constructors must have exactly the same name as the class they don’t have a return type.
Here we have used Line which is used again same name in the class that is constructors.
Every time it will execute.

Figure 4(OOP)

Destructors
 A destructor is a special member function of a class that is executed whenever an object of its
class goes out of scope.
 Destructor has specific symbol to use (~).

Figure 5(OOP)

Velusamy Dharshika Page 12


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Abstract Class
 The abstract classes provide a common definition of a base class that can be shared by
multiple derived classes.
 The abstract class often provides incomplete implementation.
 To instantiate an abstract class we must inherit from it and complete its implementation.

Figure 6(OOP)

Encapsulation
 Encapsulation is a mechanism to restrict access to a class or class members in order to hide
design decisions that are likely to change.
 Access modifiers control where a type or type member can be used.

Access modifier Description


Public Access is not restricted
Private Access is restricted to the containing class
Protected Access is restricted to the containing class to
any class that is derived directly or indirect
from to containing class.
Internal Access is restricted to the code the same
assembly.
Protected internal A combination of protected and internal-that
is, access is restricted to any code in the same
assembly and only derived classes in another
assembly

Velusamy Dharshika Page 13


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Here I have used private encapsulation. This means only internal restriction. Outsiders’
cannot use it.

Figure 7(Encapsulation)

Interfaces
 Interfaces are used to establish contracts through which objects can interact with each other
without knowing the implementation details.
 An interface definition cannot consider of any data fields or any implementation details such
as method bodies.
 A common interface defined in the system namespace is the Myinterface namespace. This is
s simple interface defined as follows:

Figure 8(Interface)

 Each class that implements Myinterface is free to provide its own custom comparison logic
inside the compare to method.

Velusamy Dharshika Page 14


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Polymorphism
 Polymorphism is the ability of derived classes to share common functionality base classes but
still define their own unique behavior.
 Polymorphism allows the objects of derived class to be treated at runtime as objects of the
base class. When a method is invoked at runtime.
 Its exact type is identified, and the appropriate method is invoked from the derived class.
 Here I have give an example of polymorphism.

Figure 9(Polymorphism)

Instance method and Instance variable


 An object that is creating using class is said instance
 We will sometimes say that the object belongs to the class.
 The variables that the object contains are called instance variable.
 The method that the object contains is called instance method.
 Instance method defined in a class which is only accessible through the object of the class are
called instance method.

Figure 10(OOP)

Velusamy Dharshika Page 15


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Here class name called rectangle. The rectangle contains length and width. The following
figure will explain the instance variable and instance method.

Figure 11(OOP)

Velusamy Dharshika Page 16


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 02
2.1 Objects of “Super Sonic” Company

Human
-ID : Integer
-First Name : String
-Last Name : String
-Address : String
-Sex : String
+tostring (): String

Here the Class name in human. The attributes of human is ID, First Name, Last Name,
Address, and Sex. The method is human behaviors.

Passenger
#Passenger ID : Integer
-First Name : String
-Last Name : String
-Current Location : String
-Destination of Arrival
-No of Passengers : Integer
-Contact No : Integer
-Hire Date : Integer
-Hire Date : Integer
+Getting registered()
+Hire vehicle()

Class is a template for making objects. The passenger is object of the class. That means class
is a human, and object is a passengers. The attribute of the passenger is Passenger ID, First
Name, Last Name, Current Location, Destination of Arrival, Contact No, Hire Date, and Hire
Time. The method of the passenger is getting registration, and hires the vehicles.

Velusamy Dharshika Page 17


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Staff
#Staff ID : Integer
-First Name : String
-Last Name : String
-Address : String
-Sex : String
+Register passengers()
+Maintenance()

Staff is a one of the object in human class. The attributes of staff is Staff ID, First Name, Last
Name, Address, and Sex. The method is registered passengers, and maintenance.

Vehicle Owner
#Vehicle Owner ID : Integer
-First Name : String
-Last Name : String
-Address : String
-Contact No : Integer
-Sex : String
+Getting registerd()
+Hire vehicle()

The vehicle owner is another object of class. The attributes of the object is Owner ID, First
Name, Last Name, Address, Contact No and Sex. The method of the object is getting
registered, and hire vehicle.

Velusamy Dharshika Page 18


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 03(a)
3.1 Class Diagram

Human
-ID : Integer
-First Name : String
-Last Name : String
-Address : String
-Sex : String
+tostring (): String

Passenger Staff Vehicle Owner Taxi Owner


1 * 1 *
#Passenger ID : Integer #Staff ID : Integer #Vehicle Owner ID : Integer #Taxi Owner ID : Integer
-First Name : String -First Name : String -First Name : String -First Name : String
-Last Name : String -Last Name : String -Last Name : String -Last Name : String
-Current Location : String -Address : String -Address : String -Address : String
-Destination of Arrival -Sex : String -Contact No : Integer -Contact No : Integer
-No of Passengers : Integer +Register passengers() -Sex : String + Getting register()
-Contact No : Integer +Maintenance() +Getting registerd() +Detting hire()
-Hire Date : Integer +Hire vehicle()
1
-Hire Date : Integer 1 * 1
1
+Detting registered()
+Hire vehicle()
1 *

1 *
1

Invoice Vehicle
#Vehicle ID : Integger
#Invoice No : Integer 1 1
-Vehicle model : String
-Date : Integer
-Owner ID : Integer
-Hire vehicle : String
-Down payment : Integer +tostring (): String
+Get hired vehicle() Figure 12(Class Diagram)
+Print bill()

Velusamy Dharshika Page 19


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 03(b)
3.2 Sequence Diagram
Vehicle
Login Login Passengers Payments Taxi Owner
Manager Receptionist Payment Details Owners Satffs Detail Database
Correct Wrong Detail Detail Details
Detail

Admin Input Search Deatails Getting Database

Re-enter Input Display Details

Search Details Getting Database

Display Details

Search Deatils Getting Database

Display Details

Insert, Update, Delete


Insert, Update, Delete, Search Details
Deatils into the Database
Display Search Details
Getting
Search Details
Database

Display
Search
Details
Receptionist
Input
Re-enter Input
Insert,
Insert, Update, Delete
Update,
Deatils into the Database
Delete
Display Search Details

Insert, Update,Delete, Serch Insert, Update, Delete


Details Deatils into the Database
Display Search Details

Insert, Update, Search,Delete Details Insert, Update, Delete


Deatils into the Database
Display Search Details

Insert,
Update,
Delete
Insert, Update, Search,Delete Details
Deatils
into the
Database

Display
Search
Details
Figure 13(Sequence Diagram)

Velusamy Dharshika Page 20


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 03(c)
3.3 ER Diagram
TOwner *
SSPassengerDetails * VehicleOwnerDetails * SSVehicle *
TaxiOwnerID
PassengerID VehicleOwnerID VehicleID
FirstName
FirstName FirstName
LastName VehicleType
LastName LastName
Address OwnerID
CurrentLocation Address
ContactNo
DestinationOfArrival ContactNo
NoOfPassengers Gender
ContactNo
HireDate
HireTime

Invoice *
SSStaffDetails *
InvoiceNo
StaffID LoginForm *
OwnerID Username
FirstName
Date Password
SalaryDetails * LastName
VehicleModel Usertype
StaffID Address
Downpayment
MonthlySalary Gender
ContactNo

Figure 14(ERD)

Velusamy Dharshika Page 21


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 03(d)
3.4 Use case Diagram

Staff attendance process

Manager Staff registration process Receptionist

Registerd vehicle owner


process

Include Vehicle owner registration


Passenger registration process
Passenger process
Vehicle Owner

Registerd vehicle owner


vehicle deatils

Include

Taxi owner registration


process
Super Sonic System

Taxt Owner
Figure 15(Use case diagram)

Velusamy Dharshika Page 22


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 04
4.1 Login form

 “Super Sonic Matrix Taxi” company needs to store information about their taxies details.

 Lets we discuss about their login form. In this login form there are in two users, Admin and
receptionist. Both users have different types of username, password, and user type. Other cannot
see the records more secured.

Figure 16(Login Form)

Figure 17(Login Form)

Velusamy Dharshika Page 23


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 18(Staff Details)

Figure 19(Staff Details)

Velusamy Dharshika Page 24


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 20(Staff Details)

Figure 21(Staff Details)

Velusamy Dharshika Page 25


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 05
5.1 Association
An association is an equal relationship between two classes which specifies the manner in which
objects belonging to the classes are related. In our system also there are multiple relationships
between the objects.

If we take staff and taxi owner have relationship. That is the instance of staff handles minimum
one maximum many taxi owner, Instance of taxi owner assisted by minimum one maximum one
staff. The relationship is one-to-many.

Staff Vehicle Owner


1 *
#Staff ID : Integer #Vehicle Owner ID : Integer
-First Name : String -First Name : String
-Last Name : String -Last Name : String
-Address : String -Address : String
-Sex : String -Contact No : Integer
+Register passengers() -Sex : String
+Maintenance() +Getting registerd()
+Hire vehicle()

Another example of association is staff and passenger. The instance of staff handles minimum
one maximum many passenger, Instance of passenger assisted by minimum one maximum one
staff. The relationship is one-to-many.

Passenger Staff
1 *
#Passenger ID : Integer #Staff ID : Integer
-First Name : String -First Name : String
-Last Name : String -Last Name : String
-Current Location : String -Address : String
-Destination of Arrival -Sex : String
-No of Passengers : Integer +Register passengers()
-Contact No : Integer +Maintenance()
-Hire Date : Integer
-Hire Date : Integer
+Detting registered()
+Hire vehicle()

Velusamy Dharshika Page 26


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

5.2 Composite
 Composite is a part of relationship. This means if we take computer system, it consist several
components such as keyboard, mouse and etc. The computer is an aggregation, another kind of
association among objects.

Computer

Keyboard Mouse CPU

One form of aggregation involves a strong relationship between an aggregate object and
component objects. This called composite

In this case the aggregation is Receptionist. The receptionist is important of the system. Without
the receptionist the vehicle owner, passenger, taxi owner cannot interact with the company and
they cannot give the details. If we take passenger they could not use the system because in here
the passenger give their details to receptionist then receptionist inform the details to the taxi
owner.

Receptionist

Vehicle owner Taxi owner Passenger

Velusamy Dharshika Page 27


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

5.3 Aggregation
It is a specialized from of association where all object have their own lifecycle but there is
ownership. This represents “whole-part or part-of” relationship. This represents diamond shape
with straight line.

In here the relationship has between staff and company. Staff belongs to the company. Staff is a
part of company.

Company Staff

Velusamy Dharshika Page 28


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 06(a)
6.1 Polymorphism
 Polymorphism is the ability of derived classes to share common functionality base classes but
still define their own unique behavior.
 Polymorphism allows the objects of derived class to be treated at runtime as objects of the base
class. When a method is invoked at runtime.
 Its exact type is identified, and the appropriate method is invoked from the derived class.
 Here I have give an example of polymorphism.

Figure 22(Polymorphism)

Velusamy Dharshika Page 29


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 06(b)
6.2 Control Structures
I have used control structure in my system. The following figures will explain about the control
structures.

 Login Form

Figure 23(Control Structures)

Velusamy Dharshika Page 30


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Velusamy Dharshika Page 31


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 24(Control Structures)

Task: 07
7.1 Integrated Development Environment

7.1.1 Visual Studio Ultimate 2013


 The Visual Studio product family shares a single integrated development environment (IDE) that
is compared of several elements. That is Menu bar, Slandered bar, various tool bars, editor space.
 Below we see the Visual Studio IDE (Integrated development environment).

Figure 25(IDE)

Velusamy Dharshika Page 32


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

 There exist different versions of visual Studio, such as Visual Studio Express (free), Visual
Studio Professional, Visual Studio Premium and Visual Studio Ultimate.
 But I have used Visual studio Ultimate 2013 version in my software.

Figure 26(IDE)

7.1.2 New Project

 The first thing we have to create a new application is to create a new project. This can be done
from start page:

Figure 27(IDE)

 Or from the file menu:

Velusamy Dharshika Page 33


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 28(IDE)

 Then the “New project Window” appears.

Figure 29(IDE)

 In this widow we will select an appropriate template based on what kind of application we want
to create, and a name and location for the project and widow.
 The most common applications are:
 Windows Form Application
 Console Application

Velusamy Dharshika Page 34


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

 WPF Application
 ASP.NET Web Application
7.1.3 Solution Explorer

 Solution and projects contain items the represents the references, data connections, folders, and
files that we need to create the application. A solution container can contain multiple projects
and a project contain typically contain multiple items

Figure 30(IDE)

7.1.4 Toolbox

 The Toolbox contains all the necessary controls. We need to create the user interface. See figure
below.

Figure 31(IDE)

 In order to use them in our user interface, we just drag and drop them to the “Form”, as shown
below;

Velusamy Dharshika Page 35


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

7.1.5 Editors and Designers


 Visual Studio has different editors and design tools.
 Graphic User Interface Designer:

Figure 32(IDE)

 Code Editor:

Velusamy Dharshika Page 36


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 33(IDE)

7.1.6 Properties Windows

 Each control we have on our user interface has lots of Properties we can set.

 This is done in the Properties widow.

Velusamy Dharshika Page 37


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 34(IDE)

7.1.7 Advantages of using integrated development environment


 It is easy to use.
 It simplicities the creation of database application
 It does not require facilities to search, sort, retrieve and process data in database.
 It also provides facilities to create an attractive user interface with menu, button, and textboxes.
 If we make any mistake automatically it display on the screen.
 Debugging tools thoroughly test the application and release before using.
 IDE is to makes developing faster and easier.

Velusamy Dharshika Page 38


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Test: 08
8.1 Test Cases
Use case Computer keyboard control
Function being tested Keyboard functionality
Initial state of component Idle
Input username
Expected output Correct username
Result Correct username
Table 2

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Password
Expected output Correct password
Result Correct password
Table 3

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input User type
Expected output Correct user type
Result Correct user type
Table 4

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Main manager form
Expected output Display all the forms
Result Display the all forms
Table 5

Velusamy Dharshika Page 39


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Save Details
Expected output Save passengers detail
Result Saved passenger detail
Table 6

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Update Details
Expected output Update passengers detail
Result Update passengers detail
Table 7

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Delete
Expected output Delete passengers detail
Result Delete passengers detail
Table 8

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Exit
Expected output Exit passenger form
Result Exit passenger form
Table 9

Velusamy Dharshika Page 40


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Save Details
Expected output Save staff details
Result Save staff details
Table 10

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Update Details
Expected output Update staff detail
Result Update staff detail
Table 11

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Delete Details
Expected output Delete staff details
Result Delete staff details
Table 12

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Exit
Expected output Exit staff form
Result Exit staff form
Table 13

Velusamy Dharshika Page 41


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Payment Form
Expected output Display payment form
Result Display payment form
Table 14

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Save Details
Expected output Save payments detail
Result Save payments detail
Table 15

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Update Details
Expected output Update payment detail
Result Update payment detail
Table 16

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Delete details
Expected output Delete payment detail
Result Delete payment detail
Table 17

Velusamy Dharshika Page 42


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Vehicle Owner Form
Expected output Display vehicle owner form
Result Display vehicle owner form
Table 18

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Save Details
Expected output Save vehicle owners detail
Result Save vehicle owners detail
Table 19

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Update Details
Expected output Update vehicle owners detail
Result Update vehicle owners detail
Table 20

Use case Computer keyboard control


Function being tested Keyboard functionality
Initial state of component Idle
Input Delete Details
Expected output Delete vehicle owner detail
Result Delete vehicle owner detail
Table 21

Velusamy Dharshika Page 43


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 09
9.1 Analyze the test cases
Test case ID 01
Module Manager Form
Input Manager Form
Expected result Display manager form
Actual result Display the manager form
Remark Display the manager form
Table 22

Test case ID 02
Module Staff Form
Input Staff Form
Expected result Display staff form
Actual result Display the staff form
Remark Display the staff form
Table 23

Test case ID 03
Module Passengers Detail Form
Input Save passengers detail
Expected result Allow to save passengers detail
Actual result Save the passengers details
Remark Save record
Table 24

Test case ID 04
Module Passenger Details Form
Input Update passenger details
Expected result Allow to update passengers detail
Actual result Update the passengers details
Remark Update record
Table 25

Test case ID 05
Module Passenger Details Form
Input Delete passenger details
Expected result Allow to delete passengers detail
Actual result Delete the passengers details
Remark Delete record
Table 26

Velusamy Dharshika Page 44


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Test case ID 06
Module Staff Details Form
Input Save staff details
Expected result Allow to save staff details
Actual result Save the staff details
Remark Save record
Table 27

Test case ID 07
Module Staff Details Form
Input Update staff details
Expected result Allow to update staff details
Actual result Update the staff details
Remark Update record
Table 28

Test case ID 08
Module Staff Details Form
Input Delete staff details
Expected result Allow to delete staff details
Actual result Delete the staff details
Remark Delete record
Table 29

Test case ID 09
Module Payment Details Form
Input Save payment details
Expected result Allow to delete payment details
Actual result Save the payment details
Remark Save record
Table 30

Test case ID 10
Module Payment Details Form
Input Update payment details
Expected result Allow to update payment details
Actual result Update the payment details
Remark Update record
Table 31

Velusamy Dharshika Page 45


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Test case ID 11
Module Payment Details Form
Input Delete payment details
Expected result Allow to delete payment details
Actual result Delete the payment details
Remark Delete record
Table 32

Test case ID 12
Module Vehicle Owner Details Form
Input Save vehicle owner details
Expected result Allow to save vehicle owner details
Actual result Save the vehicle owner details
Remark Save record
Table 33

Test case ID 13
Module Vehicle Owner Details Form
Input Update vehicle owner details
Expected result Allow update to vehicle owner details
Actual result Update the vehicle owner details
Remark Update record
Table 34

Test case ID 14
Module Vehicle Owner Details Form
Input Delete vehicle owner details
Expected result Allow delete to vehicle owner details
Actual result Delete the vehicle owner details
Remark Delete record
Table 35

Velusamy Dharshika Page 46


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 10
10.1Feedbacks Methods
10.1.1 Questioners
o This is the one of the best way to identify others suggestion about our system.
Yes No No
comments
Will you be happy with new system?
Will you comfortable with new system?

Do you feel easy to work with new system?


Are you satisfied with the new system?
Do you have any other extra facilities add the system?
Do you get any problem with the new system?

For your suggestions

Thank you for your comments.

Velusamy Dharshika Page 47


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

10.1.2 Interview
 The interview between Dharshika and Manager about the new system for the “Super Sonic
Matrix Taxi” Company.
 Dharshika: Good morning sir.

 Manager: Good morning, please have a seat, what can I do for you.

 Dharshika: I’m Dharshika Velusamy. I am coming from IT Software Company. I have

got the software to your system, please check and see whether if it is make any changes,

we will make the change and give to you.

 Manager: Yes sure, (The manager is checking software). It is very user friendly. It is

really easy to work with this software and nice interfaces are available in this software.

Definitely this software will help to insert, update, select and delete information about

the vehicle. Thank you so much you have prepared very good and useful software for us.

 Dharshika: You’re welcome. I am very happy about the system. Once again I want

thank because you have spent more time with me.

Velusamy Dharshika Page 48


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task: 11
Let’s discuss user friendliness of the “Super Sonic” Metered Taxi system.

 Login Form

Figure 35(Login Form)

This is the “Super Sonic” login form. This will give security for the company records. There are
two users are using the system. Administrator and receptionist other not allowed seeing the
records. If someone logon the system it will not open the company details. If we take
administrator can see all the details of the system, but the receptionist can only adding details
into the system. The main advantage of the system is receptionist panel connected to the
administrator panel, if the receptionist makes any changes it will automatically save on the
administrator panel. The users have particular username, password and user type. It will get into
their panel. Once the users enters their correct username, password and user types then user no
need to click the login button, just keep the mouse curser on the login button it will
automatically open the particular panel. The following figure will explain about it.

Velusamy Dharshika Page 49


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 36(Login Form)

 Passenger Details Form

Figure 37(Passengers Detail)

This is form is record the passenger details form. There are inert, delete, search, delete, clear and
exit buttons. If we take insert button it will save all the details, update can make changes in the
record, search can easily find out the particular owner details, clear is clears the textboxes, exit

Velusamy Dharshika Page 50


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

is close the entire form. These buttons are more user-friendly to the users. If we need to find
particular person details, we no need to go throw the entire details, just go to the owner id
textbox and enter the person id no and once the click the search button it will display the person
details on the above grid view. Each and every buttons gives message once we enter, update or
delete and records in the form. This will give more satisfaction to the user.

Figure 38(Passengers Detail)

Figure 39(Passengers Detail)

Velusamy Dharshika Page 51


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Task : 12
12.1 Maintenance and guide
 Login Form

Figure 40(Login Form)

This is the login form of the “Super Sonic” system. If we take adminstrator have specific
username , password and usertype.
USERNAME : Admin
PASSWORD : 12345
USERTYPE : Admin
Administrator can only use this username, password, and user type others cannot use the same
authentications. If anyone enters wrong authentication the system will give error message. This
is give following figure.

Figure 41(Admin)

Velusamy Dharshika Page 52


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Receptionist has some limitations. He/ She cannot break the rules of the “Super Sonic” company.
He has to be response the entire details of the new system. The receptionist all so cannot see all
the details; he has some restrictions about the work. This means he only can enters, update,
searches and deletes the details. He also has same login form but the different username,
password, and user type.
USERNAME: Staff
PASSWORD: 123
USERTYPE: Staff

Figure 42(Staff)

Now user can have some forms to record the details. .

Figure 43(Staff)

Velusamy Dharshika Page 53


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

12.2 Comments

Velusamy Dharshika Page 54


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Velusamy Dharshika Page 55


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 44(Comments)

Velusamy Dharshika Page 56


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Velusamy Dharshika Page 57


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 45(Comments)

Velusamy Dharshika Page 58


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 46(Comments)

Figure 47(Comments)

Velusamy Dharshika Page 59


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

I have used store procedure in my software. The reasons are given why I have chose the store
procedure in my software.

 Improve security: Database administrator can control the users who access the stored procedure.
 Separate or abstract server side functions from the client side.
 Less chance to data become corrupted through faulty client programs.
 Reduce development cost and increase reliability
 Store procedures are tunable to improve the performance. When same stored procedure executed
again, it can use the previously cached execution plans.

CREATE DATABASE TaxiService

USE TaxiService

----------------------------INSERT STAFF DEATILS------------------


CREATE PROC SSStaffInsert
(
@StaffID int,
@FirstName varchar (50),
@LastName varchar (50),
@Address varchar (50),
@Gender varchar (50),
@ContactNo nchar (10)
)
AS
BEGIN
INSERT INTO SSStaffDetails WHERE (StaffID , FirstName ,LastName ,Address ,Gender,
ContactNo)
END

------------------------------DELETE STAFF DETAILS------------------------------

CREATE PROC SSStaffDELETE


(
@StaffID int,
@FirstName varchar (50),
@LastName varchar (50),
@Address varchar (50),
@Gender varchar (50),
@ContactNo nchar (10)
)
AS
BEGIN
DELETE FROM SSStaffDetails WHERE StaffID=@StaffID
END

--------------- UPDATE STAFF DETAILS------------------

CREATE PROC SSStaffUpdate


(

Velusamy Dharshika Page 60


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

@StaffID int,
@FirstName varchar (50),
@LastName varchar (50),
@Address varchar (50),
@Gender varchar (50),
@ContactNo nchar (10)
)
AS
BEGIN
UPDATE SSStaffDetails SET
FirstName=@FirstName,@LastName=LastName,Address=@Address,ContactNo=@ContactNo,Gender=@Gen
der WHERE StaffID=@StaffID
END

-------------------- SEARCH STAFF DETAILS------------------

CREATE PROC SSStaffSearch


(
@StaffID int,
@FirstName varchar (50),
@LastName varchar (50),
@Address varchar (50),
@Gender varchar (50),
@ContactNo nchar (10)
)
AS
BEGIN
SELECT * FROM SSStaffDetails WHERE StaffID=@StaffID
END

-------------------- INSERT PASSENGER DETAILS------------------

CREATE PROC SSSPassengerInsert


(
@StaffID int,
@FirstName varchar (50),
@LastName varchar (50),
@Address varchar (50),
@Gender varchar (50),
@ContactNo nchar (10)
)
AS
BEGIN
INSERT INTO SSStaffDetails VALUES (@StaffID, @FirstName, @LastName, @Address,
@Gender, @ContactNo)
END

----------------------------------------INSER PASSENHERS DEATILS-------------------------

ALTER PROC SPPassengerInsert


(
@PassengerID int,
@FirstName varchar (50),
@LastName varchar (50),

Velusamy Dharshika Page 61


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

12.3 Installation

Figure 48(Installation)

Figure 49(Installation)

Velusamy Dharshika Page 62


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Figure 50(Installation)

Figure 51(Installation)

Velusamy Dharshika Page 63


Object Oriented Programming Language Esoft Metro Campus Nuwaraeliya

Bibliography
C#. (2014, 22 08). C#. Retrieved from http://msdn.microsoft.com/en-
us/library/aa288436(v=vs.71).aspx.

C#. (2014, 08 22). C#. Retrieved from


http://www.tutorialspoint.com/csharp/csharp_variables.htm.

languages, P. (2014, 08 24). Programming languages. Retrieved from


http://www.cis.upenn.edu/~bcpierce/tapl/.

Languages, P. (2014, 08 21). Programming Languages. Retrieved from


http://www.landofcode.com/programming-intro/computer-programming-languages.php.

Languages, P. (2014, 08 22). Programming Languages. Retrieved from


http://mashable.com/2014/01/21/learn-programming-languages/.

Languages, P. (2014, 08 21). Programming Languages. Retrieved from


http://en.wikipedia.org/wiki/Programming_language.

Languages, P. (2014, 08 23). Progrmming Languages. Retrieved from


http://en.wikipedia.org/wiki/List_of_programming_languages_by_type.

method, I. (n.d.). http://stackoverflow.com/questions/1053592/what-is-the-difference-between-


class-and-instance-methods. Retrieved from Instance method.

OOP. (2014, 08 22). OOP. Retrieved from


http://www.answers.com/Q/What_is_polymorphism_explain_and_example.

tutorials, C. (2014, 08 22). C# tutorials. Retrieved from http://www.completecsharptutorial.com/.

Velusamy Dharshika Page 64

You might also like