Академический Документы
Профессиональный Документы
Культура Документы
INTRODUCTION
1
2. Background
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:
2
3. Proposed System
Advantages
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
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.
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.
Introduction
System Requirements:
Processor : Qualcomm
RAM : 1 GB.
ROM : 8 GB.
6
4.2.2 SOFTWARE REQUIREMENTS
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.
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
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.
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
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
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.
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
4.4.3Sequence Diagram
14
admin s ystem databas e
login
check validity
verify
valid/ invalid
add details
added
analys e feedback
reques t
res pons e
gives report
logout
15
s tudent s ystem databas e
login
check validity
verify
valid
give feedback
s ubmit feedback
s ubmitted
s ucces s
logout
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
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
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
INTRODUCTION TO 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.
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
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
SQLite
Handset Layouts
Data Storage
SQLite is used for structured data storage. SQLite is a powerful and lightweight
relational database engine available to all applications.
Connectivity
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.
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
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
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.
Application Framework
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.
Activity
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
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.
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
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.
LibWebCore- a modern web browser engine which powers both the Android
browser and an embeddable web view.
SQLite is a powerful and lightweight relational data base engine available to all
applications.
SECUIRITY ISSUES
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
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)
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
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.
Java Platform
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
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.
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.
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.
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.
Database Tables
alogin table:
Field Type
id varchar(20)
pwd varchar(20)
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)
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
1. Meets the business and technical requirements that guided its design and
development.
2. Works as expected.
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.
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
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 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.
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
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:
c) Execute all loops at their boundaries and within their operational bounds.
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.
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.
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.
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
d) Performance errors
In this testing only the output is checked for correctness. The logical flow of the data is
not checked.
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 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
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
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
62
6. RESULTS
MAIN PAGE
63
LOGIN PAGE
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
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:
72