Sei sulla pagina 1di 72

1.

INTRODUCTION

Developing effective mechanisms for feedback collection in learning environments is


particularly important at the frontiers of new knowledge .Valuing and asking for feedback has
recognized benefits for both staff and students. For Staff to provide information for course
design to further develop teaching skills as well as to provide better service to the students.
For Students to feel valued and 'listened' to have ownership in their own learning to develop
reflective thinking to be better informed in selecting a course.

The android based feedback application, described in this project is such an


application for collecting feedback through android mobile intended to support feedback
collection in educational environments. Faculty-feedback system is intended to collect
feedback about faculty from students.

1
2. Background

2.1 Existing system

The existing method for collecting feedback about the faculty from the students
makes use of printed forms on paper. Students write their feedback and submit it to the
faculty. This is very time consuming and costly procedure. Preparing the printed form
and collecting the forms back from the students is a time consuming procedure.

Disadvantages:

 This is very time consuming and costly procedure.


 The existing system requires more manual work.

2
3. Proposed System

3.1 About Proposed System

The proposed system is an android mobile application for feedback collection.


This system enables the faculty to easily get feedback from their students. The user can
login to the system with a valid ID and password, fills the feedback form and submit
the feedback to the system. So, only valid users can access it from anywhere. The
administrator can later analyze the feedback. This is a platform independent system. So
there is no need for installing any additional software on the client systems. The new
system issues a feedback form for users. The user answers the question and submits
this feedback. This is very effective, fast and cost effective method for collecting the
feedback.

Advantages

 Manage all faculty and students from a single mobile


 Consumes less time to operate
 Cost effective
 Anywhere, anytime Availability

3
3.2 Modules
In the proposed system we have two modules. They are
 Administrator module
 Student module
Administrator module:
Administrator is the person, who is having the responsibility to manage all the
records. Administrator can login to the system with a valid ID and password.
Administrator can perform the following operations,
 Add new students.
 Delete or Edit existing students.
 Add new faculty.
 Delete faculty.
 Analyzes the feedback given by the students.
Student module:
The student is a person who satisfies the constraint of 75% attendance.
Following are the actions associated with the Student,
 Student can login to the system with a valid ID and password.
 If valid user then feedback form is displayed.
 Then student can answer the questionnaires and submit the form to the feedback
system.

4
4. EXPERIMENTAL ASPECTS

4.1 SYSTEM OVERVIEW


4.1.1ANDROID COMPONENTS
This project is built using following Android components. They are,
 Intents
 Activity
 Intents
Intent is a messaging object you can use to request an action from another
application component. Although intents facilitate communication between
components in several ways, there are three fundamental use cases:

 Activity
An Activity represents a single screen in application. You can start a new instance
of an Activity by passing an Intent to startActivity( ). The Intent describes the activity
to start and carries any necessary data.
If you want to receive a result from the activity when it finishes call
startActivityForResult(). Your activity receives the result as a separate Intent object in
your activity’s onActivityResult( ) callback. For more information, see the Activities
guide.

4.1.2 Activities
An Activity is an application component that provides a screen with which
users can interact in order to do something, such as dial the phone , take a photo, send
an email, or view a map. Each activity is given a window in which to draw its user
interface. The window typically fills the screen, but may be smaller than the screen and
float on top of other windows.

An application usually consists of multiple activities that are loosely bound to


each other. Typically, one activity in an application is specified as the “main” activity,
which is presented to the user when launching the application for the first time. Each
activity can then start another activity in order to perform different actions. Each time a
new activity starts, the previous activity is stopped, but the system preserves the
activity in a stack (the “back stack”).

When a new activity starts, it is pushed on to the back stack and takes user
focus. The back stack abides to the basic “last in, first out” stack mechanism, so, when
the user is done with the current activity and presses the back button, it is popped from
the stack and the previous activity resumes. (the back stack is discussed more in the
tasks and back stack document.)

5
When an activity is stopped because a new activity starts, it is notified of this
change in state through the activity’s life cycle call back methods. There are several
call back methods that an activity might receive, due to a change in its state whether
the system is creating it, stopping it, resuming it, or destroying it and each call back
provides you the opportunity to perform specific work that’s appropriate to that state
change.

4.2 SOFTWARE REQIREMENT SPECIFICATIONS

Introduction

A Software Requirements Specification (SRS) is a complete description of the


behavior of the system to be developed. It includes a set of use cases that describe all
the interactions the users will have with the software. Use cases are also known as
functional requirements. In addition to uses cases, the SRS also contains non-
functional (or supplementary) requirements. Non-functional requirements are
requirements which impose constraints on the design or implementation (such as
performance engineering requirements, quality standards, or design constraints).

4.2.1 HARDWARE REQUIREMENTS

The most common set of requirements defined by any operating system or


software application is the physical computer resources, also known as hardware, a
hardware requirements list is often accompanied by a hardware compatibility list
(HCL), especially in case of operating systems. An HCL lists tested, compatible, and
sometimes incompatible hardware devices for a particular operating system or
application. The following sub-sections discuss the various aspects of hardware
requirements.

Hardware Requirements of present project:

System Requirements:

 Processor : Pentium IV 2.4 GHz.


 Hard Disk : 40 GB.
 RAM : 512 MB.

Mobile phone Requirements:

 Processor : Qualcomm
 RAM : 1 GB.
 ROM : 8 GB.

6
4.2.2 SOFTWARE REQUIREMENTS

Software requirements deal with defining software resource requirements and


pre-requisites that need to be installed on a computer to provide optimal functioning of
an application. These requirements or pre-requisites are generally not included in the
software installation package and need to be installed separately before the software is
installed.
Software requirements for present project:

 Tools used : Apache Tomcat, Eclipse with Android SDK

 Operating system : Windows XP or 7

 Mobile Operating System : Android 4.0 (Ice Cream Sandwich)

 Coding Technology Used : JAVA, JSP, XML

 Databases Used : SQLite, MySQL.

4.2.3 Feasibility study

The feasibility of the project is analyzed in this phase and business proposal is
put forth with a very general plan for the project and some cost estimates. During
system analysis the feasibility study of the proposed system is to be carried out. This is
to ensure that the proposed system is not a burden to the company. For feasibility
analysis, some understanding of the major requirements for the system is essential.
Three key considerations involved in the feasibility analysis are,
 Economical Feasibility

 Technical Feasibility

 Social Feasibility

Economical Feasibility
This study is carried out to check the economic impact that the system will
have on the organization. The amount of fund that the company can pour into the
research and development of the system is limited. The expenditures must be justified.
Thus the developed system as well within the budget and this was achieved because
most of the technologies used are freely available. Only the customized products had to
be purchased.

Technical Feasibility
This study is carried out to check the technical feasibility, that is, the technical
requirements of the system. Any system developed must not have a demand on the
available technical resources. This will lead to high demands on the available technical
resources. This will lead to high demands being placed on the client. The developed

7
system must have a modest requirement, as only minimal or null changes are required
for implementing the system.

Social Feasibility
The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently. The
user must not feel threatened by the system, instead must accept it as the as a necessity.
The level of acceptance by the users solely depends on the methods that are employed
to educate the user about the system and to make him familiar with it. His level of
confidence must be raised so that he is also able to make some constructive criticism,
which is welcomed, as he is the final user of the system.

4.2.4 Functional Requirements


In software engineering, a functional requirement defines a function of a
software system or its component. A function is described as a set of inputs, the
behavior, and outputs. Functional requirements may be calculations, technical details,
data manipulation and processing and other specific functionality that define what a
system is supposed to accomplish. Behavioral requirements describing all the cases
where the system uses the functional requirements are captured in use cases.
Functional requirements are supported by non-functional requirements (also known as
quality requirements), which impose constraints on the design or implementation (such
as performance requirements, security, or reliability). How a system implements
functional requirements is detailed in the system design. Often, though, an analyst will
by eliciting a set of use cases, from which the analyst can derive the functional
requirements that must be implemented to allow a user to perform each use case.

4.2.5 Non Functional Requirements

In systems engineering and requirements engineering, a non-functional


requirement is a requirement that specifies criteria that can be used to judge the
operation of a system, rather than specific behaviors. This should be contrasted with
functional requirements that define specific behavior or functions In general; function
requirements define what a system is supposed to do whereas non-functional
requirements define how a system is supposed to be. Non-functional requirements are
“constraints”, “quality attributes”, “quality goals” and “quality of service
requirements” and “non-behavioral requirements”. Qualities, that is, non-functional
requirements, can be divided into two main categories,

1. Execution qualities, such as security and usability, which are observable at


run time.
2. Evolution qualities, such as testability, maintainability, extensibility, and
scalability, which are embodied in the static structure of the software system.

8
4.3 INPUT & OUTPUT DESIGN

4.3.1 Introduction
The most creative and challenging phase of the life cycle is system design. The
term design describes a final system and the process by which it is developed. It refers
to the technical specifications that will be applied in implementations of the candidate
system. The design may be defined as “the process of applying various techniques and
principles for the purpose of defining a device, a process or a system with sufficient
details to permit its physical realization”.
The designer’s goal is how the output is to be produced and in what format.
Samples of the output and input are also presented. The processing phases are handled
through the program construction and testing. Finally, details related to justification of
the system and an estimate of the impact of the candidate system on the user and the
organization are documented and evaluated by management as a step toward
implementation.

Input Design
The input design is the link between the information system and the user. The
design of input focuses on controlling the amount of input required, controlling the
errors, avoiding delay, avoiding extra steps and keeping the process simple. The input
is designed in such a way so that it provides security and ease of use with retaining the
privacy. Input design considered the following things:
 What data should be given as input?
 How the data should be arranged or coded?
 The dialog to guide the operating personnel in providing input.
 Methods for preparing input validations and steps to follow when error occur.

Objectives

1. Input design is the process of converting a user-oriented description of the input


into a computer based system. This design is important to avoid errors in the data
input process and show the correct direction to the management for getting correct
information from the computerized system.
2. It is achieved by creating user-friendly screens for the data entry to handle large
volume of data. The goal of designing input is to make data entry easier and to be
free from errors. The data entry screen is designed in such a way that all the data
manipulates can be performed.
3. When the data is entered it will check for its validity. Data can be entered with the
help of screens. Appropriate messages are provided as when needed so that user
will not be in maize of instant. Thus the objective of input design is to create an
input layout that is easy to follow.

9
Output Design
A quality output is one, which meets the requirements of the end user and
presents the information clearly. In any system results of processing are communicated
to the users and to other system through outputs.
1. Designing computer output should proceed in an organized, well thought out
manner; the right output must be developed while ensuring that each output
element is designed so that people will find the system can use easily and
effectively. When analysis designs computer output, they should identify the
specific output that is needed to meet the requirements.
2. Select methods for presenting information.
3. Create document, report, or other formats that contain information produced
by the system.
The output form of an information system should accomplish one or more of the
following objectives.

 Convey information about past activities, current status or projections of the


future.
 Signal important events, opportunities, problems, or warnings.
 Trigger an action.
 Confirm an action.

4.3.2Purpose

The purpose of the software design is making decisions about the logical
organization of the data. Design is the first step in moving from the problem domain
towards the solution domain. Design first requires gathering, synthesizing, and
analyzing information with enough objectivity and detail to support a program decision
that makes optimum use of resources to achieve desired results.

4.3.3Design Goals

Design is essentially the bridge between requirements specifications and the


final solution for satisfying the requirements. The goal of the design process is to
produce a model or representation of a system, which can be used later to build that
system. The produced model is called the “design of the system”.

10
4.4 SYSTEM DESIGN

What is UML?
The Unified Modeling Language is a standard language for specifying,
Visualization, Constructing and documenting the artifacts of software system, as well
as for business modeling and other non-software systems. The UML represents a
collection of best engineering practices that have proven successful in the modeling of
large and complex systems.
The UML is a very important part of developing objects oriented software and
the software development process. The UML uses mostly graphical notations to
express the design of software projects. The goal is for UML to become a common
language for creating models of object oriented computer software. In its current form
UML is comprised of two major components: a Meta-model and a notation. In the
future, some form of method or process may also be added to; or associated with,
UML.
Goals of UML

The Primary goals in the design of the UML are as follows:


1. Provide users a ready-to-use, expressive visual modeling Language so that
they can develop and exchange meaningful models.

2. Provide extendibility and specialization mechanisms to extend the core


concepts.

3. Be independent of particular programming languages and development


process.

4. Provide a formal basis for understanding the modeling language.

5. Encourage the growth of the OO tools market.

6. Support higher level development concepts such as collaborations,


frameworks, patterns and components.

7. Integrate best practices.

Why Use UML?


As the strategic value of software increases for many companies, the industry
looks for techniques to automate the production of software and to improve quality and
reduce cost and time-to-market. These techniques include component technology,
visual programming, patterns and frameworks. Businesses also seek techniques to
manage the need to solve recurring architectural problems, such as physical
distribution, concurrency, replications security, load balancing, and fault tolerance.
Additionally, the development for World Wide Web, while making some things
simpler, has exacerbated these architectural problems. The Unified Modeling
Language was designed to respond to these needs.

11
UML Diagrams

UML Diagrams are designed to let developers and customers view a software
system from a different perspective and in varying degrees of abstraction. UML
diagrams commonly created using visual modeling tools.

4.4.1Class Diagram

Class diagrams are widely used to describe the types of objects in a system and
their relationships. Class diagrams model class structure and contents using design
elements such as classes, packages, and objects. Class diagrams describe three
different perspectives when designing a system, conceptual, specification and
implementation. These perspectives become evident as the diagram is created and help
solidify the design. This example is only meant as an introduction to the UML and
class diagrams.

Figure 4.4.1: Class Diagram

4.4.2Use Case Diagram

The use case diagrams describe system functionality as a set of tasks that the
system must carry out and actors who interact with the system to complete the tasks. A
use case diagram in the Unified Modeling Language (UML) is a type of behavioral

12
diagram defined by and created from a Use-case analysis. Its purpose is to present a
graphical overview of the functionality provided by a system in terms of actors, their
goals (represented as use cases), and any dependencies between those use cases. The
main purpose of a use case diagram is to show what system functions are performed
for which actor. Roles of the actors in the system can be depicted.

Each Use case on the diagram represents single task that the system needs to
carry out. Buy a product, Add Client, Make Purchase and Validate Order
Informationare all examples of use cases. Some use cases may include or extend a task
represented by another use case. For example, in order to make a purchase, the order
information will need to be validated.

An actor is anything outside the system that interacts with the system to
complete a task. It could be a user or another system. The actor "uses" the use case to
complete a task. System Administrator, Credit Authentication System, Accounting
System and Web Client are all examples of actors. Often, it is useful to look at the set
of use cases that an actor has access to this defines the actor's overall role in the
system.

13
login

add/update student

add faculty

delete student

Administrator
delete faculty student

give feedback

analyzes feedback

logout

Figure 4.4.2: Usecase Diagram

4.4.3Sequence Diagram

A sequence diagram in Unified Modeling Language (UML) is a kind of


interaction diagram that shows how processes operate with one another and in what order.
It is a construct of a message sequence chart. Sequence diagrams are sometimes called
event diagrams, event scenarios, and timing diagrams.

14
admin s ystem databas e

login

check validity

verify

valid/ invalid

login s ucces s ful

add/update s tudent details

add details

added

added s ucces s fully

analys e feedback

reques t

res pons e

gives report

logout

Figure 4.4.3(1): Sequence Diagram to Administrator

15
s tudent s ystem databas e

login

check validity

verify

valid

login s ucces s ful

give feedback

s ubmit feedback

s ubmitted

s ucces s

logout

Figure 4.4.3(2): SequenceDiagram to Student

4.4.4 Collaboration Diagrams

A collaboration diagram describes interactions among objects in terms of


sequenced messages. Collaboration diagrams represent a combination of information
taken from class, sequence, and use case diagrams describing both the static structure
and dynamic behavior of a system.

Class roles

Class roles describe how objects behave. Use the UML object symbol to
illustrate class roles, but don't list object attributes

16
Association roles

Association roles describe how an association will behave given a particular


situation. You can draw association roles using simple lines labeled with stereotypes.

1: login
6: add/update student details
10: analyse feedback
14: logout
admin system

5: login successful
9: added successfully
13: gives report

4: valid/ invalid
8: added
12: response

2: check validity
7: add details
3: verify 11: request

database

Figure 4.4.4(1): Collaboration Diagram for administrator

17
1: login
6: give feedback
10: logout
student system

5: login successful
9: success

4: valid
8: submitted

3: verify
2: check validity
7: submit feedback

database

Figure 4.4.4(2): Collaboration Diagram to student

4.4.5 LANGUAGE SPECIFICATION

INTRODUCTION TO ANDROID

Android is a software stack for mobile devices that includes an operating


system, middleware and key application. Android is a software platform and operating
system for mobile devices based on the Linux operating system developed by Google
and the Open Handset Alliance. It allows writing managed code in a java-like language
that utilize Google-developed Java Libraries, but does not support program developed
in native code.
The unveiling of the Android platform on 5 November 2007was announced
with the founding of the Open Handset Alliance, a consortium of 34 hardware,
software and telecom companies devoted open standard for mobile devices. When
released in 2008, most of the Android platform will be made available under the
Apache free-software and Open-source-license.

THE BIRTH OF THE ANDROID

In July 2005, Google acquire Android Inc, a small company based in PolaAlto,
CA. Android co-founder who went to work with Google included Andy Rubin(co-
founder of Danger), Rich Miner(co-founder of Wildlife communication, Inc), Nick
Seares(once VP @ T-Mobile), and Chris White(one of the first engineer at WebTV).

18
At the time, little was about the function of Android Inc. other than they made software
for mobile-phones.

OPEN HANDSET ALLIANCE FOUNDED

On 5 November 2007, the open Handset Alliance, a consortium of several


companies which included Google, HTC, Intel, Qualcomm, T-Mobile, Sprint Nextel
and NVIDIA, was unveiled with the goal to develop open standards for mobile
devices. Along with the OHA also unveiled their first product, Android, an open
source mobile devices platform based on the Linux operating system.

HARDWARE

Google has unveiled at least three prototypes for Android, at the Mobile world
Congress on February 12, 2008. One prototype at the ARM both displayed several
basic Google Applications. A “d-pad” control zooming of items in the clock with a
relatively give quick response. A prototype at the Google IO conference on May 28
had a 528 MHz Qualcomm processor and a Synaptic capacitive touch screen, and used
the UMTS cellular standards. It had 128 MB of RAM of flash, showing that Android
Memory require are reasonable.

FEATURES

Application Framework

It is used to write applications for Android. Unlike other embedded mobile


environments, Android applications are all equal, for instance, an applications which
come with the phone are no different than any developer writes. The framework is
supported by numerous open source libraries such as openssl, SQLite and libc. It is
also supported by the Android core libraries. From the point of security, the framework
is based on UNIX file system permissions that assure applications have only those
abilities that mobile phone owner gave them at install time.

Dalvik Virtual Machine

It is extremely low-memory based virtual machine, which was designed


especially for Android to run on embedded system and work well in low power
situation. It is also tuned to the CPU attribute. The Dalvik VM creates a special file
format (.dex) that is created through the build time post processing, Conversion
between Java classess and .dex format is done by included “dx” tool.

19
Integrated Browser

Google made a right choice Web Kit as open source web browser. They added
a two layout and frame flattering. Two pass layout loads a page without waiting for
blocking elements, such as external CSS or external JavaScript & after a while renders
again with al resources downloaded. To the devices Frame flattering frames single one
and loads into browser. These features increase speed and usability browsing the
internet via mobile phone.

Optimized Graphics

As Android has 2D graphics library and 3D graphics based on OpenGL ES 1.0,


possibly we will see great application like Google Earth and spectacular games like
Second Life, which come on Linux version. At this movement, the shooting legendry
3d game Doom was presented using Android on the mobile phone.

SQLite

Extremely small (~500kb) relational database management system is integrated


in Android. It is on function call and single file, where all definitions, tables and data
are stored. This simple design is more than suitable for a platform as Android.

Handset Layouts

The platform is an adaptable to both larger, VGA, 2D graphics library based on


OpenGL ES 1.0 specification, traditional smart phone layouts. An underlying 2D
graphics engine is also included. Surface Manager manages access to the display
subsystem & seamlessly composite 2D & 3d graphics layers from multiple
applications.

Data Storage

SQLite is used for structured data storage. SQLite is a powerful and lightweight
relational database engine available to all applications.

Connectivity

Android supports a wide variety of connectivity is a powerful on technology


including GSM, CDMA, Bluetooth, EDGE, EVDO, 3G and Wi-Fi.

Messaging

SMS, MMS, & XMPP are available forms of messaging including threaded text
messaging.

20
Web Browser

The web browser available in Android is based in the open source WebKit
application framework. It includes LibWebCore which is a modern web browser
engine powers both the Android and an embeddable web view.

JAVA Virtual Machine

Software written in Java can be complied into Dalvik Virtual Machine byte
code and executed in the Dalvik Virtual Machine, which is a specialized VM
implementation designed for mobile devices use, although not technically a standards
Java Virtual Machine.

Media Support

Android will supports advanced audio/video/still media formats such as


MPEG-4, H-264, and AAC, AMR, JPEG, PNG,GIF.

Additional Hardware Support

Android is fully capable of utilizing video/still cameras, touch screens, GPS,


compasses, accelerometers, and accelerated 3d graphics.

Android Development Environment

Includes a devices emulator, tools for debugging, memory and performance


profiling, a plug-in for the Eclipse IDE. There are a number of the Hardware dependent
features, for instance, a huge media and connection supports, GPS, improved supports
for Camera and simply GSM telephony. A great work was done for the developers to
start work with Android using device emulator, tools for debugging for Eclipse IDE.

ARCHITECTURE

The following diagram shows the major components of the android operating
system. Each section is described in more details below

21
Figure 4.4.5 Architecture of Android

Linux Kernel

Android Architecture is based on Linux 2.6 kernel. It helps to manage security,


process management, network stack and other important issues. Therefore, the user
should bring Linux in his mobile devices as the main operating system and install all
the drivers required in order to run it. Android provides system and install the drivers
required in order to run it. Android provides the supports for the Qualcomm MSM7K
chipset, but in the second half of the 20085 we should see mobile devices with stable
versions Qualcomm MSM 7200, which includes major features.

 WCDMA/HUSPA and EGPRS network supports.


 Bluetooth 1.2 and Wi-Fi supports.
 Digital audio supports for mp3 and other formats.
 Supports for Linux and other third party operating systems.
 Java Hardware acceleration and supports for Java applications.

22
 Qcamera up to 6.0 mpx.
 GPS-One-solution for GPS.
 lots of other.

Android Runtime

At the same level there is Android Runtime, where the main component Dalvik
Virtual Machine is located. It was designed specifically for Android running in limited
environment, where the limited battery, CPU, memory and data storage are the main
issues. Android gives an integrated tool “dx”, which converts generated byte code from
.jar to .dex file, after this byte code becomes much more efficient to run on the small
processors.

Figure 4.4.5(1): Conversion from .java file to .dex file

As the result, it is possible to have multiple instances of Dalvik Virtual


Machine running on the single device at the same time. The Core libraries are written
in Java language and contains of the collection classes, the utilities, IO and other tools.

Application Framework

After that, there is Application Framework, written in Java language. It is a


toolkit that all applications use, ones which come with mobile device like Contacts or
SMS box, or applications written by Google and any Android developer. It has several
components.

The Activity Manager manages the life cycle of the applications and provides a
common navigation back stack for applications, which are running in different
processes. The Package Manager keeps track of the applications, which are installed in
the device. The Window Manager is Java programming language abstraction on the top
of lower level services that are provided by the Surface Manager.The Telephony
Manager contains of a set of API necessary for calling applications.

23
Content Providers was built for Android to share a data with other applications,
for instance, the contacts of people in the address book can be used in other
applications too. The Resource Manager is used to store localized strings, bitmaps,
layout file descriptions and other external parts of the applications. The View System
generates a set of buttons and lists used in UI. Other components like Notification
manager is used to customize display alerts and other functions.

Application Layer

At the top of Android Architecture we have all the applications, which are used
by the final user. By installing different applications, the user can turn his mobile
phone into the unique, optimized and smart mobile phone. All applications are written
using the Java programming language.

4.4.6 DEVELOPING APPLICATION:

Application Building Blocks:

We can think of an Android application as a collection of components; of


various kinds. These components are for the most part quite loosely coupled, to the
degree where you can accurately describe them as a federation of components rather
than a single cohesive application.Generally, these components all run in the same
system process. It’s possible (and quite common) to create multiple threads within that
process, and it’s also possible to create completely separate child processes if you need
to. Such cases are uncommon, because Android tries very hard to make processes
transparent to your code. Google provides three versions of SDK for Windows, Mac
OSX and one for Linux. The developer can use Android plug-in for Eclipse IDE. First
step for Android developer is to decompose the application into the components,
supported by the platform. The major building blocks are these:
 Activity
 Intent Receiver
 Service
 Content Provider

Activity

Activity is a User interface component which corresponds to one screen at a


time. It means that for the simple application like Address Book, the developer should
have one activity for displaying contacts, another activity component for displaying
more detailed information of chosen name and etc.

24
Intent Receiver

Wakes up a predefined action through the external event For example, for the
application like Email Inbox, the developer should have intent receiver and register his
code through XML to wake up an alarm notification, when the user receives email.

Service

A task which is done in the background It means that the user can start an
application from the activity window and keep the service work, while browsing other
applications. For instance, he can browse Google Maps application while holding a call
or listening while browsing other application.

Content Provider

A component, while allows a sharing of the data with other process and
applications. It is the way to communicate the between each other. Android will ship
with a set of core applicationincluding an email client. SMS program, calendar maps,
browser, contacts and others. All applications are using the Java Programming
language.

AndroidManifest.xml

An Android Manifest.xml file tells the system what to do with all the top-level
components (specifically activities, services, intent receivers and content providers’
described below) you’ve created. For instance, this is the “glue” that actually specifies
which Intents your Activities receive.
A developer should predefine and list all components, which he want to use
that must be specified in Android Manifest.xml file. It requires file for all the
application and is located in the root folder. It is possible to specify all global values
for the package, all the components and its classes used, intent filters, which describes
where and when the certain activity should be start, permissions and instruction like
security control and testing.
Here is an example of AndroidManifest.xml file

<?xml version=”1.0” encoding=”utf-8”?>


<manifestxmlns:android=http://scheme.android.com/apk/res/android
package=”dk.mdev.android.hello”>
<application android:icon=”@drawable/icon”>
<activity class=”.HelloAndroid” android:label=”@string/app_name”>
<intent-filter>
<actionandroid:values=”android.intent.action.MAIN”/>
<category amdroid:value=”android.intent.category.LAUNCHER”>

25
</intent-filter>
</activity>
</application>
</manifest>
The line 2 is a namespace declaration, which makes a standard Android attribute
available for that application. Here in the <application> element the developer
specifies all application level components and its properties used by the package.
Activity class in the line represents the initialscreen the user see and it any have one or
more <intent-filter> elements to describe the action that activity supports.

APPLICATION LIFECYCLE

In Android, every application runs in its own process, which gives better
performance in security, protected and other benefits. Therefore, Android is
responsible to run and shut down correctly these process when it is needed.
It is important that application developers understand how different application
components (in the particular Activity, services and BroadCastReceiver) impact the
lifetime of the application’s process. Not using these components correctly can result
in the system killing the application’s process while it is doing important work.
To determine which process should be killed when low memory space is
available. Android places each process into an “importance hierarchy” based on the
components running in them and state of these components. These process types are
(in order of importance).

1. A foreground process is one that is required for what the user is currently
doing. Various application components can cause its containing process to be
considered foreground in different ways. A process is considered to be in the
foreground if any of the following condition holds.
 It is running an Activity at the top of the screen that the user is interacting
with (its onResume() method has been called).
 It has a BroadCastReceiver that is currently running (its BroadCastRecive()
method is executing).
 It has a service that is currently executing code of one of its call callbacks
(Services.onCreate(), Service.onStart(), or Service.onDestroy()).
There will only ever be a few such processes in the system, and these will
only be killed as a last resort if memory is so low that not even these
processes can continue to run. Generally, at this point, the devices have
reached a memory paging state, so this action is required in order to keep the
user interface responsive.

2. A visible process is one holding an Activity that is visible to the user on-
screen but not in the foreground (its onPause() method has been called).This
may occur, for example, if the foreground Activity is displayed as dialog that

26
allows the previous Activity to be seen behind it. Such a process is considered
extremely important and will not be killed unless doing so is required to keep
al foreground processes running.

3. A service process is one holding a Services that has a process started with the
startService() method. Through these process are not directly visible to the
user, they are generally doing things that user cares about(such as background
mp3 playback network data upload or download). So the system will always
keep such process running there is not enough memory to retain foreground
and visible process.

4. A background process is one holding is one holding an Activity that is not


currently visible to the user(its onStop() has been called). These processes
have no direct impact on the user experience. Provided they implement their
Activity life-cycle correctly(see Activity for more details), the system can kill
such process at any time to reclaim memory for one of the three previous
processes types. Usually there are many of these processes are running, so
they are kept in an LRU list to ensure the process that was most recently seen
by the user is last to be killed when running low on memory.

5. An Empty process is one that doesn’t hold any active application components.
The only reason to keep such a process around is a cache to improve startup
time the next time a components of its application needs to run. As such, the
system will often kill process in order to balance overall system resources
between these empty cached and the underlying kernel caches.

27
Figure 4.4.6: Lifecycle of an Activity

Application Framework

Developers have full access to the same framework APIs used by the core
applications. The application architecture is designed to simplify the reuse of
components; any application can publish its capabilities and any other application may
then make use of those capabilities (subject to security constraints enforced by the
frame work). This same mechanism allows components to be replaced by the
user.Under laying all applications is a set of service and systems, including:

1. A rich and extensible set of views that can be used to build an application,
including lists, grids, text boxes, buttons, and even an embeddable web browser.
2. Content providers that enable applications to access data from other applications
(such as Contacts),or to share their own data.
3. A Resource Manager, providing access to non-code resources such as localized
strings, graphics, and layout files.
4. A Notification Manager that enables all applications to display custom alerts in
the status bar.
5. An activity Manager that manages the life cycle of application and provides a
common navigation back stack.
28
Library

Android includes a set of C/C++ libraries used by various components of the


android system. These capabilities are exposed to developers through the android
application frame work. Some of the core libraries are listed below:

System C library- a BSD-derived implementation of a the standard C system


library(libc),turned for embedded Linux-base devices.

Media Libraries- based on Packet Videos Open Core the libraries support
playback and recording of many popular audio and video formats, as well as a static
image files, including MPEG4,H.264,MP3,AAC,AMR,JPG, and PNG.

Surface Manager-manages access to the display subsystem and seamlessly


composite 2Dand 3D graphic layers from multiple applications.

LibWebCore- a modern web browser engine which powers both the Android
browser and an embeddable web view.

#D libraries- an implementation based on OpenGL ES 1.0 APIs the libraries


use either hardware 3D acceleration (where available)or the included highly
optimized 3D software.

Free type- bitmap and vector font rendering.

 SQLite is a powerful and lightweight relational data base engine available to all
applications.

4.4.7 SOFTWARE DEVELOPMENT

Software Development Kit

It includes development and debugging tools, a device emulator,


documentation, sample projects, tutorials, and FAQs. Requirements also include Java
Development Kit, Android SDK, ADT Plug-in .The only officially supported
integrated development environment(IDE) is Eclipse 3.2 or higher, through the
Android Development Tools Plug-in, but programmers can use command line tools to
create, build and debug Android applications.

SECUIRITY ISSUES

Android mobile phone platform is going to be more secured than Apples


iPhone or any other devices in the long run. There are several solutions nowadays to

29
protect Google phone from various attacks. One of them is security vendor McAfee,a
member of Linux Mobile(LiMo) foundation. This foundation joins particular
companies to develop an open mobile device software platform. Many of the
companies listed in the LiMo Foundation have also become members of the Open
Handset alliances (OHA).

As a result, Linux secure coding practice should successfully be built into the
android development process. However open platform has its own disadvantages, such
as source code vulnerability for black-hat hackers. In parallel with great opportunities
for mobile applications developers, there is an expectation for exploitation and harm.
Stealthy Trojans hidden in animated images, particular viruses passed from friend to
friend, used for spying and identity theft, all these threats will be active for long run.

Another solution for such attacks is SMobile systems mobile package. Security
Shield an integrated application that includes antivirus, anti-spam, firewall and other
mobile protection is up and ready to run on the android operating system. Currently,
the main problem is availability for viruses to pose as an application and do things like
dial phone numbers, send text messages or multi-media messages or make connections
to the Internet during normal device use. It ispossible for somebody to use the GPS
feature to track a person’s location without their knowledge. Hence SMobile systems
are ready to notify and block these secure alerts. But the truth is that is not possible to
secure your mobile device or personal computer completely, as it connects to the
internet. And neither the Android phone nor other devices will prove to be the
exception.

Eclipse

In computer programming Eclipse is an integrated development environment


(IDE). It contains a base workspace and an extensible plug-in system for customizing
the environment. It is used to develop applications in Java. Eclipse SDK is one of the
free open source software. Eclipse software development kit includes Java
development tools.

Android SDK

Android Development Tools (ADT) is a plug-in for the Eclipse IDE that is
designed to give you a powerful, integrated environment in which to build Android
applications. ADT extends the capabilities of Eclipse to let you quickly set up new
Android projects, create an application UI, add components based on the Android
Framework API, debug your applications using the Android SDK tools, and even
export signed (or unsigned) APKs in order to distribute your application. Developing
in Eclipse with ADT is highly recommended and is the fastest way to get started. With
the guided project setup it provides, as well as tools integration, custom XML editors,

30
and debug output pane, ADT gives you an incredible boost in developing Android
applications.

Android Versions

Android gives you a world-class platform for creating apps and games for
Android users everywhere, as well as an open marketplace for distributing to them
instantly.
1 Pre-commercial release versions (2007–2008)
 Android alpha

 Android beta
2 Version histories by API level
 Android 1.0 (API level 1)

 Android 1.1 (API level 2)

 Android 1.5 Cupcake (API level 3)

 Android 1.6 Donut (API level 4)

 Android 2.0 Eclair (API level 5)

 Android 2.0.1 Eclair (API level 6)

 Android 2.1 Eclair (API level 7)

 Android 2.2–2.2.3 Froyo (API level 8)

 Android 2.3–2.3.2 Gingerbread (API level 9)

 Android 2.3.3–2.3.7 Gingerbread (API level 10)

 Android 3.0 Honeycomb (API level 11)

 Android 3.1 Honeycomb (API level 12)

 Android 3.2 Honeycomb (API level 13)

 Android 4.0–4.0.2 Ice Cream Sandwich (API level 14)

 Android 4.0.3–4.0.4 Ice Cream Sandwich (API level 15)

 Android 4.1 Jelly Bean (API level 16)

 Android 4.2 Jelly Bean (API level 17)

 Android 4.3 Jelly Bean (API level 18)

 Android 4.4 KitKat (API level 19)


 Android 4.4w-4.4w.2 KitKat,with wearable extensions(API level 20)

31
 Android 5.0-5.0.2 Lollipop(API level 21)
 Android 5.1-5.1.1 Lollipop(API level 22)
 Android 6.0-6.0.1 Marshmallow(APIlevel 23)

INTRODUCTION TO JAVA

Computers connected to the net are from many different manufacturers,


running on different operating systems and they differ in architecture, computing
power and capacity. By considering this point SUN Microsystems Corporation felt the
need for a new programming language suitable for this heterogeneous environment and
Java was the solution. This breaks barriers between different computers, chips and
operating systems.

Figure 4.4.7: JAVA file execution

The main properties of the Java which made Java so popular are as follows:

 Simple

 Secure

 Portable

 Object-Oriented

 Robust
 Multithreaded

 Interpreted

 High performance

32
The Key Feature of Java Is Byte Code

The key that allows Java to solve both the security and the portability problems
just described is that the output of a Java compiler is not executable code rather, it is
Byte Code.

Figure 4.4.7(1): Java Platform

Byte code is a highly optimized set of instructions designed to be executed by


the Java runtime systems, which is called the Java Virtual Machine (JVM). That is, in
its standard form, the JVM is an interpreter for Byte code. This may come as a bit of
surprise.

Java Platform

One Characteristic of Java is portability, which means that computer programs


written in the Java language must run similarly on any supported hardware/operating-
system platform. One should be able to write a program once, compile it once, and run
it anywhere.
This is achieved by compiling the Java language code, not to machine code but
to Java byte code – instructions analogous to machine code but intended to be
interpreted by a virtual machine (VM) written specifically for the host hardware. End-
users commonly use a Java Runtime Environment (JRE) installed on their own
machine for standalone Java applications, or in a web browser for Java applets.
Standardized libraries provide a generic way to access host specific features such as
graphics, threading and networking. In some JVM versions, byte code can be compiled
to native code, either before or during program execution, resulting in faster execution.
A major benefit of using byte code is porting. However, the overhead of interpretation
means that interpreted programs almost always run more slowly than programs
compiled to native executable would, and Java suffered a reputation for poor
performance. This gap has been narrowed by a number of optimizations introduced in
the more recent JVM implementations.

33
One such technique, known as just-in-time (JIT) compilation, translates Java
byte code into native code the first time that code is executed, then caches it. This
result in a program that starts and executes faster than pure interpreted code can, at the
cost of introducing occasional compilation overhead during execution. More
sophisticated VMs also use dynamic recompilation, in which the VM analyzes the
behavior of the running program and selectively recompiles and optimizes parts of the
program. Dynamic recompilation can achieve optimizations on knowledge about the
runtime environment and the set of loaded classes, and can identify hot spots – parts of
the program, often inner loops, that take up the most execution time. JIT compilation
and dynamic recompilation allow Java programs to approach the speed of native code
without losing portability.

JDK

The Java Development Kit (JDK) is an implementation of either one of the


Java SE, or Java ME platforms released by Oracle Corporation in the form of a binary
Java EE product aimed at Java developers on Solaris, Linux, Mac OS X or Windows.

4.5 SYSTEM IMPLEMENTATION

Implementation is the stage of the project when the theoretical design is turned
out into a working system. Thus it can be considered to be the most critical stage in
achieving a successful new system and in giving the user, confidence that the new
system will work and be effective.

The implementation stage involves careful planning, investigation of the


existing system and it’s constraints on implementation, designing of methods to
achieve changeover and evaluation of changeover methods.

MySQL:

MySQL, the most popular Open Source SQL database management system, is
developed, distributed, and supported by Oracle Corporation. The MySQL Web site
(http://www.mysql.com/) provides the latest information about MySQL software.

 MySQL is a database management system.


A database is a structured collection of data. It may be anything from a simple
shopping list to a picture gallery or the vast amounts of information in a corporate
network. To add, access, and process data stored in a computer database, you need
a database management system such as MySQL Server. Since computers are very
good at handling large amounts of data, database management systems play a
central role in computing, as standalone utilities, or as parts of other applications.

34
 MySQL databases are relational.
A relational database stores data in separate tables rather than putting all the
data in one big storeroom. The database structures are organized into physical files
optimized for speed. The logical model, with objects such as databases, tables,
views, rows, and columns, offers a flexible programming environment. You set up
rules governing the relationships between different data fields, such as one-to-one,
one-to-many, unique, required or optional, and “pointers” between different tables.
The database enforces these rules, so that with a well-designed database, your
application never sees inconsistent, duplicate, orphan, out-of-date, or missing data.
The SQL part of “MySQL” stands for “Structured Query Language”. SQL is the
most common standardized language used to access databases. Depending on your
programming environment, you might enter SQL directly (for example, to generate
reports), embed SQL statements into code written in another language, or use a
language-specific API that hides the SQL syntax.
SQL is defined by the ANSI/ISO SQL Standard. The SQL standard has been
evolving since 1986 and several versions exist. In this manual, “SQL-92” refers to
the standard released in 1992, “SQL:1999” refers to the standard released in 1999,
and “SQL:2003” refers to the current version of the standard. We use the phrase
“the SQL standard” to mean the current version of the SQL Standard at any time.

 MySQL software is Open Source.


Open Source means that it is possible for anyone to use and modify the
software. Anybody can download the MySQL software from the Internet and use it
without paying anything. If you wish, you may study the source code and change it
to suit your needs. The MySQL software uses the GPL (GNU General Public
License), http://www.fsf.org/licenses/, to define what you may and may not do
with the software in different situations. If you feel uncomfortable with the GPL or
need to embed MySQL code into a commercial application, you can buy a
commercially licensed version from us. See the MySQL Licensing Overview for
more information (http://www.mysql.com/company/legal/licensing/).

 The MySQL Database Server is very fast, reliable, scalable, and easy to use.
If that is what you are looking for, you should give it a try. MySQL Server can
run comfortably on a desktop or laptop, alongside your other applications, web
servers, and so on, requiring little or no attention. If you dedicate an entire machine
to MySQL, you can adjust the settings to take advantage of all the memory, CPU
power, and I/O capacity available. MySQL can also scale up to clusters of
machines, networked together. You can find a performance comparison of MySQL
Server with other database managers on our benchmark page.
MySQL Server was originally developed to handle large databases much
faster than existing solutions and has been successfully used in highly demanding
production environments for several years. Although under constant development,
MySQL Server today offers a rich and useful set of functions. Its connectivity,

35
speed, and security make MySQL Server highly suited for accessing databases on
the Internet.

 MySQL Server works in client/server or embedded systems.


The MySQL Database Software is a client/server system that consists of a
multi-threaded SQL server that supports different back ends, several different
client programs and libraries, administrative tools, and a wide range of application
programming interfaces (APIs). We also provide MySQL Server as an embedded
multi-threaded library that you can link into your application to get a smaller,
faster, easier-to-manage standalone product.

 A large amount of contributed MySQL software is available.


MySQL Server has a practical set of features developed in close cooperation
with our users. It is very likely that your favorite application or language supports
the MySQL Database Server.
The official way to pronounce “MySQL” is “My EssQue Ell” (not “my
sequel”), but we do not mind if you pronounce it as “my sequel” or in some other
localized way.

Database Tables

Admin login Table

alogin table:

Field Type
id varchar(20)
pwd varchar(20)

Student login Table

Stud table:

Field Type
id varchar(20)
name varchar(20)
dept varchar(20)
atten integer(11)
pass varchar(20)
status integer(11)
sem varchar(20)

36
Feedback report table

feedback table:

Field Type
id varchar(20)
name varchar(40)
dept varchar(20)
q1 integer(11)
q2 integer(11)
q3 integer(11)
q4 Integer(11)
tot integer(11)
sem varchar(20)

4.6 SOURCE CODE

home.java:

packageteam.fb;
importandroid.app.Activity;
importandroid.content.Intent;
importandroid.os.Bundle;
importandroid.view.View;
importandroid.widget.Button;
public class Home extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.home);
final Button btn1=(Button)findViewById(R.id.homebtn1);
btn1.setOnClickListener(new View.OnClickListener(){
public void onClick(View view) {
Intent i = newIntent(getApplicationContext(),Stlogin.class);
startActivity(i);
}
});
final Button btn2=(Button)findViewById(R.id.homebtn2);
btn2.setOnClickListener(new View.OnClickListener(){
37
public void onClick(View view) {
Intent i = new Intent(getApplicationContext(),Adlogin.class);
startActivity(i);
}
});
}
}

Adlogin.java:

packageteam.fb;
importjava.io.BufferedReader;
importjava.io.InputStream;
importjava.io.InputStreamReader;
importjava.util.ArrayList;
importorg.apache.http.HttpEntity;
importorg.apache.http.HttpResponse;
importorg.apache.http.client.HttpClient;
importorg.apache.http.client.entity.UrlEncodedFormEntity;
importorg.apache.http.client.methods.HttpPost;
importorg.apache.http.impl.client.DefaultHttpClient;
importorg.apache.http.message.BasicNameValuePair;
importandroid.content.Intent;
importandroid.app.Activity;
importandroid.os.Bundle;
importandroid.os.StrictMode;
importandroid.util.Log;
importandroid.view.View;
importandroid.widget.Button;
importandroid.widget.EditText;
importandroid.widget.Toast;
public class Adlogin extends Activity{
EditText et1,et2;
String user,pass;
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.adlogin);
final Button btn=(Button)findViewById(R.id.adbtn1);
et1=(EditText) findViewById(R.id.adet1);
et2=(EditText) findViewById(R.id.adet2);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder().permitAll().build();

38
StrictMode.setThreadPolicy(policy);
btn.setOnClickListener(new View.OnClickListener(){
public void onClick(View view) {
try{
ArrayList<BasicNameValuePair>namevaluepair=new
ArrayList<BasicNameValuePair>();
namevaluepair.add(new BasicNameValuePair("user", user=et1.getText().toString()));
namevaluepair.add(new BasicNameValuePair("pass", pass=et2.getText().toString()));
HttpClient client=new DefaultHttpClient();
HttpPost post=new HttpPost("http://10.0.2.2:8080/feed/alogin.jsp");
post.setEntity(new UrlEncodedFormEntity(namevaluepair));
HttpResponse response=client.execute(post);
HttpEntity entity=response.getEntity();
InputStream in=entity.getContent();
try{
BufferedReader bf=new BufferedReader(new InputStreamReader(in));
StringBuildersb=new StringBuilder();
String line=null;
while((line=bf.readLine())!=null){
sb.append(line);
}
String result=sb.toString();
String[] splitted = result.split("\\:");
if(splitted[0].equalsIgnoreCase(user)){
Intent i=new Intent(Adlogin.this,admin.class);
// i.putExtra("key",user);
startActivity(i);
}else{
Toast.makeText(Adlogin.this,"Wrong user name or
password!!",Toast.LENGTH_SHORT).show();
}
}catch(Exception e){
e.printStackTrace();
}
}catch(Exception e){
Log.e("log_tag", "Error in http"+e.toString());
}
}
});
}
}

39
Addfac.java:

packageteam.fb;
importjava.io.BufferedReader;
importjava.io.InputStream;
importjava.io.InputStreamReader;
importjava.util.ArrayList;
importorg.apache.http.HttpEntity;
importorg.apache.http.HttpResponse;
importorg.apache.http.client.HttpClient;
importorg.apache.http.client.entity.UrlEncodedFormEntity;
importorg.apache.http.client.methods.HttpPost;
importorg.apache.http.impl.client.DefaultHttpClient;
importorg.apache.http.message.BasicNameValuePair;
importandroid.app.Activity;
importandroid.content.Intent;
importandroid.os.Bundle;
importandroid.os.StrictMode;
importandroid.util.Log;
importandroid.view.View;
importandroid.view.View.OnClickListener;
importandroid.widget.Button;
importandroid.widget.EditText;
importandroid.widget.TextView;
importandroid.widget.Toast;
public class addfac extends Activity {
/** Called when the activity is first created. */
EditText et1,et2,et3,et4,et5;
Button btn;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.addfac);
et1=(EditText) findViewById(R.id.addfacet1);
et2=(EditText) findViewById(R.id.addfacet2);
et5=(EditText) findViewById(R.id.addfacet5);
et4=(EditText) findViewById(R.id.addfacet4);
btn=(Button) findViewById(R.id.addfacbtn);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
btn.setOnClickListener(new View.OnClickListener() {
@Override

40
public void onClick(View v) {
// TODO Auto-generated method stub
try{
ArrayList<BasicNameValuePair>namevaluepair=new
ArrayList<BasicNameValuePair>();
namevaluepair.add(new BasicNameValuePair("id", et1.getText().toString()));
namevaluepair.add(new BasicNameValuePair("name", et2.getText().toString()));
namevaluepair.add(new BasicNameValuePair("branch", et4.getText().toString()));
namevaluepair.add(new BasicNameValuePair("sem", et5.getText().toString()));
HttpClient client=new DefaultHttpClient();
HttpPost post=new HttpPost("http://10.0.2.2:8080/feed/addfac.jsp");
post.setEntity(new UrlEncodedFormEntity(namevaluepair));
HttpResponse response=client.execute(post);
HttpEntity entity=response.getEntity();
InputStream in=entity.getContent();
try{
BufferedReader bf=new BufferedReader(new InputStreamReader(in));
StringBuildersb=new StringBuilder();
String line=null;
while((line=bf.readLine())!=null){
sb.append(line);
}
String result=sb.toString();
if(result.equalsIgnoreCase("yes"))
{
Toast.makeText(addfac.this,"Added or Updated
Successfully!!",Toast.LENGTH_SHORT).show();
}
else{
Toast.makeText(addfac.this,"Failed to Add!!",Toast.LENGTH_SHORT).show();
}
}catch(Exception e){
e.printStackTrace();
}
}catch(Exception e){
Log.e("log_tag", "Error in http"+e.toString());
}
}
});
}
}

41
delstud.java:

packageteam.fb;
importjava.io.BufferedReader;
importjava.io.InputStream;
importjava.io.InputStreamReader;
importjava.util.ArrayList;
importorg.apache.http.HttpEntity;
importorg.apache.http.HttpResponse;
importorg.apache.http.client.HttpClient;
importorg.apache.http.client.entity.UrlEncodedFormEntity;
importorg.apache.http.client.methods.HttpPost;
importorg.apache.http.impl.client.DefaultHttpClient;
importorg.apache.http.message.BasicNameValuePair;
importandroid.app.Activity;
importandroid.content.Intent;
importandroid.os.Bundle;
importandroid.os.StrictMode;
importandroid.util.Log;
importandroid.view.View;
importandroid.view.View.OnClickListener;
importandroid.widget.Button;
importandroid.widget.EditText;
importandroid.widget.TextView;
importandroid.widget.Toast;
public class delstud extends Activity {
/** Called when the activity is first created. */
EditText et1;
Button btn;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.delstud);
et1=(EditText)findViewById(R.id.delstudet1);
btn=(Button) findViewById(R.id.delstudbtn);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
try{

42
ArrayList<BasicNameValuePair>namevaluepair=new
ArrayList<BasicNameValuePair>();namevaluepair.add(new
BasicNameValuePair("id", et1.getText().toString()));
HttpClient client=new DefaultHttpClient();
HttpPost post=new HttpPost("http://10.0.2.2:8080/feed/delstud.jsp");
post.setEntity(new UrlEncodedFormEntity(namevaluepair));
HttpResponse response=client.execute(post);
HttpEntity entity=response.getEntity();
InputStream in=entity.getContent();
try{
BufferedReader bf=new BufferedReader(new InputStreamReader(in));
StringBuildersb=new StringBuilder();
String line=null;
while((line=bf.readLine())!=null){
sb.append(line);
}
String result=sb.toString();
if(result.equalsIgnoreCase("yes"))
{
Toast.makeText(delstud.this,"Deleted
Successfully!!",Toast.LENGTH_SHORT).show();
}
else{
Toast.makeText(delstud.this,"Failed to Delete!!",Toast.LENGTH_SHORT).show();
}
}catch(Exception e){
e.printStackTrace();
}
}catch(Exception e){
Log.e("log_tag", "Error in http"+e.toString());
}
}
});
}
}

Facfb.java:

packageteam.fb;
importjava.io.BufferedReader;
importjava.io.InputStream;
importjava.io.InputStreamReader;
importjava.math.MathContext;
importjava.util.ArrayList;

43
importjava.util.List;
importorg.apache.http.HttpEntity;
importorg.apache.http.HttpResponse;
importorg.apache.http.client.HttpClient;
importorg.apache.http.client.entity.UrlEncodedFormEntity;
importorg.apache.http.client.methods.HttpPost;
importorg.apache.http.impl.client.DefaultHttpClient;
importorg.apache.http.message.BasicNameValuePair;
importandroid.app.Activity;
importandroid.content.Intent;
importandroid.os.Bundle;
importandroid.os.StrictMode;
importandroid.util.Log;
importandroid.view.View;
importandroid.view.View.OnClickListener;
importandroid.widget.AdapterView;
importandroid.widget.AdapterView.OnItemSelectedListener;
importandroid.widget.ArrayAdapter;
importandroid.widget.Button;
importandroid.widget.RadioButton;
importandroid.widget.RadioGroup;
importandroid.widget.RadioGroup.OnCheckedChangeListener;
importandroid.widget.Spinner;
importandroid.widget.TextView;
importandroid.widget.Toast;
public class facfb extends Activity {
TextView tv1,tv2,tv3,tv4,tv5;
RadioGroup rg1,rg2,rg3,rg4;
RadioButton rb11,rb12,rb13,rb21,rb22,rb23,rg31,rg32,rg33,rg41,rg42,rg43;
Button btn;
String fname;
String rg1val="5",rg2val="5",rg3val=”5”,rg4val=”5”;
String rg1check,rg2check,rg3check,rg4check;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.que);
Intent ii=getIntent();
final Spinner sp=(Spinner) findViewById(R.id.quespin);
rg1=(RadioGroup) findViewById(R.id.qrbg1);
rg2=(RadioGroup) findViewById(R.id.qrbg2);
rg3=(RadioGroup) findViewById(R.id.qrbg3);
rg4=(RadioGroup) findViewById(R.id.qrbg4);
btn=(Button) findViewById(R.id.qbtn1);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
try{
Intent i1=getIntent();
ArrayList<BasicNameValuePair>namevaluepair=new
ArrayList<BasicNameValuePair>();

44
namevaluepair.add(new BasicNameValuePair("id",ii.getStringExtra("sem")));
namevaluepair.add(new BasicNameValuePair("name", pass=et2.getText().toString()));
HttpClient client=new DefaultHttpClient();
HttpPost post=new HttpPost("http://10.0.2.2:8080/feed/getfac.jsp");
post.setEntity(new UrlEncodedFormEntity(namevaluepair));
HttpResponse response=client.execute(post);
HttpEntity entity=response.getEntity();
InputStream in=entity.getContent();
try{
BufferedReader bf=new BufferedReader(new InputStreamReader(in));
StringBuildersb=new StringBuilder();
String line=null;
while((line=bf.readLine())!=null){
sb.append(line);
}
String result=sb.toString();
String[] splitted = result.split("\\:");
List<String> categories = new ArrayList<String>();
for(int j=0;j<splitted.length;j++)
{
categories.add(splitted[j]);

}
ArrayAdapter<String>dataAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, categories);
sp.setAdapter(dataAdapter);
}
catch(Exception e){
e.printStackTrace();
}
}catch(Exception e){
Log.e("log_tag", "Error in http"+e.toString());
}
sp.setOnItemSelectedListener(new OnItemSelectedListener() {

@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
fname=sp.getSelectedItem().toString();
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});
rg1.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, intcheckedId) {
// TODO Auto-generated method stub

45
rg1check =
((RadioButton)findViewById(rg1.getCheckedRadioButtonId() )).getText().toString();
if(rg1check.equals("Good"))
{
rg1val="5";
Toast.makeText(facfb.this,rg1val,Toast.LENGTH_SHORT).show();
}
else if(rg1check.equals("Average"))
{
rg1val="3";
Toast.makeText(facfb.this,rg1val,Toast.LENGTH_SHORT).show();
}
else if(rg1check.equals("Bad"))
{
rg1val="1";
Toast.makeText(facfb.this,rg1val,Toast.LENGTH_SHORT).show();
}
}
});
rg2.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, intcheckedId) {
// TODO Auto-generated method stub
rg2check = ((RadioButton)findViewById(rg2.getCheckedRadioButtonId()
)).getText().toString();
if(rg2check.equals("Good"))
{
rg2val="5";
Toast.makeText(facfb.this,rg2val,Toast.LENGTH_SHORT).show();
}
else if(rg1check.equals("Average"))
{
rg2val="3";
Toast.makeText(facfb.this,rg2val,Toast.LENGTH_SHORT).show();
}
else if(rg1check.equals("Bad"))
{
rg2val="1";

Toast.makeText(facfb.this,rg2val,Toast.LENGTH_SHORT).show();
}
}
});
rg3.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, intcheckedId) {
// TODO Auto-generated method stub
rg3check =
((RadioButton)findViewById(rg.getCheckedRadioButtonId() )).getText().toString();
if(rg3check.equals("Good"))

46
{
rg3val="5";
Toast.makeText(facfb.this,rg3val,Toast.LENGTH_SHORT).show();
}
else if(rg3check.equals("Average"))
{
rg3val="3";
Toast.makeText(facfb.this,rg3val,Toast.LENGTH_SHORT).show();
}
else if(rg3check.equals("Bad"))
{
rg3val="1";
Toast.makeText(facfb.this,rg3val,Toast.LENGTH_SHORT).show();
}
}
});
rg4.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group, intcheckedId) {
// TODO Auto-generated method stub
rg4check =
((RadioButton)findViewById(rg4.getCheckedRadioButtonId() )).getText().toString();
if(rg4check.equals("Good"))
{
rg4val="5";
Toast.makeText(facfb.this,rg4val,Toast.LENGTH_SHORT).show();
}
else if(rg4check.equals("Average"))
{
rg4val="3";
Toast.makeText(facfb.this,rg4val,Toast.LENGTH_SHORT).show();
}
else if(rg4check.equals("Bad"))
{
rg4val="1";
Toast.makeText(facfb.this,rg4val,Toast.LENGTH_SHORT).show();
}
}
});

btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
try{
Intent i2=getIntent();
ArrayList<BasicNameValuePair>namevaluepair=new
ArrayList<BasicNameValuePair>();
namevaluepair.add(new BasicNameValuePair("name",fname));
namevaluepair.add(new BasicNameValuePair("q1",rg1val));

47
namevaluepair.add(new BasicNameValuePair("q2",rg2val));
namevaluepair.add(new BasicNameValuePair("q3",rg3val));
namevaluepair.add(new BasicNameValuePair("q4",rg4val));
namevaluepair.add(new
BasicNameValuePair("user",i2.getStringExtra("user")));
//namevaluepair.add(new BasicNameValuePair("name",
pass=et2.getText().toString()));
HttpClient client=new DefaultHttpClient();
HttpPost post=new HttpPost("http://10.0.2.2:8080/feed/givefac.jsp");
post.setEntity(new UrlEncodedFormEntity(namevaluepair));
HttpResponse response=client.execute(post);
HttpEntity entity=response.getEntity();
InputStream in=entity.getContent();
try{
BufferedReader bf=new BufferedReader(new InputStreamReader(in));
StringBuildersb=new StringBuilder();

String line=null;

while((line=bf.readLine())!=null){
sb.append(line);
}
String result=sb.toString();
String[] splitted = result.split("\\:");
if(splitted[0].equalsIgnoreCase("yes")){
Toast.makeText(facfb.this,"Feedback submitted
successfully!!",Toast.LENGTH_SHORT).show();
}else{
Toast.makeText(facfb.this,"Failed to give
feedback!!",Toast.LENGTH_SHORT).show();
}
}
catch(Exception e){
e.printStackTrace();
}
}catch(Exception e){
Log.e("log_tag", "Error in http"+e.toString());
}
}
});
}
}

Que.java:

packageteam.fb;
importandroid.content.Intent;
importandroid.app.Activity;
importandroid.os.Bundle;

48
importandroid.view.View;
importandroid.widget.Button;
public class Que extends Activity {
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.que);
final Button btn=(Button)findViewById(R.id.qbtn1);
btn.setOnClickListener(new View.OnClickListener(){
public void onClick(View view) {
Intent i = new Intent(getApplicationContext(),Stlgout.class);
startActivity(i);
}
});
}
}

Csefac.java:

packageteam.fb;
importjava.io.BufferedReader;
importjava.io.InputStream;
importjava.io.InputStreamReader;
importjava.math.MathContext;
importjava.util.ArrayList;
importjava.util.List;
importorg.apache.http.HttpEntity;
importorg.apache.http.HttpResponse;
importorg.apache.http.client.HttpClient;
importorg.apache.http.client.entity.UrlEncodedFormEntity;
importorg.apache.http.client.methods.HttpPost;
importorg.apache.http.impl.client.DefaultHttpClient;
importorg.apache.http.message.BasicNameValuePair;
importandroid.app.Activity;
importandroid.content.Intent;
importandroid.os.Bundle;
importandroid.os.StrictMode;
importandroid.util.Log;
importandroid.view.View;
importandroid.widget.AdapterView;
importandroid.widget.AdapterView.OnItemSelectedListener;
importandroid.widget.ArrayAdapter;

49
importandroid.widget.Spinner;
importandroid.widget.TextView;
importandroid.widget.Toast;
public class csefac extends Activity {
TextView tv1,tv2,tv3,tv4,tv5;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.csefac);
final Spinner sp=(Spinner) findViewById(R.id.csespinner);
tv1=(TextView) findViewById(R.id.csefactv1);
tv2=(TextView) findViewById(R.id.csefactv2);
tv3=(TextView) findViewById(R.id.csefactv3);
tv4=(TextView) findViewById(R.id.csefactv4);
tv5=(TextView) findViewById(R.id.csefactv5);
StrictMode.ThreadPolicy policy = new
StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
try{
Intent i=getIntent();
ArrayList<BasicNameValuePair>namevaluepair=new
ArrayList<BasicNameValuePair>();
namevaluepair.add(new BasicNameValuePair("id","cse"));
//namevaluepair.add(new BasicNameValuePair("name",
pass=et2.getText().toString()));
HttpClient client=new DefaultHttpClient();
HttpPost post=new HttpPost("http://10.0.2.2:8080/feed/agetfac.jsp");
post.setEntity(new UrlEncodedFormEntity(namevaluepair));
HttpResponse response=client.execute(post);
HttpEntity entity=response.getEntity();
InputStream in=entity.getContent();
try{
BufferedReader bf=new BufferedReader(new InputStreamReader(in));
StringBuildersb=new StringBuilder();
String line=null;
while((line=bf.readLine())!=null){
sb.append(line);
}
String result=sb.toString();
String[] splitted = result.split("\\:");
List<String> categories = new ArrayList<String>();
for(int j=0;j<splitted.length;j++)
{
categories.add(splitted[j]);

50
}
ArrayAdapter<String>dataAdapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, categories);
sp.setAdapter(dataAdapter);
}
catch(Exception e){
e.printStackTrace();
}
}catch(Exception e){
Log.e("log_tag", "Error in http"+e.toString());
}
sp.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
// TODO Auto-generated method stub
try{
ArrayList<BasicNameValuePair>namevaluepair=new
ArrayList<BasicNameValuePair>();
namevaluepair.add(new
BasicNameValuePair("name",sp.getSelectedItem().toString()));
Toast.makeText(csefac.this,sp.getSelectedItem().toString(),Toast.LENGTH_SHORT).
show();
//namevaluepair.add(new BasicNameValuePair("name",
pass=et2.getText().toString()));
HttpClient client=new DefaultHttpClient();
HttpPost post=new HttpPost("http://10.0.2.2:8080/feed/getfacreport.jsp");
post.setEntity(new UrlEncodedFormEntity(namevaluepair));
HttpResponse response=client.execute(post);
HttpEntity entity=response.getEntity();
InputStream in=entity.getContent();
try{
BufferedReader bf=new BufferedReader(new InputStreamReader(in));
StringBuildersb=new StringBuilder();
String line=null;
while((line=bf.readLine())!=null){
sb.append(line);
}
String result=sb.toString();
String[] splitted = result.split("\\:");
String report[]=new String[5];
float q1=Float.parseFloat(splitted[0]);
float tot=Float.parseFloat(splitted[2]);

51
float q2=Float.parseFloat(splitted[1]);
float q3=Float.parseFloat(splitted[3]);
float q4=Float.parseFloat(splitted[4]);
float q11=(q1/(5*tot))*100;
float q22=(q2/(5*tot))*100;
float q33=(q3/(5*tot))*100;
float q44=(q4/(5*tot))*100;
float over=(q11+q22+q33+q44)/4;
String q11s=Float.toString(q11);
String q22s=Float.toString(q22);
String q33s=Float.toString(q33);
String q44s=Float.toString(q44);
String overs=Float.toString(over);
Toast.makeText(csefac.this,q11s,Toast.LENGTH_SHORT).show();
//Toast.makeText(csefac.this,q22s,Toast.LENGTH_SHORT).show();
//Toast.makeText(csefac.this,overs,Toast.LENGTH_SHORT).show();
tv1.setText(q11s+"%");
tv2.setText(q22s+"%");
tv4.setText(q33s+"%");
tv5.setText(q44s+"%");
tv3.setText(overs+"%");
}
catch(Exception e){
e.printStackTrace();
}
}catch(Exception e){
Log.e("log_tag", "Error in http"+e.toString());
}
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});
}
}

alogin.jsp:

<%@page import="java.io.*"%>
<%@page import="java.sql.*"%>
<%!
String username;

52
String password;
Statement stmt=null,stmt2=null;
ResultSetrs=null;
Connection con=null;
%>
<%
try{
String driver="com.mysql.jdbc.Driver";
Class.forName(driver).newInstance();
String url="jdbc:mysql://127.0.0.1/fb";
con = DriverManager.getConnection(url,"root","root");
stmt=con.createStatement();
stmt2=con.createStatement();
}
catch(Exception e){
e.printStackTrace();
}
if(!con.isClosed()){
username=request.getParameter("user");
password=request.getParameter("pass");
rs=stmt.executeQuery("select * from admin where id='"+username+"'");
while(rs.next()){
if(((rs.getString("id")).equals(username) &&
(rs.getString("pwd")).equals(password))==true)
{
out.println(rs.getString("id")+":");
out.println(rs.getString("pwd")+":");
}
else{
out.println("Invalid");
}
}
}
else{
out.println("lost");
System.out.println("phani");
}
%>

getfacreport.jsp:

<%@page import="java.io.*"%>
<%@page import="java.sql.*"%>

53
<%!
String name;
Statement stmt=null,stmt2=null;
ResultSetrs=null;
Connection con=null;
%>
<%
try{
String driver="com.mysql.jdbc.Driver";
Class.forName(driver).newInstance();
String url="jdbc:mysql://127.0.0.1/fb";
con = DriverManager.getConnection(url,"root","root");
stmt=con.createStatement();
stmt2=con.createStatement();
}
catch(Exception e){
e.printStackTrace();
}
if(!con.isClosed()){
name=request.getParameter("name");
rs=stmt.executeQuery("select * from faculty where name='"+name+"'");
while(rs.next()){
out.println(rs.getInt("q1")+":");
out.println(rs.getInt("q2")+":");
out.println(rs.getInt("q3")+":");
out.println(rs.getInt("q4")+":");
out.println(rs.getInt("tot")+":");
}
}
else{
out.println("lost");
System.out.println("phani");
}
%>

54
5. TESTING

Software testing is an investigation conducted to provide stakeholders with


information about the quality of the product or service under test. Software testing also
provides an objective, independent view of the software to allow the business to
appreciate and understand the risks at implementation of the software. Test techniques
include, but are not limited to, the process of executing a program or application with
the intent of finding software bugs.
Software testing can also be stated as the process of validating and verifying that a
software program/application/product:

1. Meets the business and technical requirements that guided its design and
development.

2. Works as expected.

3. Can be implemented with the same characteristics.

Software testing, depending on the testing method employed, can be


implemented at any time in the development process. However, most of the test effort
occurs after the requirements have been defined and the coding process has been
completed. As such, the methodology of the test is governed by the software
development methodology adopted.

Different software development models will focus the test effort at different
points in the development process. Newer development models, such as Agile, often
employ test driven development and place an increased portion of the testing in the
hands of the developer, before it reaches a formal team of testers. In a more traditional
model, most of the test execution occurs after the requirements have been defined and
the coding process has been completed.

Testing can never completely identify all the defects within software. Instead, it
furnishes a criticism or comparison that compares the state and behavior of the product
against oracles principles or mechanisms by which someone might recognize a
problem. These oracles may include (but are not limited to) specifications, contracts,
comparable products, past versions of the same product, inferences about intended or
expected purpose, user or customer expectations, relevant standards, applicable laws,
or other criteria.

Every software product has a target audience. For example, the audience for
video game software is completely different from banking software. Therefore, when
an organization develops or otherwise invests in a software product, it can assess
whether the software product will be acceptable to its end users, its target audience, its

55
purchasers, and other stakeholders. Software testing is the process of attempting to
make this assessment.

A study conducted by NIST in 2002 reports that software bugs cost the U.S.
economy $59.5 billion annually. More than a third of this cost could be avoided if
better software testing was performed.

Testing is an extremely critical and time-consuming activity. It requires proper


planning of the overall testing process. Frequently the testing process starts with the
test plan.This plan identifies all testing related activities that must be performed and
specifies the schedule, allocates the resources, and specifies guidelines for testing. The
test plan specifies conditions that should be tested; different units to be tested, and the
manner in which the module will be integrated together. Then for different test unit, a
test case specification document is produced, which lists all the different test cases,
together with the expected outputs, that will be used for testing.

During the testing of the unit the specified test cases are executed and the actual
results are compared with the expected outputs. The final output of the testing phase is
the testing report and the error report, or a set of such reports. Each test report contains
a set of test cases and the result of executing the code with the test cases. The error
report describes the errors encountered and the action taken to remove the error.

Error Messages

The term error is used in two different ways. Errors refer to the discrepancy
between computed and observed values. That is error refers to the difference between
the actual output of the software and the correct output. In this interpretation, error
essentially is a measure of the difference between the actual and the ideal. Error is also
used to refer to human action those results in the software containing a defect or a
fault. This detection is quite general and encompasses all phases. The consequence of
thinking is the belief that the errors largely occur during programming, as it is the can
see, the errors occur through the development. As we can see, the errors occur
throughout the development process. However, the cost of connecting the errors of
different phases is not the same and depends upon when the error was detected and
corrected.

As one would expect the greater the delay in detecting an error after it occurs,
the more expensive it is to correct it. Suppose an error occurs during the requirement
phase and it was corrected after the coding then the cost is higher than correcting it in
the requirements phase itself. The reason for this is fairly obvious. If there was error in
the requirements phase that error will affect the design and coding also. To correct the
error after coding is done require both the design and the code to be changed there by
increasing the cost of correction.

56
The main moral of this section is that we should attempt to detect the errors that
occur in a phase during the phase itself should not wait until testing to detect errors.
This is not often practiced. In reality, sometimes testing is the sole point where errors
are detected. Besides the cost factor, reliance on testing as a primary source for error
detection and correction should be a continuous process that is done throughout the
software development. In terms of the development phase, what this means is that we
should try to validate each phase before starting the next.

Testing Methods

The box approach

Software testing methods are traditionally divided into white- and black-box
testing. These two approaches are used to describe the point of view that a test
engineer takes when designing test cases.

White box testing

White box testing is when the tester has access to the internal data structures and
algorithms including the code that implement these. (A.K.A. clear box testing, glass
box testing or structural testing) uses an internal perspective of the system to design
test cases based on internal structure. It requires programming skills to identify all
paths through the software. The tester chooses test case inputs to exercise paths
through the code and determines the appropriate outputs. In electrical hardware, testing
every node in a circuit may be probed and measured; an example is in-circuit testing
(ICT). While white box testing is applicable at the unit, integration and system levels
of the software testing process, it's typically applied to the unit. So while it normally
tests paths within a unit, it can also test paths between units during integration, and
between subsystems during a system level test. Though this method of test design can
uncover an overwhelming number of test cases, it might not detect unimplemented
parts of the specification or missing requirements. But you can be sure that all paths
through the test object are executed.

Types of white box testing

The following types of white box testing exist:

 API testing (application programming interface) - testing of the application using


public and private APIs

 Code coverage - creating tests to satisfy some criteria of code coverage (e.g., the
test designer can create tests to cause all statements in the program to be executed
at least once)

57
Fault injection methods - improving the coverage of a test by introducing
faults to test code paths

 Mutation testing methods

 Static testing - White box testing includes all static testing


Typical white box test design techniques include:
1. Control flow testing

2. Data flow testing

In this the test cases are generated on the logic of each module by drawing
flow graphs of that module and logical decisions are tested on all the cases. It has been
uses to generate the test cases in the following cases:

a) Guarantee that all independent paths have been executed.

b) Execute all logical decisions on their true and false sides.

c) Execute all loops at their boundaries and within their operational bounds.

d) Execute internal data structures to ensure their validity.

Test coverage

White box testing methods can also be used to evaluate the completeness of a test
suite that was created with black box testing methods. This allows the software team to
examine parts of a system that are rarely tested and ensures that the most important
function points have been tested.
Two common forms of code coverage are:
 Function coverage, which reports on functions executed.

 Statement coverage, which reports on the number of lines executed to complete


the test.

Black box testing

Black box testing treats the software as a "black box"—without any knowledge
of internal implementation. Black box testing methods include: equivalence
partitioning, boundaryvalue analysis, all-pairs testing, fuzz testing, model-based
testing, traceability matrix, exploratory testing and specification-based testing.

Specification-based testing: Specification-based testing aims to test the


functionality of software according to the applicable requirements. Thus, the tester
inputs data into, and only sees the output from, the test object. This level of testing

58
usually requires thorough test cases to be provided to the tester, who then can simply
verify that for a given input, the output value (or behavior), either "is" or "is not" the
same as the expected value specified in the test case. Specification-based testing is
necessary, but it is insufficient to guard against certain risks.

Advantages and disadvantages:

The black box tester has no "bonds" with the code, and a tester's perception is
very simple: a code must have bugs. Using the principle, "Ask and you shall receive,"
black box testers find bugs where programmers do not. But, on the other hand, black
box testing has been said to be "like a walk in a dark labyrinth without a flashlight,"
because the tester doesn't know how the software being tested was actually
constructed. As a result, there are situations when a tester writes many test cases to
check something that could have been tested by only one test case, and/or some parts
of the back-end are not tested at all.

Therefore, black box testing has the advantage of "an unaffiliated opinion," on
the one hand, and the disadvantage of "blind exploring," on the other.

In this strategy some test cases are generated as input conditions that fully
execute all functional requirements for the program. This testing has been uses to find
errors in the following categories:
a) Incorrect or missing functions

b) Interface errors

c) Errors in data structure or external database access

d) Performance errors

e) Initialization and termination errors.

In this testing only the output is checked for correctness. The logical flow of the data is
not checked.

Grey box testing

Grey box testing (American spelling: gray box testing) involves having
knowledge of internal data structures and algorithms for purposes of designing the test
cases, but testing at the user, or black-box level. Manipulating input data and
formatting output do not qualify as grey box, because the input and output are clearly
outside of the "black-box" that we are calling the system under test. This distinction is
particularly important when conducting integration testing between two modules of
code written by two different developers, where only the interfaces are exposed for
test. However, modifying a data repository does qualify as grey box, as the user would

59
not normally be able to change the data outside of the system under test. Grey box
testing may also include reverse engineering to determine, for instance, boundary
values or error messages.

Testing Levels

Tests are frequently grouped by where they are added in the software
development process, or by the level of specificity of the test.

Unit testing

Unit testing refers to tests that verify the functionality of a specific section of
code, usually at the function level. In an object-oriented environment, this is usually at
the class level, and the minimal unit tests include the constructors and destructors
These type of tests are usually written by developers as they work on code (white-box
style), to ensure that the specific function is working as expected. One function might
have multiple tests, to catch corner cases or other branches in the code. Unit testing
alone cannot verify the functionality of a piece of software, but rather is used to assure
that the building blocks the software uses work independently of each other. Unit
testingis also called component testing.

Integration testing

Integration testing is any type of software testing that seeks to verify the
interfaces between components against a software design. Software components may
be integrated in an iterative way or all together ("big bang"). Normally the former is
considered a better practice since it allows interface issues to be localized more quickly
and fixed.

Integration testing works to expose defects in the interfaces and interaction


between integrated components (modules). Progressively larger groups of tested
software components corresponding to elements of the architectural design are
integrated and tested until the software works as a system.(Sometimes called
Integration and Testing, abbreviated I&T) is the phase of software testing in which
individual software modules are combined and tested as a group. It follows unit testing
and precedes system testing.

Integration testing takes as its input modules that have been unit tested, groups
them in larger aggregates, applies tests defined in an integration test plan to those
aggregates, and delivers as its output the integrated system ready for system testing
The purpose of integration testing is to verify functional, performance and reliability
requirements placed on major design items. These "design items", i.e. assemblages (or
groups of units), are exercised through their interfaces using black box testing, success

60
and error cases being simulated via appropriate parameter and data inputs. Simulated
usage of shared data areas and inter-process communication is tested and individual
subsystems are exercised through their input interface. Test cases are constructed to
test that all components within assemblages interact correctly, for example across
procedure calls or process activations, and this is done after testing individual modules,
i.e. unit testing. Integration testing ensures that software and subsystems work together
as a whole. It tests the interface of all the modules to make sure that the modules
behave properly when integrated together.

Regression testing

Regression testing focuses on finding defects after a major code change has
occurred. Specifically, it seeks to uncover software regressions, or old bugs that have
come back. Such regressions occur whenever software functionality that was
previously working correctly stopsworking as intended. Typically, regressions occur as
an unintended consequence of program changes, when the newly developed part of the
software collides with the previously existing code. Common methods of regression
testing include re-running previously run tests and checking whether previously fixed
faults have re-emerged. The depth of testing depends on the phase in the release
process and the risk of the added features. They can either be complete, for changes
added late in the release or deemed to be risky, to very shallow, consisting of positive
tests on each feature, if the changes are early in the release or deemed to be of low risk.

Acceptance testing

Acceptance testing can mean one of two things:

1. A smoke test is used as an acceptance test prior to introducing a new build to the
main testing process, i.e. before integration or regression.
2. Acceptance testing performed by the customer, often in their lab environment on
their own hardware, is known as user acceptance testing (UAT). Acceptance
testing may be performed as part of the hand-off process between any two phases
of development. [Citation needed]

Alpha testing

Alpha testing is simulated or actual operational testing by potential


users/customers or an independent test team at the developers' site. Alpha testing is
often employed for off-the-shelf software as a form of internal acceptance testing,
before the software goes to beta testing. VanVeenendaal, Erik. "Standard glossary of
terms used in Software Testing".

61
Beta testing

Beta testing comes after alpha testing. Versions of the software, known as beta
versions, are released to a limited audience outside of the programming team. The
software is released to groups of people so that further testing can ensure the product
has few faults or bugs. Sometimes, beta versions are made available to the open public
to increase the feedback field to a maximal number of future users.

Non-functional testing

Special methods exist to test non-functional aspects of software. In contrast to


functional testing, which establishes the correct operation of the software (correct in
that it matches the expected behavior defined in the design requirements); non-
functional testing verifies that the software functions properly even when it receives
invalid or unexpected inputs. Software fault injection, in the form of fizzing, is an
example of non-functional testing. Non-functional testing, especially for software, is
designed to establish whether the device under test can tolerate invalid or unexpected
inputs, thereby establishing the robustness of input validation routines as well as error-
handling routines. Various commercial non-functional testing tools are linked from the
software fault injection page; there are also numerous open-source and free software
tools available that perform non-functional testing.

62
6. RESULTS

6.1 OUTPUT SCREENS

MAIN PAGE

Click on the “start” button to begin the application.

63
LOGIN PAGE

Select the appropriate button to which you want to login.

ADMIN LOGIN

The admin has to enter valid id and password to perform some operations like adding
or deleting students, adding or deleting faculty and to analyze the feedback.

64
ADMIN PANEL

This page displays the set of operations that admin has to perform.

ADD/UPDATE STUDENT

In this page, the admin can add the student details which are inserted into the database.

65
ADD FACULTY

In this page, the admin can add the faculty details which are inserted into the database.

DELETE FACULTY

In this page, the admin can delete the faculty details from the database using the id of
the faculty.
66
DELETE STUDENT

In this page, the admin can delete the student details from the database using the
registered number of the student.

FEEDBACK ANALYSIS

The admin can select the branch, i.e. for which branch faculty he wants to analyze the
feedback.

67
FEEDBACK REPORT

The admin can view the overall report of the particular faculty from this page.

ADMIN LOGOUT

68
STUDENT LOGIN

The student can login to the system with valid id and password to give the feedback for
the faculty.

GIVE FEEDBACK

69
After student login to the system, this feedback form is displayed and student can give
the feedback to the particular faculty.

STUDENT LOGOUT

70
6.2Conclusion and Future enhancement

6.2.1 Conclusion

The project “Ask Student: Android Based Feedback Application” is


designed in order to reduce the burden of maintaining bulk of records of all faculty’
feedback details of working in an Educational Institution. Giving, retrieving and
storing the feedback and maintaining the project is also easy which can be easily
understandable. Maintaining the details in the database is manageable.

6.2.2 Future Enhancements:

Regarding internal organization of the project we will improve its security


features using advanced technologies so that unauthorized user can’t break the
integrity and authenticity. Illegal access will be prevented and strictly prohibited. The
drawback in this project is student can give feedback to the same faculty more than
once. Only a normal message is displayed in order to restrict the student user to give
feedback only once.

Further enhancements can be made in providing constraint that the student can
give feedback only once for the faculty. Some more forms can also be added so as to
better retrieve the feedback details. Various other options can also be added for the
better usability of project.

71
Sites Referred:

 http://www.tutorialspoint.com/android/
 http://www.stackoverflow.com
 https://eclipse.org/indigo/
 http://developer.android.com/sdk/index.html
 http://developer.android.com/reference/packages.html
 http://www.sqlitemanager.org/en/installation/sqlitemanager/installingsqlitemanag
er.html
 http://www.jsptut.com

References:

1. “Software Engineering, 6th edition” by Ian Somerville Published by Pearson


Education.
2. “Core JAVA Volume 2 “by CAY S HORSTMANN and GARRY CORNELL
published by Pearson Education.
3. Beginning Android 4 Application Development by Wei-Meng Lee
4. Introducing Android Development with Ice Cream Sandwich by Shane
Conder, Lauren Darcey.

72

Potrebbero piacerti anche