Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 112

Acknowledgement

I would like to thank my parents and friends who supported to complete this project
within the allocated time. I would also like to thank Mr. Asanka Dinesh our lecturers
for giving us their support to complete the project successfully. This assignment
helped me to get a good knowledge about object oriented programming and .Net
language. Designing a system using object oriented programming concepts was a
good experience for me.

Mohammed Basith Programming with .NET


Contents

2 Task 1......................................................................................................................8

1.1. Discuss the principles, characteristics and features of programming using


a .NET framework......................................................................................................8

2.1 Critically compare different types of .NET framework architectures versions


and select the best suitable version to implement the Examination Management
System......................................................................................................................11

2.2 Identify the supportive components of .NET framework and critically


evaluate the identified components..........................................................................20

3 Task 2....................................................................................................................22

3.1 Provide evidences for the designed system...................................................22

3.1.1 User Interface designs............................................................................22

3.1.2 Class Diagram for designed system.......................................................25

3.1.3 ER diagram for designed system............................................................26

3.1.4 Activity diagram for designed system (Administrator).........................27

3.1.5 Activity diagram for designed system (Lecturer)..................................29

3.1.6 Activity diagrams for designed system (Student)..................................30

3.2 Explain the components and data and file structures required to implement a
given design..............................................................................................................31

3.3 Evaluate potential environments and interaction of the designed system.....41

4 Task 3....................................................................................................................44

4.1 Implement the designed system using .Net framework. Provide important
code lines with proper comments and user interfaces filled with sample data........44

4.2 Provide evidences of the implemented techniques used to handle the errors52

4.3 Provide evidences of features of the selected Integrated Development


Environment (IDE) used to implement the system effectively................................54

5 Task 4....................................................................................................................59

5.1 Critically review and test the implemented system and provide the identified
discrepancies.............................................................................................................59

Mohammed Basith Programming with .NET


5.2 Evaluate independent feedback of the users to identify the limitations of the
implemented system and make recommendations for further improvements to
overcome the limitations identified..........................................................................82

5.3 Prepare a user documentation and the technical documentation...................84

5.3.1 User Document.......................................................................................84

5.3.2 Technical Document............................................................................102

6 Appendix A.........................................................................................................107

6.1 Gantt chart for assignment...........................................................................107

7 Appendix B.........................................................................................................108

8 Reference............................................................................................................109

Mohammed Basith Programming with .NET


List of Tables

Table 1 attributes in login............................................................................................31


Table 2 Methods in user class......................................................................................32
Table 3 attributes in class student................................................................................32
Table 4 Methods in class student.................................................................................33
Table 5 attributes in class lecturer................................................................................33
Table 6 Methods in class lecturer.................................................................................34
Table 7 attributes in class exam...................................................................................34
Table 8 methods in class exam.....................................................................................35
Table 9 Attributes in the class course..........................................................................35
Table 10 Methods in class course................................................................................35
Table 11 Attributes in the class subject........................................................................36
Table 12 Methods in class exam..................................................................................36
Table 13 Attributes in class question...........................................................................36
Table 14 Methods in class question.............................................................................37
Table 15 table student..................................................................................................37
Table 16 Table Lecturer...............................................................................................38
Table 17 Table course..................................................................................................38
Table 18 Table subject.................................................................................................38
Table 19 table question................................................................................................39
Table 20 Table user......................................................................................................39
Table 21 Table grades..................................................................................................39
Table 22 Table admin...................................................................................................40
Table 23 Admin test plan.............................................................................................60
Table 24 Lecturer test plan...........................................................................................60
Table 25 Student test plan............................................................................................60
Table 26 Login test case...............................................................................................62
Table 27 Add student test case.....................................................................................62
Table 28 Update and Remove test case........................................................................63
Table 29 Search student test case.................................................................................64
Table 30 Add lecturer test case....................................................................................65
Table 31 Update and Remove lecturer test case..........................................................66
Table 32 Search lecturer test case................................................................................67

Mohammed Basith Programming with .NET


Table 33 Add course test case......................................................................................68
Table 34 Update and Remove course test case............................................................69
Table 35 Search course test case..................................................................................70
Table 36 Add subject test case.....................................................................................70
Table 37 Update and Remove subject test case...........................................................71
Table 38 Search subject test case.................................................................................72
Table 39 Add question test case...................................................................................72
Table 40 Update and Remove question test case.........................................................73
Table 41 Search question test case...............................................................................74
Table 42 Add user test case..........................................................................................74
Table 43 Update and Remove accounts test case.........................................................75
Table 44 Search accounts test case..............................................................................76
Table 45 Update and Remove question test case.........................................................77
Table 46 Search question test case...............................................................................78
Table 47 Load questions to sessions test case..............................................................79
Table 48 View loaded questions test case....................................................................80
Table 49 Add grades to database test case...................................................................80

Mohammed Basith Programming with .NET


List of Figures

Figure 1 Login User Interface......................................................................................22


Figure 2 Admin Dashboard..........................................................................................22
Figure 3 Exam Selection page......................................................................................23
Figure 4 Question page................................................................................................23
Figure 5 Result page.....................................................................................................24
Figure 6 View all students page...................................................................................24
Figure 7 - Class Diagram.............................................................................................25
Figure 8 - ER diagram..................................................................................................26
Figure 9 - Activity diagram (Administrator)................................................................27
Figure 10 - Activity diagram (Administrator)..............................................................28
Figure 11 - Activity diagram (Lecturer).......................................................................29
Figure 12 - Activity diagram (Student)........................................................................30
Figure 13 Subject Add Interface..................................................................................44
Figure 14 Subject update and remove interface...........................................................45
Figure 15 Question interface........................................................................................47
Figure 17 Code example for If Else condition.............................................................49
Figure 18 Code example for foreach loop....................................................................50
Figure 19 Code example for sequence control structure..............................................51
Figure 20 Example for try-catch block........................................................................53
Figure 21 Tool Box......................................................................................................55
Figure 22 Solution Explorer.........................................................................................56
Figure 23 Server Explorer............................................................................................57
Figure 24 Properties Window......................................................................................58
Figure 29 VC redistributable installation.....................................................................87
Figure 30 VC redistributable installation....................................................................87
Figure 31 VC redistributable installation....................................................................88
Figure 32 Login interface.............................................................................................89
Figure 33 Admin dashboard.........................................................................................90
Figure 34 Add student interface...................................................................................90
Figure 35 Change student interface..............................................................................91
Figure 36 View student interface.................................................................................91
Figure 37 Student grades interface...............................................................................92

Mohammed Basith Programming with .NET


Figure 38 Add lecturer interface..................................................................................92
Figure 39 Change lecturer interface.............................................................................93
Figure 40 View lecturer interface................................................................................93
Figure 41 Add course interface....................................................................................94
Figure 42 change course interface................................................................................94
Figure 43 View course Interface..................................................................................95
Figure 44Add subject interface....................................................................................95
Figure 45 Change subject interface..............................................................................96
Figure 46 View subject interface.................................................................................96
Figure 47 Add question interface.................................................................................97
Figure 48 Change question interface............................................................................97
Figure 49 View question interface...............................................................................98
Figure 50 Create student user account interface..........................................................98
Figure 51 Create lecturer user accounts.......................................................................99
Figure 52 Change user accounts..................................................................................99
Figure 53 View user accounts....................................................................................100
Figure 54 Lecturer dashboard interface.....................................................................100
Figure 55 Student dashboard interface.......................................................................101
Figure 56 Exam selection interface............................................................................101
Figure 57 System functions........................................................................................102

Mohammed Basith Programming with .NET


1 Task 1
1.1. Discuss the principles, characteristics and features of programming using a
.NET framework.

The .net framework is a software development framework from Microsoft. It


provides a controlled programming environment where software can be
developed, installed and executed on windows based operating systems. This
framework introduced in 2002. The .net platform is similar in purpose to the
Java EE platform, and like Java's JVM runtime engine, .net ’s runtime engine
must be installed in the computer in order to run the many .net applications on
the market. The .net Framework supports SOAP based web services as well as
Microsoft's legacy component object model. .net is similar to Java because it
uses an intermediate bytecode language that can be executed on any hardware
platform that has a runtime engine. But there are some differences also.
Successfully programming in .net requires embracing this new technology as
new and fully understanding the many things that make .net unique. When
object oriented languages were introduced, developers faced a similar challenge
and, unfortunately, mindset. Many programmers quickly learned the syntax and
ported their C application to C++ or Smalltalk. However, without the requisite
understanding of object oriented programming, these new applications were
procedural programs draped in the syntax of an object oriented language. Some
developers invested the time to learn object oriented programming not just the
syntax, but the philosophy and intent. Their resulting applications were true
object oriented programs that provided all the benefits envisioned for the new
programming modality. Similarly, understanding the philosophy and
architecture of .net is essential for creating applications that offer new solutions.
Some industry analysts assert that Microsoft has gambled the company on .net.
Microsoft's languages are C#, J#, Managed C++, JScript.NET and Visual
Basic.net.

Mohammed Basith Programming with .NET


Main Characteristics of .Net Framework.

 Interoperability
The word ‘Interoperability’ really refers to the ability of diverse systems and
organizations to work together. In computer systems, there is lot of interaction
happening between different new systems and old systems.

The .NET Framework provides many great features including the Interoperability;
it is achieved by set of tools and services provided by the framework. It includes a
large library and supports several programming languages like C#, VB.NET etc.
which allows language interoperability

.NET Framework Architecture


.NET is tiered, modular, and hierarchal. Each tier of the .net framework is a layer
of abstraction. .NET languages are the top tier and the most abstracted level. The
common language runtime is the bottom tier, the least abstracted, and closest to
the native environment. This is important since the common language runtime
works closely with the operating environment to manage .net applications.

 Common Language Specification (CLS)


Common Language Specification is a set of basic language features that .net
languages needed to develop Applications and Services, which are compatible
with the .net framework. When there is a situation to communicate objects written
in different .net complaint languages, those objects must expose the features that
are common to all the languages. CLS ensures complete interoperability among
applications, regardless of the language used to create the application.

 Common Type System (CTS)


Common type system describes a set of types that can be used in different .net
languages in common. That is, the CTS ensure that objects written in different .net
languages can interact with each other. For communicating between programs
written in any .net complaint language, the types have to be compatible on the
basic level. These types can be value types or reference types. The value types are
passed by values and stored in the stack.

Mohammed Basith Programming with .NET


 Common Language Infrastructure (CLI)
Part of Microsoft's .net strategy, Common Language Infrastructure enables
an application program written in any of several commonly used programming
languages to be run on any operating system using a common runtime program
rather than a language specific one. Common Language Infrastructure provides a
virtual execution environment comparable to the one provided by Sun
Microsystems for Java programs.

 Common Language Runtime (CLR)


As part of Microsoft's .net framework, the common language runtime is
programming that manages the execution of programs written in any of several
supported languages, allowing them to share common object oriented class is
written in any of the languages. The common language runtime is somewhat
comparable to the java virtual machine that Sun Microsystems furnishes for
running programs compiled from the java language. Microsoft refers to its
common language runtime as a "managed execution environment." The Common
Language Runtime allows an instance of a class written in one language to call
a method of a class written in another language. It also provides garbage
collecting, exception handling, and debugging services.

 .Net Framework Class Library (FCL)


The .net framework class library provides the core functionality of .net framework
architecture. The .net framework class library includes a huge collection of
reusable classes, interfaces, and value types that expedite and optimize the
development process and provide access to system functionality. The .net
framework class library organized in a hierarchical tree structure and it is divided
into namespaces. Namespaces is a logical grouping of types for the purpose of
identification. Framework class library provides the consistent base types that are
used across all .net enabled languages. The .net framework class library classes
are object oriented and easy to use in program developments.

 Portability
The .NET Framework Portable Class Library project type in Visual Studio helps
you build cross-platform apps and libraries for Microsoft platforms quickly and
easily.

Mohammed Basith Programming with .NET


1.1 Critically compare different types of .NET framework architectures
versions and select the best suitable version to implement the Examination
Management System.
Each version of the .net framework contains the common language runtime, the
base class libraries, and other managed libraries. According to .net framework
versions, it has few upgrades and packages. The first .net framework version
is .net framework 1.0 and it introduced in 2002 by Microsoft. All of the
Microsoft products like MS Office, Visual Studio are based on .net framework.
Without .net framework, any products of Microsoft cannot run properly.
Therefore, if we use any Microsoft product, we need to install .net framework
before use that product. Each new version of the .NET Framework retains
features from the previous versions and adds new features. The .NET
Framework version number is incremented at each release, although the CLR
version is not always incremented. For example, the .NET Framework 4, 4.5,
and later releases include CLR 4, but the .NET Framework 2.0, 3.0, and 3.5
include CLR 2.0.

If we need to create a web site using asp.net, we should have to exact idea about
.NET framework and following shows the each and every main .NET
framework versions and included files and techniques in there.

.NET Framework 1.0


. NET framework 1.0 introduced in January 2002 by Microsoft Company to
giving equality for all the Microsoft products. There are many namespaces and
added types in this version of .NET framework.

Following shows the some of them.


 Accessibility

 IEHost.Execute

 Microsoft.CLRAdmin

 Microsoft.IE

 Microsoft.JScript.Vsa

 Microsoft.VisualBasic.CompilerServices

 Microsoft.VisualBasic.Vsa

 Microsoft.VisualC

Mohammed Basith Programming with .NET


 Microsoft.Vsa.Vb.CodeDOM

. NET Framework 1.1


The .NET Framework version 1.1 extends the .NET Framework version 1.0 with new
features, improvements to existing features, and enhancements to the documentation.

Following shows the updates


 Asp.net mobile controls
ASP.NET mobile controls extend the .NET framework and visual studio by
providing support for mobile devices such as cell phones and personal data
assistants. The .NET framework version 1.1 release incorporates the mobile
controls into the .net framework and visual studio distributions.

 ADO.net changes
The .NET Framework Data Provider for ODBC, which previously was available
as a Web download only, now ships with the .NET Framework under the
namespace System.Data.Odbc.

 Side by side execution


The .NET Framework version 1.1 supports side-by-side execution. Side-by-side
execution is the ability to store and execute multiple versions of an application or
component on the same computer. This means that you can have multiple versions
of the runtime, and multiple versions of applications and components that use a
version of the runtime, on the same computer at the same time.

 IPv6 support
The .NET Framework version 1.1 supports the emerging update to the Internet
Protocol, commonly referred to as IP version 6, or simply IPv6. This protocol is
designed to significantly increase the address space used to identify
communication endpoints in the Internet to accommodate its ongoing growth.
IPv6 is supported in the System.Net namespace, ASP.NET, and XML Web
services.

Mohammed Basith Programming with .NET


.NET Framework 2.0
The Microsoft .NET Framework version 2.0 extends the .NET Framework version 1.1
with new features, improvements to existing features, and enhancements to the
documentation. 

Updates of .NET Framework 2.0


 64-bit platform support
The new generation of 64-bit computers enables the creation of applications that
can run faster and take advantage of more memory than is available to 32-bit
applications.

 Support of Access Control List


An access control list is used to grant or revoke permission to access a resource on
a computer. New classes have been added to the .NET Framework that allow
managed code to create and modify an ACL.

 ADO.NET improvements
New features in ADO.NET include support for user-defined types, asynchronous
database operations, XML data types, snapshot isolation, and new attributes that
allow applications to support multiple active result sets with SQL Server 2005.

And also, .NET Framework 2.0 has more updates


 Com interoperability service enhancement
 Console class additions
 Data protection API
 Debugger display attribute
 Debugger edit and continue support
 Distributed computing
 FTP support
 Generics and Generic collections
 I/O enhancements
 .NET Framework remoting

Mohammed Basith Programming with .NET


 Programmatic control of caching
 Manifest based activation

.NET Framework 3.0


The .NET Framework 3.0 is the next step in this progression. Applications built on
this new version of the Framework can be created with Visual Studio 2005, making it
feel familiar to most Windows developers. But the .NET Framework 3.0 is also an
evolution, adding more to what version 2.0 of the Framework already provides.

Updates
 Windows Workflow Foundation (WWF)
WWF just a series of steps performed in some order. One might even argue that
every application implements a workflow, since every application executes some
process.

 Windows Communication Foundation (WCF)


Most applications need to communicate with other applications. How this
communication is done has taken a big step forward in the last few years. After
decades of disagreement, all of the major vendors have agreed to support the same
protocols for application communication.

 Windows CardSpace
In the majority of cases, a person's digital identity is expressed as a simple
username. Combined with a password, this identity is used to access email
accounts, Internet merchants, and even on-line banks and other financial
institutions. Sometimes, this simple user name and password has limitations and
drawbacks.

 Windows Presentation Foundation


The user interface is an important part of nearly every application. Yet what users
expect from those interfaces has advanced significantly. Traditional menu driven
GUIs are still required, but applications may also need to display video, run
animations, use two and three dimensional graphics, and work with various kinds
of documents. And all of this must be possible whether the application is accessed

Mohammed Basith Programming with .NET


from a stand-alone desktop client or through a web browser. A primary goal of
WPF is to address this challenge.

.NET Framework 3.5


.NET Framework 3.0 is the important update among others. Because, it introduced
Ajax enabled web sites, CLR modifications, networking and other modifications.

Following shows the updates


 ASP.NET
New ASP.NET features include ASP.NET Dynamic Data, which provides a rich
scaffolding framework that allows rapid data driven development without writing
code, and an addition to ASP.NET AJAX that provides support for managing
browser history.

 CLR
o Improved application startup and working set performance.
o Better layout of .NET Framework native images.
o Opting out of strong-name verification of fully trusted assemblies.
o Better generated code that improves end-to-end application execution time.
o Detecting approaching full garbage collections with Garbage Collection
Notifications.

 Client Profile improvements


The .NET Framework Client Profile is a subset of the full .NET Framework that
targets client applications. This improves the installation experience on computers
that do not already have the .NET Framework installed.

 WPF improvements
Performance improvements have been made to Windows Presentation
Foundation, including a faster startup time and improved performance for Bitmap
effects. Additional functionality for Windows Presentation Foundation includes
better support for line of business applications, native splash screen support,
DirectX pixel shade support, and the new web browser control.

Mohammed Basith Programming with .NET


.NET Framework 4.0
The .NET Framework 4 is highly compatible with applications that are built with
earlier .NET Framework versions, except for some changes that were made to
improve security, standards compliance, correctness, reliability, and performance. The
.NET Framework 4 is highly compatible with applications that are built with
earlier .NET Framework versions, except for some changes that were made to
improve security, standards compliance, correctness, reliability, and performance.

Core new features and updates


 Diagnostics and Performance
Earlier versions of the .NET Framework provided no way to determine whether a
particular application domain was affecting other application domains, because
the operating system APIs and tools, such as the Windows Task Manager, were
precise only to the process level.

 Garbage Collection
The .NET Framework 4 provides background garbage collection. This feature
replaces concurrent garbage collection in previous versions and provides better
performance.

 Dynamic Language Runtime


The dynamic language runtime is a new runtime environment that adds a set of
services for dynamic languages to the CLR. The DLR makes it easier to develop
dynamic languages to run on the .NET Framework and to add dynamic features to
statically typed languages.

 Tuples
The .NET Framework 4 provides the System.Tuple class for creating tuple objects
that contain structured data. It also provides generic tuple classes to support tuples
that have from one to eight components. 

 Memory-Mapped Files

Mohammed Basith Programming with .NET


The .NET Framework now supports memory-mapped files. You can use memory-
mapped files to edit very large files and to create shared memory for interposes
communication.

.NET Framework 4.5


 Managed Extensibility Framework (MEF)
In the .NET Framework 4.5, the Managed Extensibility Framework provides the
following new features,
 Support for generic types.
 Convention-based programming model that enables you to create parts based
on naming conventions rather than attributes.
 Multiple scopes.

 Asynchronous file operations


In the .NET Framework 4.5, new asynchronous features were added to the C# and
Visual Basic languages. These features add a task-based model for performing
asynchronous operations. To use this new model, use the asynchronous methods
in the I/O classes.

 Parallel computing
The .NET Framework 4.5 provides several new features and improvements for
parallel computing. These include improved performance, increased control,
improved support for asynchronous programming, a new dataflow library, and
improved support for parallel debugging and performance analysis.

 Web
ASP.NET 4.5 and 4.5.1 add model binding for Web Forms, Web Socket support,
asynchronous handlers, performance enhancements, and many other features.

 .NET for Windows 8.x Store apps


Windows 8.x Store apps are designed for specific form factors and leverage the
power of the Windows operating system. A subset of the .NET Framework 4.5 or
4.5.1 is available for building Windows 8.x Store apps for Windows by using C#
or Visual Basic.

Mohammed Basith Programming with .NET


 Portable Class Libraries
The Portable Class Library project in Visual Studio 2012 enables you to write and
build managed assemblies that work on multiple .NET Framework platforms.

.NET Framework 4.6.1


 Cryptography
The .NET Framework 4.6 added RSACng support for X509 certificates.
The .NET Framework 4.6.1 adds support for ECDSA X509 certificates. ECDSA
offers better performance and is a more secure cryptography algorithm than RSA,
providing an excellent choice where Transport Layer Security performance and
scalability is a concern.

 ADO.NET
Always Encrypted support for hardware protected keys ADO.NET now supports
storing Always Encrypted column master keys natively in Hardware Security
Modules. With this support, customers can leverage asymmetric keys stored in
HSMs without having to write custom column master key store providers and
registering them in applications.

.NET Framework 4.7


 Better support for control characters by the DataContractJsonSerializer
In the .NET Framework 4.7, the DataContractJsonSerializer serializes control
characters in conformity with the ECMAScript 6 standard. This behavior is
enabled by default for applications that target the .NET Framework 4.7, and is an
opt-in feature for applications that are running under the .NET Framework 4.7 but
target a previous version of the .NET Framework.

 Networking
The TLS stack, which is used by System.Net.Security.SslStream and up-stack
components such as HTTP, FTP, and SMTP, allows developers to use the default
TLS protocols supported by the operating system. Developers need no longer
hard-code a TLS version.

 ASP.NET

Mohammed Basith Programming with .NET


Starting with the .NET Framework 4.7, ASP.NET adds a new set of APIs that
allow developers to replace the default ASP.NET implementations for in-memory
object caching and memory monitoring.

According to above .NET Framework structure details, I have selected the .NET
Framework 4.5 to develop the Online Examination management system.
Because, .NET Framework 4.5 improves the many features of the .NET
Framework. .NET Framework 4.5 is the default framework of the new systems and
programs. So, I have to implement this online examination management system as
suitable for any kind of computer system. And also, .NET Framework 4.5 have
introduced the new technologies with this framework update. Because of this
framework version, I can implement this online examination management system
better than others. Finally, this framework version improves the security of the system
and it will be an additional advantage to me. So, I selected this .NET Framework 4.5
for developing my web based application.

Mohammed Basith Programming with .NET


1.2 Identify the supportive components of .NET framework and critically
evaluate the identified components.
.NET Framework has few many supportive components to help programmers
when coding and designing. Without these components, .NET Framework
cannot provide the best service to programmers and framework based on this
component. Therefore, these components are very important.

 Common Language Specification (CLS)


Common Language Specification is a set of basic language features
that .net languages needed to develop Applications and Services, which are
compatible with the .net framework. When there is a situation to
communicate objects written in different .net complaint languages, those
objects must expose the features that are common to all the languages.

 Common Type System (CTS)


Common type system describes a set of types that can be used in
different .net languages in common. That is, the CTS ensure that objects
written in different .net languages can interact with each other. For
communicating between programs written in any .net complaint language,
the types have to be compatible on the basic level. These types can be value
types or reference types.

 .Net Framework Class Library (FCL)


The .net framework class library provides the core functionality of .net
framework architecture. The .net framework class library includes a huge
collection of reusable classes, interfaces, and value types that expedite and
optimize the development process and provide access to system
functionality. The .net framework class library organized in a hierarchical
tree structure and it is divided into namespaces. Namespaces is a logical
grouping of types for the purpose of identification. Framework class library

Mohammed Basith Programming with .NET


provides the consistent base types that are used across all .net enabled
languages.

 Common Language Infrastructure (CLI)


Part of Microsoft's .net strategy, Common Language Infrastructure enables
an application program written in any of several commonly used programming
languages to be run on any operating system using a common runtime program
rather than a language specific one. Common Language Infrastructure provides a
virtual execution environment comparable to the one provided by Sun
Microsystems for Java programs. In both environments, CLI and Java use
a compiler to process language statements into a preliminary form of executable
code called bytecode. Later, when a program is run, its bytecode is compiled on
the fly into the native code required by the machine architecture of a given
computer

 Common Language Runtime (CLR)


As part of Microsoft's .net framework, the common language runtime is
programming that manages the execution of programs written in any of several
supported languages, allowing them to share common object oriented class is
written in any of the languages. The common language runtime is somewhat
comparable to the java virtual machine that Sun Microsystems furnishes for
running programs compiled from the java language. Microsoft refers to its
common language runtime as a "managed execution environment." Programmers
writing in any of Visual Basic, Visual C++, or C# compile their programs into an
intermediate form of code called Common Intermediate Language in a portable
execution file that can then be managed and executed by the common language
runtime. The programmer and the environment specify descriptive information
about the program when it is compiled and the information is stored with the
compiled program as metadata. Metadata, stored in the compiled program, tells
the CLR what language was used, its version, and what class libraries will be
needed by the program. The Common Language Runtime allows an instance of a
class written in one language to call a method of a class written in another

Mohammed Basith Programming with .NET


language. It also provides garbage collecting, exception handling, and debugging
services.

2 Task 2
2.1 Provide evidences for the designed system.
2.1.1 User Interface designs

Figure 1 Login User Interface

Mohammed Basith Programming with .NET


Figure 2 Admin Dashboard

Figure 3 Exam Selection page

Mohammed Basith Programming with .NET


Figure 4 Question page

Figure 5 Result page

Mohammed Basith Programming with .NET


Figure 6 View all students page

Mohammed Basith Programming with .NET


2.1.2 Class Diagram for designed system

Figure 7 - Class Diagram

Mohammed Basith Programming with .NET


2.1.3 ER diagram for designed system

Figure 8 - ER diagram

Mohammed Basith Programming with .NET


2.1.4 Activity diagram for designed system (Administrator)

Figure 9 - Activity diagram (Administrator)

Mohammed Basith Programming with .NET


Figure 10 - Activity diagram (Administrator)

Mohammed Basith Programming with .NET


2.1.5 Activity diagram for designed system (Lecturer)

Figure 11 - Activity diagram (Lecturer)

Mohammed Basith Programming with .NET


2.1.6 Activity diagrams for designed system (Student)

Figure 12 - Activity diagram (Student)

I have included the few user interfaces and diagrams in above. These diagrams show
the various things about the newly designed system. Actually, with these diagrams,
user and developer can get the idea about the system and these diagrams show how it
works.

Mohammed Basith Programming with .NET


2.2 Explain the components and data and file structures required to implement
a given design.
Before we create solution for XYZ Institute`s online examination management
system, we should identify the data and file structures. It is very important
process of the whole software creating process. We can introduce this
identification process is the approach of the creating software solution. After
this process, we can handle workloads and time frames according to tasks to do
and it helps to create a quality product. So, I have to identify the data and file
structures of the system, before I start creating the application. Following table
shows the data, I have identified.

Class_User
 Attributes
Attribute
Type Description
name

-id string This variable used to store id from database.

-user string This variable used to store user inputted username

-nic String This variable used to store nic from DB

-fname String This variable used to store first name of the user

-password String This variable used to store user inputted


password.

-constant String Store access level

Table 1 attributes in login

Mohammed Basith Programming with .NET


 Methods
Method Name Type Description

+ loginFunction DataTable Check user name and password.


+ searchStudent(nic) DataTable Load description according to course
name.
+addUsers(fname,nic,user, void Create user accounts.
password,constant)
searchLecturer(nic) DataTable Search lecturer according to nic.
SearchUser(nic) DataTable Search user according to nic.
updateUser(id,user,password) void Update user accounts.
removerUser(id) void Remove user accounts.
Table 2 Methods in user class

Class_Student
 Attributes
Attribute name Type Description

-id String Store id.

-title string This variable used to store title

-fname string This variable used to store first name

-lname string This variable used to store last name

-nic string This variable used to store NIC no

-dob string This variable used to store date of birth

-address string This variable used to store address

-gender string This variable used to store gender

-mobile string This variable used to store mobile

-home string This variable used to store home no

-email string This variable used to store email address

-course string This variable used to store course name

-first_name string This variable used to store first name.

-last_name string This variable used to store last name

Mohammed Basith Programming with .NET


Table 3 attributes in class student

 Methods
Method Name Type Description
+ Course_Drop_Load() DataSet Load course name to drop down
list
+ loadDiscription(course) DataTable Load description according to
course name.
+addStudent(title,fname,lname, void Add student details to the system
nic,dob,address,gender,mobile,
home,email,course)
+searchByFirstname(first_name DataTable Search students according to first
) name
+searchByLastname(last_name) DataTable Search students according to last
+searchByNIC(nic) DataTable Search student according to NIC.

+updateStudent(id, void Update student details


title,fname,lname,nic,dob,
address,gender,mobile,home,)
+removeStudent(id) Void Remove student details from the
system.
Table 4 Methods in class student

Class Lecturer
 Attributes
Attribute name Type Description
-id String Store id.
-title string This variable used to store title
-fname string This variable used to store first name
-lname string This variable used to store last name
-nic string This variable used to store NIC no
-dob string This variable used to store date of birth
-address string This variable used to store address
-gender string This variable used to store gender
-mobile string This variable used to store mobile
-home string This variable used to store home no
-email string This variable used to store email address

Mohammed Basith Programming with .NET


-first_name string This variable used to store first name.
-last_name string This variable used to store last name
Table 5 attributes in class lecturer

 Methods
Method Name Type Description
+addLecturer(title,fname,lname, void Add lecturer details to the system
nic,dob,address,gender,mobile,
home,email)
+searchByFirstname(first_name) DataTable Search lecturer according to first
nam
+searchByLastname(last_name) DataTable Search lecturer according to last
name
+searchByNIC(nic) DataTable Search lecturer according to NIC.
+updateLecturer (id, void Update lecturer details
title,fname,lname,nic,dob,
address,gender,mobile,home,)

+removeLecturer (id) Void Remove lecturer details from the


syst.
Table 6 Methods in class lecturer

Class Exam
 Attributes
Attribute name Type Description
-nic string This variable used to store nic
-course string This variable used to store course
-sunject string This variable used to store subject
-question System.web.UI. This variable used to store questions
WebControls
-answer_list System.web.UI. This variable used to store answer
WebControls
-correct_answer System.web.UI. This variable used to store correct answer
WebControls
-index string This variable used to store index
-first_name string This variable used to store first name
-sub string This variable used to store subject

Mohammed Basith Programming with .NET


-user string This variable used to store username
-m double This variable used to store parsed grade
-grade double This variable used to store all the grade
-mark double This variable used to store assign marks to
grade.
Table 7 attributes in class exam

 Methods
Method Name Type Description
+course_Drop_Load() DataTable Load course details to the drop-
down list
+LoadSubject(course) DataTable Load subject details to the
drop-down list
+attempyCount(subject,nic) Int Count attempts of each student
+loadQuestion(subject) DataTable Load questions to the session
variables.
+addQuestion(question,answer_list void Load questions to labels and
, index,correct_answer) radio button list.
+marksCount(m) void Count marks
+addQuestionToDB(first_name, void Add marks to the database
sub,nic)
+resultCount(subject,nic) SqlData Load results to the result page
Reader
+loadNIC(user) DataTable Load NIC according to user
Table 8 methods in class exam

Class_Course
 Attributes
Attribute name Type Description
-id string This variable used to store id from
database.
-course string This variable used to store course
-description String This variable used to store description from
DB
Table 9 Attributes in the class course

 Methods
Method Name Type Description
+addCourse(course,description) void Add course details to the DB

Mohammed Basith Programming with .NET


+searchCourse(course) DataTable Search course details
+updateCourse(id, void Update existing records
course,description)
+removeCourse(id) void Remove course details from
DB.
Table 10 Methods in class course

Class_Subject
 Attributes
Attribute name Type Description
-id string This variable used to store id from
database.
-subject string This variable used to store subject

-course string This variable used to store course


-description String This variable used to store description
Table 11 Attributes in the class subject

 Methods
Method Name Type Description
+addSubject(subject, void Add subject details to the DB
course,description)
+searchSubject (subject) DataTable Search sbuject details
+updateSubject (id,subject, course, void Update existing records
description)
+removeSubject (id) void Remove subject details from
DB.
Table 12 Methods in class exam

Class Question
 Attributes
Attribute name Type Description
-id string This variable used to store nic

-question string This variable used to store questions


-subject string This variable used to store subject
-ans1 string This variable used to store answer 1
-ans2 string This variable used to store answer 2

Mohammed Basith Programming with .NET


-ans3 string This variable used to store answer 3
-ans4 string This variable used to store answer 4
-correct_ans string This variable used to store correct answer
Table 13 Attributes in class question

 Methods
Method Name Type Description
+Subject_Drop_Load() DataTable Load subject details to the
drop-down list
+addQuestion(subject,question,ans1, void Add question to the
ans2,ans3,ans4,correct_ans) database
+searchQuestion(question) DataTable Search question details
+updateQuestion(id, subject, void Update question
question, ans1,
ans2,ans3,ans4,correct_ans)
+removeQuestion(id) void Remove questions
Table 14 Methods in class question

 Table student

Column Name Data Type Description


Id int Store batch ID, Primary Key, Not Null,
Identity
title varchar(10) Store title, Allow Null
fname varchar(50) Store first name, Allow Null
lname varchar(50) Store last name, Allow Null
nic varchar(10) Store NIC no, Allow Null
dob varchar(10) Store date of birth, Allow Null
address varchar(MAX) Store address, Allow Null
gender varchar(10) Store gender, Allow Null
mobile varchar(10) Store mobile no, Allow Null
home varchar(10) Store home no, Allow Null
email varchar(50) Store email, Allow Null
course varchar(50) Store course name, Allow Null
Table 15 table student

Mohammed Basith Programming with .NET


 Table lecturer
Column Name Data Type Description
Id int Store batch ID, Primary Key, Not Null,
Identity
title varchar(10) Store title, Allow Null
fname varchar(50) Store first name, Allow Null
lname varchar(50) Store last name, Allow Null
nic varchar(10) Store NIC no, Allow Null
dob varchar(10) Store date of birth, Allow Null
address varchar(MAX) Store address, Allow Null
gender varchar(10) Store gender, Allow Null
mobile varchar(10) Store mobile no, Allow Null
home varchar(10) Store home no, Allow Null
email varchar(50) Store email, Allow Null
course varchar(50) Store course name, Allow Null
Table 16 Table Lecturer

 Table course
Column Name Data Type Description
id int Store course ID, Primary Key, Not Null,
Identity
cname varchar(50) Store course name, Allow Null
description varchar(MAX) Store description, Allow Null
Table 17 Table course

 Table subject
Column Name Data Type Description
id int Store subject ID, Primary Key, Not Null,
Identity
sname varchar(50) Store subject name, Allow Null

Mohammed Basith Programming with .NET


cname varchar(50) Store course name, Allow Null
description varchar(MAX) Store description, Allow Null
Table 18 Table subject

 Table question
Column Name Data Type Description
id int Store question ID, Primary Key, Not
Null, Identity
question varchar(MAX) Store question, Allow Null
ans1 varchar(MAX) Store answer 1, Allow Null
ans2 varchar(MAX) Store answer 2, Allow Null
ans3 varchar(MAX) Store answer 3, Allow Null
ans4 varchar(MAX) Store answer 4, Allow Null
correct varchar(MAX) Store correct answer, Allow Null
subject varchar(MAX) Store subject name, Allow Null
Table 19 table question

 Table user
Column Name Data Type Description
id int Store user ID, Primary Key, Not Null,
Identity
account varchar(MAX) Store account name, Allow Null
username varchar(50) Store username, Allow Null
password varchar(50) Store password, Allow Null
access varchar(50) Store access level, Allow Null
nic varchar(50) Store nic, Allow Null
Table 20 Table user

 Table grades
Column Name Data Type Description
id int Store user ID, Primary Key, Not Null,
Identity
fname varchar(50) Store first name, Allow Null
subject varchar(50) Store subject, Allow Null

Mohammed Basith Programming with .NET


nic varchar(50) Store nic no, Allow Null
marks varchar(10) Store student marks, Allow Null
Table 21 Table grades

 Table Admin

Column Name Data Type Description


Id int Store batch ID, Primary Key, Not Null,
Identity
title varchar(10) Store title, Allow Null
fname varchar(50) Store first name, Allow Null
lname varchar(50) Store last name, Allow Null
nic varchar(10) Store NIC no, Allow Null
dob varchar(10) Store date of birth, Allow Null
address varchar(MAX) Store address, Allow Null
gender varchar(10) Store gender, Allow Null
mobile varchar(10) Store mobile no, Allow Null
home varchar(10) Store home no, Allow Null
email varchar(50) Store email, Allow Null
course varchar(50) Store course name, Allow Null
Table 22 Table admin

In this sub task, I have included all the variables and methods in the classes of the
newly created online examination management system with more details. I have
presented these details in tabular format and it will be very clear and understandable
for users. Each table has many details according to classes. Variable table has the
details of all the variables in that particular class. Actually, it has 03 columns called
attribute name, data type and description. Attribute name column includes the variable
name and data type column includes the details about that variable which can holds
that what data and finally, description column includes the additional details about

Mohammed Basith Programming with .NET


that variable. Methods tables is also like attribute tables. Because, this kind of table
includes the method name, data type and description.

And also, I have included the database table details to this sub task. Because database
tables are the very important part of any kind of system. Without them, programmer
cannot store data properly and easily. So, I have included them to this task. In this
system, there are 08 tables using to manage data.

2.3 Evaluate potential environments and interaction of the designed system.


This examination management system is a system that use internet to provide its
facilities. That means, this system requires internet connection to work properly.
Actually, even we cannot access to this system without the internet. In present,
the internet is the most common thing among other services. Because, with
technology, we can be able to access to the internet through many electronic
devices. Such as, mobile phones, laptops, most commonly desktop computers
and there are so many other devices. If something on the internet, we can access
to that using above mentioned devices, but there are some issues here and we
have to consider them if we are creating or designing the web site. Actually, this
online examination management system is also a web site that creates for
specified target audience. But the reason is we cannot give access rights to some
devices to access to this system, because it can be a security issue. If we are
implementing the system, we need to select the deployment environment to run
the system. There are few deployment environments. Such as, mobile handheld,
web based, desktop dedicated devices and also, client server model. Above
mentioned deployment environments have some advantages and disadvantages.
So, I have to select one deployment environment among those.

 Mobile Handheld deployment environment


First thing is mobile handheld environment and it includes mostly mobiles,
tabs, PDAs and other handheld devices. we cannot give permissions to
access through mobiles and other mobile related devices, because, this is an
examination system. This system contains the questions and answers and
other confidential details. So, if we use mobile devices to do an exam,
students can cheat easily, because they can google the questions and find

Mohammed Basith Programming with .NET


the answers. So, I am not giving opportunity to cheat. Therefore, I don`t
give the permission to access this site through mobile devices. Because of
this matter, I have no idea to select this deployment environment.

 Web based deployment environment


And also, I don`t give permission to access to this web site through personal
computers and personal laptops. Because, this is the same situation to mobile
devices. But if this is a web based application, I need to implement this web based
system in an internet to overcome this matter, because, if we use intranet, intranet
means the network within an organization. So, if user want to access the system,
he or she needs to access to the intranet first. Actually, an application that runs
entirely on a web browser is known as a web application. Web application is
platform independent because they require only a web browser. This can run on
the browsers directly and hence do not require any installation, and also, this uses
multi-tier architecture which consists of, user client, middle tier, and application
server. A web application is hosted in a browser controlled environment, or it is
often programmed in a language that supports the browser. JavaScript is the most
widely used browser supported language. And also web application is not
overloading as the number of simultaneous user request increases. Following
shows the some of the examples of web applications include, Yahoo mail, Gmail,
Web Office, Google Apps, Microsoft Office Live, WebEx, etc.

 Client/Server deployment environment


An application that runs on the client side and accesses the remote server for
information is called a client/server application. The client server always makes
requests to the remote server to get some information. The user interaction with
the server is always through a user interface or application on the client side. This
model uses a two tier architecture. The client/server application is always installed
on the client’s computer unlike a web application. In client/server applications, the

Mohammed Basith Programming with .NET


server machine is a host that runs single or multiple-server programs sharing their
resources with clients. A client always requests from a server information or
content without sharing any of its resources. In a client/server model, the server
often gets overloaded as the number of simultaneous client requests increases.
This is the main disadvantage of this deployment environment because, if the
server stuck suddenly, data can be corrupted or erased. And also, whole system
stops until server responses again. This is an examination management system.
So, system should have ability to run any time and should not be stoppable. So,
this is not a suitable deployment environment for this system.

 Desktop dedicated devices


The term "desktop software" refers to software that runs on a Mac, Windows or
Linux desktop computer that is set up for use in one place such as a desk. This is
where the name originally comes from, back before computers became portable.
Laptop computer can also use desktop software since they run the same operating
systems as the less portable desktops. Desktop application must be installed on
your computer. The installation is done from a software CD, DVD or other media.
Desktop software can also be found online and downloaded as a file that is saved
on your computer. This file is then run on the desktop or laptop computer to install
the software. This kind of application runs as stand-alone software. That is, it does
not require a web browser or internet connection, although some features in the
software may be limited or unavailable without access to an internet connection.
Desktop software typically does not require any other desktop software to run. As
our subject, I have to implement web based application because, using ASP.NET
language, we cannot create stand-alone software. So, this one also not suitable for
OEMS.

So, according to above details, I have selected the web based deployment
environment to implement this online examination management system. Because it is
the best deployment environment for this system.

Mohammed Basith Programming with .NET


3 Task 3
3.1 Implement the designed system using .Net framework. Provide important
code lines with proper comments and user interfaces filled with sample
data.

Figure 13 Subject Add Interface

// Subject add function


public static void addSubject(string subject,string course,string description){
try{
DBConnection.getMyConnection();
String query = "INSERT INTO [tbl_subject] (sname,cname,description)
VALUES('" + subject + "','" + course + "','" + description + "')";

Mohammed Basith Programming with .NET


SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Saved Successfully...", "SYSTEM ALERT",
MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{
MessageBox.Show("Record Saving Unsuccessful...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}catch(Exception ex){
MessageBox.Show(ex.Message);}}

Figure 14 Subject update and remove interface

// subject search function


public static DataTable searchSubject(string subject){
DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_subject WHERE sname LIKE'" + subject
+ "%'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();

Mohammed Basith Programming with .NET


return dt;}

//subject update function


public static void updateSubject(string id, string subject, string course,string
description){
try{
DBConnection.getMyConnection();
String query = "UPDATE tbl_subject SET description='" + description +
"',cname='" + course + "',sname='" + subject + "' WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
MessageBox.Show("Record Modified Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

// subject remove function


public static void removeSubject(string id){
try{
DBConnection.getMyConnection();
String query = "DELETE FROM tbl_subject WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Removed Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{
MessageBox.Show("Record Modifing Unsuccessful...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

Mohammed Basith Programming with .NET


Figure 15 Question interface

// Load Questions to the session variables


public static DataTable loadQuestion(String subject){
DBConnection.getMyConnection();
String query = "SELECT TOP 15 question FROM tbl_question WHERE
subject='" + subject + "' ORDER BY NEWID()";
SqlCommand com = new SqlCommand(query, DBConnection.con);
SqlDataAdapter sda = new SqlDataAdapter(com);
DataTable dta = new DataTable();
sda.Fill(dta);
DBConnection.overConnection();
return dta;}

// Load Selected questions to the page labels according to index


public static void addQuestion(System.Web.UI.WebControls.Label question,
System.Web.UI.WebControls.RadioButtonList answer_list, String index,
System.Web.UI.WebControls.HiddenField correct_answer){
try{
con.Open();
String query = "SELECT question,ans1,ans2,ans3,ans4,correct FROM
tbl_question WHERE question='" + index + "'";

Mohammed Basith Programming with .NET


SqlCommand com = new SqlCommand(query, con);
SqlDataReader rd = com.ExecuteReader();
rd.Read();
question.Text = rd[0].ToString();
answer_list.Items.Add(rd[1].ToString());
answer_list.Items.Add(rd[2].ToString());
answer_list.Items.Add(rd[3].ToString());
answer_list.Items.Add(rd[4].ToString());
correct_answer.Value = rd[5].ToString();
con.Close();}
catch (Exception ex){
MessageBox.Show("error" + ex);}}

Control Structures
In programming, we can see the 03 kind of control structures. There are sequential,
selection and iteration. Control structure shows the program flow and without those,
we can`t create software. Any kind of control structure has various notations or
symbols to show program flow. Rectangle, parallelogram, circle, diamond and lines
with arrow heads are the basic symbols of this. In this situation, we use rectangle for
showing some kind of process like equations, function callings. We can use
parallelogram for showing input and output operations. Circles for connecting few
lines and we use diamond for showing decisions. Finally, arrow headed lines show the
program flow between notations.

Selection Control Structure


Selection control structure describes about decisions making. Decision making by a
computer is based on the same two-step process. In c#, decisions are made with the if
statement, also known as the selection statement. When processing an if statement,
the computer first evaluates some criterion or condition. If it is met, the specified
action is performed. 

Mohammed Basith Programming with .NET


Here are the code examples for Selection Control Structure.
If the conditional expression is true, the statements between the keywords THEN and
ELSE will be executed.  If the conditional expression is false, the statements between
the keywords ELSE and END If will be executed.

Following is the structure of if else condition.


IF (condition) {
} ELSE {
}

Following is the code example for if else condition.

Figure 16 Code example for If Else condition

When the situation arises where you need to choose between more than two
alternatives, we can use an extended form of the selection structure. That is switch
case structure.

Following is the structure of switch case.

SWITCH (expression) {

CASE constant expression 1:

statements;

break;

CASE constant expression 2:

statements;

break; }

Mohammed Basith Programming with .NET


Iteration Control Structure
Iteration control structure is a process which a set of instructions or structures are
repeated in a sequence a specified number of times or until a condition is met. When
the first set of instructions is executed again, it is called an iteration. In this situation,
we can introduce this as looping. In iteration structure, we can see 03 types of loops or
iterations. There are while loop, do-while loop, foreach loop and for loop.

We can use while loop structure when we want to repeat statements an indefinite
number of times, until condition is true. If the condition false, while loop stops it`s
works and program compiler come to end/close brace of the while loop.

Following is the structure of while loop

WHILE (condition) {
statements
}

Foreach loop
The foreach loop in C# executes a block of code on each element in an array or a
collection of items. When executing foreach loop it traversing items in a collection or
an array. The foreach loop is useful for traversing each item in an array or a collection
of items and displayed one by one. Foreach loop operates on collections of items, for
instance arrays or other built in list types.

foreach (condition) {
statements;
}

Following picture is a code example for foreach loop.

Figure 17 Code example for foreach loop

Mohammed Basith Programming with .NET


Do-while is another loop which repeat statements until its condition satisfy. This loop
most like while loop but do-while loop has a different. In while loop, if the condition
is false, the loop will be terminated. In that situation, we cannot get results through
while loop. But in do-while, we can get result at least one time. Because in this
situation, program compiler runs statements before check the condition. Following is
the structure of do-while loop.
DO {
} WHILE (condition);

For loop is the last loop in iteration control structure. We can create conditions,
variable declaration and initialization and increment and decrement operations in
parenthesis. In while loop and do-while loop, we can insert condition only. But in for
loop we can insert many. This is the difference between while and for loops.

Following is the structure of for loop.

FOR (start expression; condition; count expression) {


Block of codes
}

Sequence Control Structure


Sequence control structure is a control structure like a single line. It is deferent from
other two control structures. In this control structure, we can`t use any iteration or
selection. The sequence structure indicates instructions are to be executed one
statement at a time in the order they occur from top to bottom unless a different
control structure dictates otherwise.

Figure 18 Code example for sequence control structure

Mohammed Basith Programming with .NET


3.2 Provide evidences of the implemented techniques used to handle the errors
Error handling refers to the anticipation, detection, and resolution of
programming, application, and communications errors. Specialized programs,
called error handlers, are available for some applications. The best programs of
this type forestall errors if possible, recover from them when they occur without
terminating the application, or gracefully terminate an affected application and
save the error information to a log file. In programming, a development error is
one that can be prevented. Such an error can occur in syntax or logic. Syntax
errors, which are typographical mistakes or improper use of special characters,
are handled by rigorous proofreading. Logic errors, also called bugs, occur
when executed code does not produce the expected or desired result. Logic
errors are best handled by meticulous program debugging. A run-time error
takes place during the execution of a program, and usually happens because of
adverse system parameters or invalid input data. An example is the lack of
sufficient memory to run an application or a memory conflict with another
program. When we are coding, we have to follow an error handling method to
prevent exceptions or bugs. So, I also use 02 error handling methods when
creating this library management system called try catch block and if exception
throwing.

Try catch block


"Try" and "catch" are keywords that represent the handling of exceptions due to
data or coding errors during program execution. A try block is the block of code
in which exceptions occur. A catch block catches and handles try block
exceptions. The try/catch statement is used in many programming languages,
including C programming language (C++ and C#), Java, JavaScript and
Structured Query Language (SQL). Try defines a block of statements that may
throw an exception. When a specific type of exception occurs, a catch block
catches the exception. If an exception is not handled by try/catch blocks, the
exception escalates through the call stack until the exception is caught or an
error message is printed by the compiler. A try/catch block also may be nested
with one or more try/catch statements. Each try statement has a matching catch
statement to handle the exception.

Mohammed Basith Programming with .NET


If a catch statement does not match, the runtime system handles the exception.
Following is the structure of try catch block.
try {
} catch (Exception e) {
}

Following is the code example for try catch block.

Figure 19 Example for try-catch block

When we are using try catch block, we can add another part to the block called
finally. ‘finally’ part adds to end of the catch and we can add statement, conditions or
anything like that to this finally block.

try {
} catch(Exception) {
} finally {
}

Throwing an exception
In this situation, I have to use ‘throw’ key word. The C# throw keyword is used to
declare an exception. It gives an information to the programmer that there may occur
an exception so it is better for the programmer to provide the exception handling code
so that normal flow can be maintained. Exception Handling is mainly used to handle
the checked exceptions. If there occurs any unchecked exception such as
NullPointerException, it is programmer’s fault that he is not performing checkup
before the code being used. I didn`t use this one for my program, but we should have
to know about this this one.

Mohammed Basith Programming with .NET


3.3 Provide evidences of features of the selected Integrated Development
Environment (IDE) used to implement the system effectively.
I`m using ASP programming language for creating this automated system. ASP
is a popular object oriented programming language in present. This
programming language found and modified with a framework in Microsoft
Corporation. With this programming language, they introduced an integrated
development environment called visual studio to deal with this language. Visual
studio is the main IDE for the developing ASP web based applications.

Visual Studio uses Microsoft software development platforms such as Windows


API, Windows Forms, Windows Presentation Foundation, Windows Store
and Microsoft Silverlight. It can produce both native code and managed code.
Visual Studio includes a code editor supporting the code completion component
as well as code refactoring. The integrated debugger works both as a source
level debugger and a machine level debugger. Other built-in tools include a
forms designer for building GUI applications, web designer, class designer,
and database schema designer.

Visual Studio supports different programming languages and allows the code


editor and debugger to support nearly any programming language, provided a
language specific service exists. Built in languages include C, C++, VB.NET,
C#, and F#. Support for other languages such as Python, Ruby and Node.
Among others is available via language services installed separately. It also
supports XML/XSLT, HTML/XHTML, JavaScript and CSS. Java were
supported in the past.

And also, Visual studio has a user-friendly working area and because of that
programmer can interact with IDE easily and quickly. In this IDE has many
designing components like text boxes, combo boxes, buttons and so many
others. With these components, designer can design graphical user interfaces
easily. Designer just want to drag and drop the components into work space.

Mohammed Basith Programming with .NET


Following figure shows the tool box in visual studio.

Figure 20 Tool Box

And also, Visual Studio IDE has more other palates like solution explorer, server
explorer, team explorer, error list, Property window, output and many others. These
palates are also very important and it does various tasks and helps designers or
programmers to design or create software.

Mohammed Basith Programming with .NET


Solution Explorer

Solution explorer is the main palette in visual studio. This helps programmer or
designer to find current project forms or resources. Solution explorer shows the all the
images, forms, and configure files in project. We can rename, remove and add new
items to the project using solution explorer. Such as forms, databases, classes and so
many others. Without solution explorer, we can`t handle project folder easily.

Following figure shows the solution explorer

Figure 21 Solution Explorer

Mohammed Basith Programming with .NET


Server Explorer

Server explorer is another important and very useful palette in visual studio. Server
explorer shows the database details to users. In solution explorer, we can see the
databases, datasets, tables, constraints and others. Without server explorer, we cannot
handle server components properly. We can create tables, databases using server
explorer. With server explorer, users can handle data easily.

Following figure shows the server explorer

Figure 22 Server Explorer

Mohammed Basith Programming with .NET


Properties window

Use this window to view and change the design time properties and events of selected
objects that are located in editors and designers. You can also use
the Properties window to edit and view file, project, and solution properties. You can
find Properties Window on the View menu. You can also open it by pressing F4 or by
typing Properties in the Quick Launch window. The Properties window displays
different types of editing fields, depending on the needs of a particular property.
These edit fields include edit boxes, drop down lists, and links to custom editor dialog
boxes.

Following figure shows the properties window

Figure 23 Properties Window

Mohammed Basith Programming with .NET


As an ASP programmer, I have to use this because this IDE is very helpful and easy
to work with this one. Because of these facilities, I used this integrated development
environment to implement the software solution for XYZ Computer School.
4 Task 4
4.1 Critically review and test the implemented system and provide the
identified discrepancies.
Testing is the very essential part of the software industry. Because without
testing we cannot identify the errors or something wrong. Testing is executing
a system in order to identify any gaps, errors, or missing requirements in
contrary to the actual requirements. If there is some matter in code parts,
software and data can be corrupt. So, I create the test plan to perform testing
process for XYZ Institute`s online examination management system.

Online Examination management system (XYZ


Project Name
Institute)
Login
Add new student, update, remove, view and
search.
Add new lecturer, update, remove, view and
search.
Add new course, update, remove, view and
Test plan objectives search.
Add new subject, update, remove, view and
search.
Add new question, update, remove, view and
search.
Access management.
Make exams
Test type White box testing / Black box testing
Testing Process
Description
(Admin)
1. Login 1.1. Log to system according to
username and password.
2. Student 2.1. Add new student to the system.
2.2. Update and remove entered
student details.
2.3. Search book details.
3. Lecturer 3.1. Add new lecturer to the system.

Mohammed Basith Programming with .NET


3.2. Update and remove entered
lecturer details.
3.3. Search lecturer details
4. Course 4.1. Add new course to the system.
4.2. Update and remove entered course
details.
4.3. Search course details
5. Subject 5.1. Add new subject to the system.
5.2. Update and remove entered subject
details.
5.3. Search subject details
6. Question 6.1. Add new question to the system.
6.2. Update and remove entered
question details.
6.3. Search question details
7. Access 7.1. Create accounts for student and
Management lecturer.
7.2. Update and remove created
accounts.
7.3. Search accounts
Table 23 Admin test plan

Testing
Process Description
(Lecturer)
1. Questio 1.1. Update and remove entered question details.
n 1.2. Search question details
Table 24 Lecturer test plan

Testing
Process Description
(Student)
1. Make 1.1. Load questions.
exam 1.2. View questions
2. Results 2.1. Save results.
Table 25 Student test plan

Mohammed Basith Programming with .NET


Test cases according to the test plan

1. Login

Test Case ID Test data


Case 1.1 // Login To System function
public static DataTable loginFunction(string user,string password)
{DBConnection.getMyConnection();
SqlCommand cmd = new SqlCommand("select * from tbl_User where
username='" + user + "' and password='" + password + "'", con);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
sda.Fill(dt);
DBConnection.overConnection();
return dt;}
string access = "";
string name = "";
string nic = "";
String user = Txt_Login_Username.Text;
String pass = Txt_Login_Password.Text;
DataTable dt = Class_User.loginFunction(user,pass);
if (dt.Rows.Count == 1){
foreach (DataRow dr in dt.Rows){
name = dr[1].ToString();
access = dr[4].ToString();
nic = dr[5].ToString();}
MessageBox.Show("Logged as " + access);
if (access.Equals("Administrator")){
// Navigate to Main Window
Session["User"] = name;
Response.Redirect("Welcome_Admin.aspx", false);}
else if (access.Equals("Student")){

Mohammed Basith Programming with .NET


// Navigate to Main Window
Session["User"] = name;
Response.Redirect("Welcome_Student.aspx?nic=" + nic, false);}
else if (access.Equals("Lecturer")){
// Navigate to Main Window
Session["User"] = name;
Response.Redirect("Welcome_Lecturer.aspx", false);}}
else{MessageBox.Show("Please Check login credentials", "Login
Faild", MessageBoxButtons.OK, MessageBoxIcon.Warning);
Txt_Login_Username.Text = null;
Txt_Login_Password.Text = null;}

Purpose System needs to access multiple users. Without above function, user cannot
access to the system. Therefore, above code lines should be tested.

Results Show message including “Please Check login credentials” text.


Show message including “Logged as Administrator” text.
Show message including “Logged as Student” text.
Show message including “Logged as Lecturer” text.
Table 26 Login test case

2. Student

Test Case ID Test data


Case 2.1 // add student to the DB
Class_Student.addStudent(title, fname, lname, nic, dob, address, gender,
mobile, home, email, course);

public static void addStudent(string title, string fname, string


lname, string nic, string dob, string address, string gender, string mobile,
string home, string email, string course)
{DBConnection.getMyConnection();
String query = "INSERT INTO tbl_student
(title,fname,lname,nic,dob,address,gender,mobile,home,email,course)
VALUES('" + title + "','" + fname + "','" + lname + "','" + nic + "','" +
dob + "','" + address + "','" + gender + "','" + mobile + "','" + home +
"','" + email + "','" + course + "')";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record saved successfully...", "SYSTEM ALERT",
MessageBoxButtons.OK, MessageBoxIcon.Information);}

Mohammed Basith Programming with .NET


else{
MessageBox.Show("Record saving unsuccessful...", "SYSTEM ALERT",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}

Purpose System needs student details to handle exams. So, admin have to add student
details. Therefore, this function should be tested.
Results Show message including “Record Saved Successfully…!” text.
Show message including “Record saving unsuccessful…!” text.
Table 27 Add student test case

Test Case ID Test data


Case 2.2 // Student update function
public static void updateStudent(string id, string fname, string
lname, string nic, string dob, string address, string mobile, string home,
string email, string course)
{DBConnection.getMyConnection();
String query = "UPDATE tbl_student SET course='" + course +
"',email='" + email + "',home='" + home + "',mobile='" + mobile +
"',address='" + address + "',dob='" + dob + "',nic='" + nic + "',lname='" +
lname + "',fname='" + fname + "' WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
MessageBox.Show("Record Modified Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);
DBConnection.overConnection();}
// Student remove function
public static void removeStudent(string id)
{DBConnection.getMyConnection();
String query = "DELETE FROM tbl_student WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery(); if (result == 1){
MessageBox.Show("Record Removed Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{MessageBox.Show("Record Removing Unsuccessful...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}DBConnection.overConnection();}

Purpose System needs to update and remove student details. So, admin have to modify
and remove student details. Therefore, these functions should be tested.
Results Show message including “Record Modified Successfully…!” text.
Show message including “Record Removed Successfully…!” text.

Mohammed Basith Programming with .NET


Show message including “Record Removing Unsuccessful…!” text.
Table 28 Update and Remove test case

Test Case ID Test data


Case 2.3 Class_Student.updateStudent(id, fname, lname, nic, dob, address, mobile,
home, email, course);
//Search by first name
public static DataTable searchByFirstName(String first_name)
{DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_student WHERE fname='" + first_name + "'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}
//Search by last name
public static DataTable searchByLastName(String last_name)
{
DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_student WHERE lname='" +
last_name + "'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}
//Search by NIC
public static DataTable searchByNIC(String nic)
{DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_student WHERE nic='" + nic + "'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);

Mohammed Basith Programming with .NET


DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}

Purpose System needs to search student details. Because, without search functions
cannot update or remove. Therefore, these functions should be tested.
Results Load text boxes according to first name, last name or NIC
Table 29 Search student test case

3. Lecturer

Test Case ID Test data


Case 3.1 // add lecturer to DB
public static void addLecturer(string title, string fname, string
lname, string nic, string dob, string address, string gender, string mobile,
string home, string email){
DBConnection.getMyConnection();
String query = "INSERT INTO [tbl_lecturer]
(title,fname,lname,nic,dob,address,gender,mobile,home,email) VALUES('" +
title + "','" + fname + "','" + lname + "','" + nic + "','" + dob + "','" +
address + "','" + gender + "','" + mobile + "','" + home + "','" + email +
"')";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Saved Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{
MessageBox.Show("Record Saving Unsuccessful...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}

Purpose System needs lecturer details to handle questions. So, admin have to add
lecturer details. Therefore, this function should be tested.
Results Show message including “Record Saved Successfully…!” text.
Show message including “Record Saving unsuccessful…!” text.
Table 30 Add lecturer test case

Mohammed Basith Programming with .NET


Test Case ID Test data
Case 3.2 //update lecturer function
public static void updateLecturer(string id,string fname, string
lname, string nic, string dob, string address, string mobile, string home,
string email){try {DBConnection.getMyConnection();
String query = "UPDATE tbl_lecturer SET email='" + email +
"',home='" + home + "',mobile='" + mobile + "',address='" + address +
"',dob='" + dob + "',nic='" + nic + "',lname='" + lname + "',fname='" +
fname + "' WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
MessageBox.Show("Record Modified Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

// remove lecturer function


public static void removeLecturer(string id){
try{DBConnection.getMyConnection();
String query = "DELETE FROM tbl_lecturer WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Removed Successfully...",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{MessageBox.Show("Record Removing Unsuccessful...",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}catch (Exception ex){
MessageBox.Show(ex.Message);}}

Purpose System needs to update and remove lecturer details. So, admin have to

Mohammed Basith Programming with .NET


modify and remove lecturer details. Therefore, these functions should be
tested.
Results Show message including “Record Modified Successfully…!” text.
Show message including “Record Removed Successfully…!” text.
Show message including “Record Removing Unsuccessful…!” text.
Table 31 Update and Remove lecturer test case

Test Case ID Test data


Case 3.3 //Search by first name
public static DataTable searchByFirstName(String first_name)
{DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_lecturer WHERE fname='" + first_name + "'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}
//Search by last name
public static DataTable searchByLastName(String last_name){
DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_lecturer WHERE lname='" + last_name + "'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}
//Search by NIC
public static DataTable searchByNIC(String nic){
DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_lecturer WHERE nic='" + nic + "'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();

Mohammed Basith Programming with .NET


return dt;}

Purpose System needs to search lecturer details. Because, without search functions
cannot update or remove. Therefore, these functions should be tested.
Results Load text boxes according to first name, last name or NIC
Table 32 Search lecturer test case

4. Course

Test Case ID Test data


Case 4.1 //add Course to DB
public static void addCoursew(string course,string description){
try{
DBConnection.getMyConnection();
String query = "INSERT INTO [tbl_course](cname,description)
VALUES('" + course + "','" + description + "')";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Addedd Successfully...!","SYSTEM
ALERT",MessageBoxButtons.OK,MessageBoxIcon.Information);}
else{
MessageBox.Show("Record Adding Unsuccessful...!",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();
}catch(Exception ex){
MessageBox.Show(ex.Message); }}

Purpose System needs course details to handle questions. So, admin have to add
course details. Therefore, this function should be tested.
Results Show message including “Record Saved Successfully…!” text.
Show message including “Record Saving unsuccessful…!” text.
Table 33 Add course test case

Mohammed Basith Programming with .NET


Test Case ID Test data
Case 4.2 // Update course
public static void updateCourse(string id,string course,string
description){DBConnection.getMyConnection();
String query = "UPDATE tbl_course SET description='" +
description + "',cname='" + course + "' WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
MessageBox.Show("Record Modified Successfully...!", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);
DBConnection.overConnection();}

// remove course
public static void removeCourse(string id){
DBConnection.getMyConnection();
String query = "DELETE FROM tbl_course WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Removed Successfully...!", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{
MessageBox.Show("Record Removing Unsuccessful...!", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }
DBConnection.overConnection();}

Purpose System needs to update and remove course details. So, admin have to modify
and remove course details. Therefore, these functions should be tested.

Results Show message including “Record Modified Successfully…!” text.


Show message including “Record Removed Successfully…!” text.
Show message including “Record Removing Unsuccessful…!” text.

Mohammed Basith Programming with .NET


Table 34 Update and Remove course test case

Test Case ID Test data


Case 4.3 // Search course from DB according to course name
public static DataTable searchCourse(string course){
DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_course WHERE cname LIKE'" + course + "%'";
SqlCommand cmd = new SqlCommand(qry, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}

Purpose System needs to search course details. Because, without search functions
cannot update or remove. Therefore, these functions should be tested.

Results Load text boxes according to course


Table 35 Search course test case

5. Subject

Test Case ID Test data


Case 5.1 // Subject add function
public static void addSubject(string subject,string course,string
description){
try{DBConnection.getMyConnection();
String query = "INSERT INTO [tbl_subject]
(sname,cname,description) VALUES('" + subject + "','" + course + "','" +
description + "')";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Saved Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}

Mohammed Basith Programming with .NET


else{
MessageBox.Show("Record Saving Unsuccessful...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();
}catch(Exception ex){
MessageBox.Show(ex.Message);}}

Purpose System needs subject details to handle questions. So, admin have to add
subject details. Therefore, this function should be tested.

Results Show message including “Record Saved Successfully…!” text.


Show message including “Record Saving unsuccessful…!” text.
Table 36 Add subject test case

Test Case ID Test data


Case 5.2 //subject update function
public static void updateSubject(string id, string subject, string
course,string description){
try{DBConnection.getMyConnection();
String query = "UPDATE tbl_subject SET description='" +
description + "',cname='" + course + "',sname='" + subject + "' WHERE id='"
+ id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
MessageBox.Show("Record Modified Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

// subject remove function


public static void removeSubject(string id){
try{DBConnection.getMyConnection();
String query = "DELETE FROM tbl_subject WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Removed Successfully...",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{
MessageBox.Show("Record Modifing Unsuccessful...",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

Mohammed Basith Programming with .NET


Purpose System needs to update and remove subject details. So, admin have to modify
and remove subject details. Therefore, these functions should be tested.
Results Show message including “Record Modified Successfully…!” text.
Show message including “Record Removed Successfully…!” text.
Show message including “Record Removing Unsuccessful…!” text.
Table 37 Update and Remove subject test case

Test Case ID Test data


Case 5.3 // subject search function
public static DataTable searchSubject(string subject)
{DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_subject WHERE sname LIKE'" + subject + "%'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}

Purpose System needs to search subject details. Because, without search functions
cannot update or remove. Therefore, these functions should be tested.
Results Load text boxes according to subject
Table 38 Search subject test case

6. Question

Test Case ID Test data


Case 6.1 //add question function
public static void addQuestion(string subject,string question,string
ans1,string ans2,string ans3,string ans4,string correct_ans){
try{DBConnection.getMyConnection();
String query = "INSERT INTO [tbl_question]
(subject,question,ans1,ans2,ans3,ans4,correct) VALUES('" + subject + "','" +
question + "','" + ans1 + "','" + ans2 + "','" + ans3 + "','" + ans4 + "','"
+ correct_ans + "')";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Saved Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}

Mohammed Basith Programming with .NET


else{
MessageBox.Show("Record Saving Unsuccessful...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

Purpose System needs question details to handle questions. So, admin have to add
subject details. Therefore, this function should be tested.

Results Show message including “Record Saved Successfully…!” text.


Show message including “Record Saving unsuccessful…!” text.
Table 39 Add question test case

Test Case ID Test data


Case 6.2 // update question function
public static void updateQuestion(string id, string question, string
ans1, string ans2, string ans3, string ans4, string correct_ans,string
subject){try{DBConnection.getMyConnection();
String query = "UPDATE tbl_question SET subject='" + subject + "',correct='"
+ correct_ans + "',ans4='" + ans4 + "',ans3='" + ans3 + "',ans2='" + ans2 +
"',ans1='" + ans1 + "',question='" + question + "' WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
MessageBox.Show("Record Modified Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

//remove question function


public static void removeQuestion(string id){
try{DBConnection.getMyConnection();
String query = "DELETE FROM tbl_question WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Removes Successfully...",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{MessageBox.Show("Record removing Unsuccessful...",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

Purpose System needs to update and remove question details. So, admin have to

Mohammed Basith Programming with .NET


modify and remove question details. Therefore, these functions should be
tested.
Results Show message including “Record Modified Successfully…!” text.
Show message including “Record Removed Successfully…!” text.
Show message including “Record Removing Unsuccessful…!” text.
Table 40 Update and Remove question test case

Test Case ID Test data


Case 6.3 // search question function
public static DataTable searchQuestion(string question){
DBConnection.getMyConnection();string qry = "SELECT * FROM
tbl_question WHERE question LIKE'" + question + "%'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}

Purpose System needs to search question details. Because, without search functions
cannot update or remove. Therefore, these functions should be tested.
Results Load text boxes according to question
Table 41 Search question test case

7. Access Management
Test Case ID Test data
Case 7.1 // add user function
public static void addUsers(string fname,string nic,string
user,string password,string constant){
try{DBConnection.getMyConnection();
String query = "INSERT INTO [tbl_user]
(account,nic,username,password,access) VALUES('" + fname + "','" + nic +
"','" + user + "','" + password + "','" + constant + "')";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Account Created Successfully...!",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}

Mohammed Basith Programming with .NET


else{
MessageBox.Show("Account Creating Unsuccessful...!",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}
}

Purpose Student and lecturer need to access to the system. So, access to the system
they need user accounts. Admin can create accounts for them through this
function. Therefore, this function should be tested.
Results Show message including “Account Created Successfully…!” text.
Show message including “Account Creating unsuccessful…!” text.
Table 42 Add user test case

Test Case ID Test data


Case 7.2 // update user function
public static void updateUser(string id, string user, string
password){try{
DBConnection.getMyConnection();
String query = "UPDATE tbl_user SET password='" + password +
"',username='" + user + "' WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
MessageBox.Show("Account Modified Successfully...!", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

//remove user function


public static void removeUser(string id){
try{
DBConnection.getMyConnection();
String query = "DELETE FROM tbl_user WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Account Removed Successfully...!",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}
else{
MessageBox.Show("Account Removing Unsuccessful...!",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}

Mohammed Basith Programming with .NET


catch (Exception ex){
MessageBox.Show(ex.Message);}}

Purpose System needs to update and remove user account. So, admin have to modify
and remove accounts. Therefore, these functions should be tested.
Results Show message including “Account Modified Successfully…!” text.
Show message including “Account Removed Successfully…!” text.
Show message including “Account Removing Unsuccessful…!” text.
Table 43 Update and Remove accounts test case

Test Case ID Test data


Case 7.3 // Search user function
public static DataTable searchUser(string nic){
DBConnection.getMyConnection();
string qry = "SELECT * FROM tbl_user WHERE nic LIKE'" + nic +
"%'";
SqlCommand cmd = new SqlCommand(qry, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;
}

Purpose System needs to search accounts. Because, without search functions cannot
update or remove. Therefore, these functions should be tested.
Results Load text boxes according to NIC
Table 44 Search accounts test case

Mohammed Basith Programming with .NET


Lecturer Menu

1.Question

Test Case ID Test data


Case 1.1 // update question function
public static void updateQuestion(string id, string question, string
ans1, string ans2, string ans3, string ans4, string correct_ans,string
subject){try{DBConnection.getMyConnection();
String query = "UPDATE tbl_question SET subject='" + subject + "',correct='"
+ correct_ans + "',ans4='" + ans4 + "',ans3='" + ans3 + "',ans2='" + ans2 +
"',ans1='" + ans1 + "',question='" + question + "' WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
MessageBox.Show("Record Modified Successfully...", "SYSTEM
ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

//remove question function


public static void removeQuestion(string id){
try{DBConnection.getMyConnection();
String query = "DELETE FROM tbl_question WHERE id='" + id + "'";
SqlCommand com = new SqlCommand(query, DBConnection.con);
int result = com.ExecuteNonQuery();
if (result == 1){
MessageBox.Show("Record Removes Successfully...",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Information);}

Mohammed Basith Programming with .NET


else{MessageBox.Show("Record removing Unsuccessful...",
"SYSTEM ALERT", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);}
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

Purpose System needs to update and remove question details. So, admin have to
modify and remove question details. Therefore, these functions should be
tested.
Results Show message including “Record Modified Successfully…!” text.
Show message including “Record Removed Successfully…!” text.
Show message including “Record Removing Unsuccessful…!” text.
Table 45 Update and Remove question test case

Test Case ID Test data


Case 1.2 // search question function
public static DataTable searchQuestion(string question){
DBConnection.getMyConnection();string qry = "SELECT * FROM
tbl_question WHERE question LIKE'" + question + "%'";
SqlCommand cmd = new SqlCommand(qry, DBConnection.con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
DBConnection.overConnection();
return dt;}

Purpose System needs to search question details. Because, without search functions
cannot update or remove. Therefore, these functions should be tested.
Results Load text boxes according to question
Table 46 Search question test case

Mohammed Basith Programming with .NET


Student Menu

1.New Exam

Test Case ID Test data


Case 1.1 // Load Questions to the session variables
public static DataTable loadQuestion(String subject){
DBConnection.getMyConnection();
String query = "SELECT TOP 15 question FROM tbl_question WHERE
subject='" + subject + "' ORDER BY NEWID()";
SqlCommand com = new SqlCommand(query, DBConnection.con);
SqlDataAdapter sda = new SqlDataAdapter(com);
DataTable dta = new DataTable();
sda.Fill(dta);
DBConnection.overConnection();
return dta;}
DataTable dta = Class_Exam.loadQuestion(subject_name);
Session["Q1"] = dta.Rows[0][0].ToString();
Session["Q2"] = dta.Rows[1][0].ToString();
Session["Q3"] = dta.Rows[2][0].ToString();
Session["Q4"] = dta.Rows[3][0].ToString();
Session["Q5"] = dta.Rows[4][0].ToString();
Session["Q6"] = dta.Rows[5][0].ToString();
Session["Q7"] = dta.Rows[6][0].ToString();
Session["Q8"] = dta.Rows[7][0].ToString();
Session["Q9"] = dta.Rows[8][0].ToString();
Session["Q10"] = dta.Rows[9][0].ToString();

Mohammed Basith Programming with .NET


Session["Q11"] = dta.Rows[10][0].ToString();
Session["Q12"] = dta.Rows[11][0].ToString();
Session["Q13"] = dta.Rows[12][0].ToString();
Session["Q14"] = dta.Rows[13][0].ToString();
Session["Q15"] = dta.Rows[14][0].ToString();

Purpose System needs to load 15 questions for the exam. So, it should be random
records. Without this function, system cannot load questions. Therefore, this
should be checked.
Results Parsing the questions to the each page.
Table 47 Load questions to sessions test case

Test Case ID Test data


Case 1.2 // Load Selected questions to the page labels according to index
public static void addQuestion(System.Web.UI.WebControls.Label
question, System.Web.UI.WebControls.RadioButtonList answer_list, String
index, System.Web.UI.WebControls.HiddenField correct_answer){
try{
con.Open();
String query = "SELECT question,ans1,ans2,ans3,ans4,correct
FROM tbl_question WHERE question='" + index + "'";
SqlCommand com = new SqlCommand(query, con);
SqlDataReader rd = com.ExecuteReader();
rd.Read();
question.Text = rd[0].ToString();
answer_list.Items.Add(rd[1].ToString());
answer_list.Items.Add(rd[2].ToString());
answer_list.Items.Add(rd[3].ToString());
answer_list.Items.Add(rd[4].ToString());
correct_answer.Value = rd[5].ToString();
con.Close();
}catch (Exception ex){
MessageBox.Show("error" + ex);}}

Purpose System needs to view loaded questions in the pages.


Results View loaded questions in the pages
Table 48 View loaded questions test case

2.Results

Mohammed Basith Programming with .NET


Test Case ID Test data
Case 2.1 Class_Exam.addQuestionToDB(first_name, sub, NIC);
// Add mark details to the DB
public static void addQuestionToDB(string first_name,string
sub,string NIC){
try{
DBConnection.getMyConnection();
String query = "INSERT INTO [tbl_grades]
(fname,subject,nic,marks) VALUES('" + first_name + "','" + sub + "','" + NIC
+ "','" + grade + "')";
SqlCommand com = new SqlCommand(query, DBConnection.con);
com.ExecuteNonQuery();
DBConnection.overConnection();}
catch (Exception ex){
MessageBox.Show(ex.Message);}}

Purpose System needs to add student grades after the exam finished.
Results Save data in the Database.
Table 49 Add grades to database test case

Discrepancies

I was trying to load all the questions to the one page. But as the instructions of the
lecturer, I have to change my mind and add the one question per page. So, I have to
use sessions to fulfill this requirement and it took some time to implement this
session. After that I have to find retrieving methods and I have found it.

And also, I have to find the solution for the result counting, because, we can get
results easily, if the questions and answers are in same page. But in this situation, I
have to find the solution for this matter. As the solution, I have created the result
count method and this method gets 02 parameters called correct answer and selected
answer. After parsing those parameters, result count method counts the results.

So, these are the main difficulties that I have to face.

Mohammed Basith Programming with .NET


4.2 Evaluate independent feedback of the users to identify the limitations of the
implemented system and make recommendations for further
improvements to overcome the limitations identified.

This online examination management application is the newly created one.


Therefore, this application wants test and identify the errors to fix them.
Without testing the newly created software solution, we cannot assure that
software. It can be included many bugs or irrelevant thing to client and as a
programmer, we should handle all of them. That’s how a qualified and error
free software solution created. In testing phase, programmer wants to get details
from clients because clients should have to give accurate details to the
programmers. But sometimes, this process can be little bit hard due to many
reasons like time management issues, busyness of the clients or responsible
persons and others. But this phase is the most important and very essential one.
Hence, I created the questionnaire for gather information about this software.
Because of using this method, I can gather information effectively.

When we using questionnaire, tester can identify that what should be tested and
software`s functionality. Therefore, tester can evaluate the software easily. After
the testing process, tester can fill the questionnaire and handover it to the
programmer. Then programmer check again the software and he can fix the

Mohammed Basith Programming with .NET


identified bugs. This is the usual process of testing. If we use questionnaire, we
can compare the properties of software with those of hardware and difference in
their development, management and control processes understand different
activities and focuses of software development process and its work product at
different steps.

This online examination management system is the newly created software


solution. So, school`s staff members cannot use this system quickly. Because,
they had used this system before. So, I have to practice them to handle this
system correctly. It is the one of my responsibility. Therefore, I started parallel
run program with school staff. Because of that school staff can get a quick idea
about function of the system and also, they can learn how to operate them. So, I
provide above feedback form to them when they perform parallel run program.

Future Improvements

Examination management system provide access privileges within students and


lecturers and administrator also. And also, using this system, administrator can create
the user accounts for students and lecturers to access to the system. After that,
students and lecturers can log in to the system using that created user credentials and
these two kinds of users have not a privilege to modify own access credentials.
Administrator can see the all of credentials and member cannot see the even own
credentials. I prevented it for security reasons. But according to the feedback forms
that I included in appendix they want to show password from the system. Lecturers
want to change the own access credentials through the system. Therefore, I will give
this requirement as a version update.

Currently, user cannot get backups through this system because I didn`t provide that
facility. But, they need this function because, these details are the most important
thing in the whole system and it should be accurate. Sometimes, system data can be
corrupted due to wrong operation or external factor. At that time, they can save their
stored details if they can get a backup from system. Therefore, I will give the solution
for this matter in future.

Mohammed Basith Programming with .NET


In this system, I have hidden some data form users. Some tables don`t view some user
inputted data, because, that data doesn`t want to show to the users in the tables,
because, I have provided the search function for search all the user inputted details.
Therefore, I removed some columns when showing them to the users.

In current system, there is no any notification system. According to feedback form,


she suggested the 02 methods for notification system. First one is via email. Email is
the speed method for notification and I can distribute examination marks, received
time slots, if the student has through the email. This is the good technology for
notifications. Because, emails are safe and quick. With this function, students cannot
cheat to their parents. Sometimes, student can be forgotten to time slots and
sometimes they can be forgotten the marks of the exam. When I provide this email
notification facility, administrator doesn’t want to worry about that, because, this
function will be fully automated one. The other one is SMS. Short message service is
also speed way to spread notifications.

4.3 Prepare a user documentation and the technical documentation


4.3.1 User Document

XYZ INSTITUTE
Online Examination Management
System

Mohammed Basith Programming with .NET


(OEMS)

User Document

Table of Contents

1. Introduction
2. Installing the Software
2.1. Hardware and
software requirements
2.2. Initial
Installation
3. User Interface Guide

Mohammed Basith Programming with .NET


1. Introduction

XYZ institute is the leading institute among other institutions. But XYZ institute
currently use paper based manual system to exams and to perform other day to
day activities. Paper based system has many limitations and problems. Institute
staff has to face all of this problem. So, they decided to change this manual, old
system to computer based system. A qualified web based system is always reliable
and error free. So, they don`t want to worry and web based system handle all the
exams and calculations. OEMS helps them to handle all of day to day activities
like student registration for courses, add new question according to subject, exam
limitations and others.

2. Installing the software (OEMS)

XYZ Institute`s online examination management system can setup easily. Institute
staff can implement the system in few steps. Please follow the install instructions.

Mohammed Basith Programming with .NET


2.1. Hardware and software requirements

Before you install this system to your computer, you must fulfill following
requirements. This will have an impact for software`s performance.

Hardware requirements
 Dual Core (1.5Ghz minimum) Processor
 1 GB Main Memory (2 GB Recommended)
 64 MB Video Memory
 80 GB HDD
 DVD Rom/Writer
 UPS

Software requirements
 Windows 7 or Higher
 .Net Framework 4.5
 Microsoft Visual C++ 2012 Redistributable (x86/ x64)
 Proper anti-virus
 Google Chrome or Internet Explorer (version 11 or higher)

2.2. Initial Installation

Install Visual C++ 2012 redistributable

Mohammed Basith Programming with .NET


Figure 24 VC redistributable installation

 Double click on the executable file under install/vcredist_x64.exe and Tick “I


agree to the license, terms and conditions” and then click Install button.
 It will take few minutes to install.

Figure 25 VC redistributable installation

Mohammed Basith Programming with .NET


Figure 26 VC redistributable installation

If the installation is finished, then click restart.

3. User Interfaces Guide.

3.1. Graphical User Interfaces

 Login
 Student
o Add Student
o Change Student
o View Student
o View Grades
 Lecturer
o Add lecturer
o Change Lecturer
o View Lecturer
 Course
o Add Course
o Change Course
o View Course

Mohammed Basith Programming with .NET


 Subject
o Add Subject
o Change Subject
o View Subject
 Question
o Add Question
o Change Question
o View Question
 Access management
o Create Student Account
o Create Lecturer Account
o Change Accounts
o View Accounts
 Exam
o New Exam

Login

Figure 27 Login interface

Mohammed Basith Programming with .NET


Input correct access credentials to access to the system. If credentials are incorrect,
you cannot access to the system through this interface. After inputting the correct
credentials, you have to click on ‘Login’ button and system will show your access
level as a system alert.
Admin Dashboard

Figure 28 Admin dashboard


This interface has 06 choices and admin can select one of this 06 choices. For
example, if admin wants to add a new student to the system, admin wants to select
‘Add Student’ sub category under ‘Student’.

Add Student

Figure 29 Add student interface

Mohammed Basith Programming with .NET


If admin wants to add a new student, admin needs to select this interface. After
selecting this, admin can add the student details and click on ‘Save’ button. Then
system will store the student details in the database. If admin wants to go back, click
on ‘Cancel’ button.

Change Student

Figure 30 Change student interface

If admin wants to modify or remove student details, admin needs to select this
interface. Admin can search students by using student`s first name, last name or NIC
no. If admin wants to update, click on ‘Update’ button and if admin wants to remove
current record just click on ‘Remove’ button.

View Student

Figure 31 View student interface

Admin can view all the students through this interface.

Mohammed Basith Programming with .NET


View Grades

Figure 32 Student grades interface

This interface shows the all student grades of the exams. And also, admin can count
the attempts of each student.

Add Lecturer

Figure 33 Add lecturer interface

Mohammed Basith Programming with .NET


If admin wants to add a new lecturer, admin needs to select this interface. After
selecting this, admin can add the lecturer details and click on ‘Save’ button. Then
system will store the lecturer details in the database. If admin wants to go back, click
on ‘Cancel’ button.

Change Lecturer

Figure 34 Change lecturer interface

If admin wants to modify or remove lecturer details, admin needs to select this
interface. Admin can search lecturers by using lecturer`s first name, last name or NIC
no. If admin wants to update, click on ‘Update’ button and if admin wants to remove
current record just click on ‘Remove’ button.

View Lecturer

Figure 35 View lecturer interface

Admin can view all the lecturer through this interface.

Mohammed Basith Programming with .NET


Add Course

Figure 36 Add course interface

If admin wants to add a new course, admin needs to select this interface. After
selecting this, admin can add the course details and click on ‘Save’ button. Then
system will store the course details in the database. If admin wants to go back, click
on ‘Cancel’ button.

Change Course

Mohammed Basith Programming with .NET


Figure 37 change course interface

If admin wants to modify or remove course details, admin needs to select this
interface. Admin can search course by using course name. If admin wants to update,
click on ‘Update’ button and if admin wants to remove current record just click on
‘Remove’ button.

View Course

Figure 38 View course Interface

Admin can view all the courses through this interface.

Add Subject

Mohammed Basith Programming with .NET


Figure 39Add subject interface

If admin wants to add a new subject, admin needs to select this interface. After
selecting this, admin can add the subject details and click on ‘Save’ button. Then
system will store the subject details in the database. If admin wants to go back, click
on ‘Cancel’ button.

Change Subject

Figure 40 Change subject interface

If admin wants to modify or remove subject details, admin needs to select this
interface. Admin can search course by using subject name. If admin wants to update,
click on ‘Update’ button and if admin wants to remove current record just click on
‘Remove’ button.

Mohammed Basith Programming with .NET


View Subject

Figure 41 View subject interface

Admin can view all the subjects through this interface.

Add Question

Figure 42 Add question interface

If admin wants to add a new question, admin needs to select this interface. After
selecting this, admin can add the question details and click on ‘Save’ button. Then
system will store the questions in the database. If admin wants to go back, click on
‘Cancel’ button.

Mohammed Basith Programming with .NET


Change Question

Figure 43 Change question interface


If admin wants to modify or remove questions, admin needs to select this interface.
Admin can search question by using question. If admin wants to update, click on
‘Update’ button and if admin wants to remove current record just click on ‘Remove’
button.

View Question

Figure 44 View question interface


Admin can view all the questions through this interface.

Create Student user accounts

Mohammed Basith Programming with .NET


Figure 45 Create student user account interface

If admin wants to create student accounts, admin needs to select this interface. After
selecting this, admin can add the create student accounts and click on ‘Save’ button.
Then system will store the account details in the database. If admin wants to go back,
click on ‘Cancel’ button.

Create Lecturer user accounts

Figure 46 Create lecturer user accounts

If admin wants to create lecturer accounts, admin needs to select this interface. After
selecting this, admin can add the create lecturer accounts and click on ‘Save’ button.
Then system will store the account details in the database. If admin wants to go back,
click on ‘Cancel’ button.

Mohammed Basith Programming with .NET


Change User Accounts

Figure 47 Change user accounts


If admin wants to modify or remove accounts, admin needs to select this interface.
Admin can search user by using NIC no. If admin wants to update, click on ‘Update’
button and if admin wants to remove current record just click on ‘Remove’ button.

View User Accounts

Figure 48 View user accounts

Admin can view all the user accounts according to access level through this interface.

Lecturer Dashboard

Mohammed Basith Programming with .NET


Figure 49 Lecturer dashboard interface

This interface has 02 choices and lecturer can select one of this 02 choices.

Student Dashboard

Figure 50 Student dashboard interface

This interface has 01 choices and student have to select that.

Mohammed Basith Programming with .NET


Exam Selection

Figure 51 Exam selection interface

When doing an exam, student have to select the subject first, because exams exist
according to subjects. This interface shows the selected course according to logged
student and student need to select the subject and click on ‘New Exam’ button to
begin the exam.
4.3.2 Technical Document
 Purpose
This technical document describes all the features and requirements of the newly
created examination management software. I have created this for programmers in
our side. Therefore, this should be very accurate. And also, programmers can get a
complete idea and this guide to build the software solution for XYZ School. Users
also use this document to get and exact idea about system and how to interact with
function in the system.

 Introduction
XYZ is the leading IT school. This is the very famous and well qualified school
for higher educations in IT. But XYZ School is using the paper base system to
keep records of the student examination details and lecturer details. This paper
base manual system has many limitations and problems. So, XYZ School
management decided to switch this manual system into automated computer based
system. They hope to solve problems with this automated system. With this newly

Mohammed Basith Programming with .NET


created system, they can do their day to day activities like add students to the
courses, keep student, lecturer, modules and exam details easily.

 Functions of the system

OEMS

Admin Functions Lecturer Functions Student Functions

Manage student Manage lecturer Manage Doing exams


details details questions

Manage Course Manage subject View exam View exam


details details grades grades

Manage user Manage


access questions

Manage exam
results

Figure 52 System functions

 Functional requirements
The Functional Requirements shows the operations and activities that a system
must be able to perform. This is designed to be read by a general audience.
Readers should understand the system, but no particular technical knowledge
should be required to understand the document. I mentioned the functions
available for Administrator, Lecturer and Students in here.

Functional requirements of Administrator


 Login- This is primary security step in this system and admin should enter
valid user name and password to go through this function. Otherwise admin
cannot access to the system.
 Add students- Admin can add student details using this function.
 Update student details- Admin can modify existing student details using this
function.
 Remove student- Admin can remove unwanted student details using this
function.

Mohammed Basith Programming with .NET


 Search student- Admin can search student details according to first name, last
name or NIC.
 View grades- Admin can view student`s exam grades using this function.
 Add lecturer- Admin can add lecturer details using this function.
 Update lecturer details- Admin can modify existing lecturer details using this
function.
 Remove lecturer- Admin can remove unwanted lecturer details using this
function.
 Search lecturer- Admin can search lecturer details according to first name, last
name or NIC.
 Add Course- Admin can add course details using this function.
 Update Course details- Admin can modify existing course details using this
function.
 Remove Course- Admin can remove unwanted course details using this
function.
 Search Course- Admin can search course details according to course name.
 Add subject- Admin can add subject details using this function.
 Update subject details- Admin can modify existing subject details using this
function.
 Remove subject- Admin can remove unwanted subject details using this function.
 Search subject- Admin can search subject details according to subject name.
 View subject- View Subject according to course.
 Add question- Admin can add question details using this function.
 Update question details- Admin can modify existing question details using this
function.
 Remove question- Admin can remove unwanted question details using this
function.
 Search question- Admin can search question details.
 View question- View questions according to subject.
 Create user account for student- Admin can create user accounts for students
using this function.

Mohammed Basith Programming with .NET


 Create user account for lecturer- Admin can create user accounts for lecturer
using this function.
 Update user account details- Admin can modify existing user account details
using this function.
 Remove question- Admin can remove unwanted user accounts using this function.
 Search question- Admin can search user details according to NIC.
 Log out- Admin can logout from the system.

Functional requirements for lecturer


 Login- Lecturer can login to the system by entering accurate username and
password.
 Update question details- Lecturer can modify existing question details using this
function.
 Remove question- Lecturer can remove unwanted question details using this
function.
 Search question- Lecturer can search question details.
 View question- View questions according to subject.
 View grades- Lecturer can view student`s exam grades using this function.
 Log out- Lecturer can logout from the system.

Functional requirements for student


 Login- Student can login to the system by entering accurate username and
password.
 Doing an exam- Student can make an exam according to subject using this
function.
 View grades- Student can view own exam grades using this function.
 Log out- Student can logout from the system.

Non-Functional Requirements
Basically, Non-functional requirements describe how the system works,
while functional requirements describe what the system should do.

Usability

Mohammed Basith Programming with .NET


 Users can work with software easily.
 User don’t want to add same details over and over again.
 User can search relevant details easily.
 User can perform many functions in one interface.

Portability
 This is windows based system. So, this software works on windows platform
only.

Operability
 Users - School authorized staff members, Students.
 Required Software – Visual C++ 2010/2013 redistributable.

Security
 All the important data adding part done by administrator. Because it prevents
the interference of unauthorized persons.
 Only administrator can access to the user access management.

Performance
 System functions and database response quickly.
 This system available in anytime.
 Because of using special techniques greatly decreases the dump file count.
Cultural, Political and Legal requirements
 System compiles all the government rules and conditions.
 According to the agreement, provided the best solution for XYZ School.
 There are no any other religion symbols and others.

User Interfaces requirements


 Interfaces are user friendly and eye catching.
 Reduce eye strain in long sessions.

Hardware requirements

Mohammed Basith Programming with .NET


 Dual Core (1.5Ghz minimum) Processor
 1 GB Main Memory (2 GB Recommended)
 64 MB Video Memory
 80 GB HDD
 DVD Rom/Writer
 UPS

Software requirements
 Windows 7 or Higher
 .Net Framework 4.5
 Microsoft Visual C++ 2012 Redistributable (x86/ x64)
 Proper anti-virus

Main Inputs to the system


 Student details
 Lecturer details
 Course details
 Subject details
 Question details

Main Outputs to the system


 Module wise exam papers
 View all the entered details
5 Appendix A

Mohammed Basith Programming with .NET


5.1 Gantt chart for assignment

6 Appendix B

Mohammed Basith Programming with .NET


Name/Designation/Department: -
……………………………………………………….....

Excellent Average
Poor

1. Is this system easy to install?

2. Is this software user friendly?

3. Response time of the functions?

4. How is the security of the system?

5. How is the user manual?

6. How likely are you to recommend this?

7. Is it easy to go through the function?

8. Give the feedback about functions.

9. What do you think about the system (limitations)?

10. Give your idea to improve this software

7 Reference

Mohammed Basith Programming with .NET


Bhujbal, S. (2012). .Net framework features from .Net 2.0 to .Net 4.5. [Online]
Available at: http://www.c-sharpcorner.com/UploadFile/sujit9923/net-
framework-features-fro m-net-2-0-to-4-5/. [Accessed on 03 January 2018]

Bychkov, D. (2013). Desktop vs. web applications: a deeper look and


comparison. [Online] Available at: https://www. seguetech.com/ desktop- vs-
web-applications/. [Accessed on 08 January 2018]

Dajbych, V. (2013). Overview of the .NET framework. [Online] Available at:


https://www.codeproject.com/Articles/680100/Overview-of-the-NET-
Framework. [Accessed on 02 January 2018]

Mohan, S. (2016). .NET and its advantages / disadvantages – all you need to
know. [Online] Available at: https://www.weblineindia.com/blog/net-and-its-
advantag es-disadvantages-all-you-need-to-know/. [Accessed on 03 January
2018]

Nyamweya, S. (2014). The .NET framework and its characteristics. [Online]


Available at: https://hubpages.com/technology/The-NET-Framework-And-Its-
Characteristics. [Accessed on 04 January 2018]

Pawar, S. (2015). .NET framework overview. [Online] Available at:


http://www.c-sharpcorner.com/UploadFile/cb1429/net-framework-overview/.
[Accessed on 07 January 2018]

Ramoliya, K. (2016). .NET framework evolution. [Online] Available at: http://


www.c-sharpcorner.com/article/net-framework-evolution/. [Accessed on 08
January 2018]

Velayudhan, J. K. (2013). Interoperability feature in .NET framework and how to


communicate with a COM component from .NET. [Online] Available at:
https://www. codeproject.com/Articles/588865/Interoperability-feature-in-NET.
[Accessed on 03 January 2018]

Walden, C. (2017). 17 reasons to use visual studio 2017. [Online] Available at:
https:// blogs. technet. microsoft.com/ uktechnet/ 2017/ 03/ 14/ 17 –reasons -to-
use-visual-studio-2017/. [Accessed on 19 January 2018]

Mohammed Basith Programming with .NET

You might also like