You are on page 1of 115

ANDROID APP ON STUDENT FACULTY IDEA SHARING

A project Report Submitted in partial fulfillment of the requirement for the


Award of the degree of
BACHELOR OF TECHNOLOGY
In
COMPUTER SCIENCE AND ENGINEERING
by
G. K. S. SARMA

11Q71A0529

K. SSSSDV PRASAD

11Q71A0554

K. BHARADWAJ

11Q71A0552

G. SHIVA PRASAD

11Q71A0530

B. BHANU CHANDAR 11Q71A0506


Under the Esteemed Guidance of
CH.KODANDA RAMU M.Tech,(Ph.D.)
AssistantProfessor, C.S.E.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


AVANTHI INSTITUTE OF ENGINEERING & TECHNOLOGY
(Approved by AICTE, Recognized bythe Govt. of A.P. & Affiliated to JNTU Kakinada)
Cherukupally (V), Bhogapuram (M), Vizianagaram (A.P)
(2011-2015)
1

CERTIFICATE
This is to certify that the project report entitled ANDROID APPLICATION ON
STUDENT FACULTY IDEA SHARING is being submitted by G.K.S.SARMA
in partial fulfillment of the requirements for the award of the Degree of Bachelor
of Technology in Computer Science and Engineering in the academic year to the
Jawaharlal Nehru Technology University. This is a record of bonafide work carried
out by him under my Guidance and Supervision. The result embodied in this thesis
has not been submitted to any other University or Institute for the award of any
degree.

INTERNAL GUIDE

HEAD OF THE DEPARTMENT

(Mr. CH. KODANDA RAMU )

(Mr .Y. RAMESH KUMAR)

Assistant Professor

Head, Dept. of CSE

EXETERNAL EXAMINER

DECLARATION

We hereby declare that this project report entitled ANDROID APPLICATION


ON STUDENT FACULTY IDEA SHARING has been prepared by me
during the period January 2015 March 2015, in partial fulfillment of the
requirements for the award of degree of B.Tech, Bachelor of Technology in
COMPUTER SCIENCE AND ENGINEERING .We also declare that this project
is a result of our own effort and that it has not been submitted to any other
University for the award of any Degree.

B. BHANU CHANDAR 11Q71A0506


G. K. S. SARMA

11Q71A0529

G. SHIVA PRASAD

11Q71A0530

K. BHARADWAJ

11Q71A0552

K. SSSSDV PRASAD

11Q71A0554

ACKNOWLEDGEMENT

We are very much thankful to our principal Prof. Dr. V.S.V.Prabhakar, for
permitting and encouraging me in doing this project.

At the outset, with great solemnity and sincerity,we would like to


thank Mr. Y.Ramesh Kumar, Head of the Department, Computer Science and
Information Technology, for his encouragement and valuable guidelines during
our study in the department. I am deeply motivated by his valuable guidance and
kind cooperation throughout the making of the project.
We offer our profuse thanks to Mr. Ch. Kodanda Ramu, Associate
Professor, Department of computer science, for guiding us all through our project
work, giving a right direction and shape to our learning.
I would like to thank all the Teaching Staff of the department and
technicians for their continuous cooperation and encouragement in my successful
completion of my course of study in the department.

ABSTRACT

Android Application on student faculty idea sharing


Abstract:

We decided to make the manual student-faculty interaction to be


computerized after conducting various feasibility studies. All details will be
available on a click. Fast access to database less error More Storage Capacity
Search facility Look and Feel Environment. It provides "better and efficient"
service to members. .

Proposed system is an automated Student-Faculty

Interaction. Firstly he should register with his id number into the app and then
log on to the app. After login he can send doubts. This paper represents online
interaction of student and faculty. In this app student can post his doubts
corresponding to subject and branch. At the same time faculty can give answers
to their doubts corresponding to his assigned subjects.This app is mainly
developing for specific college.The main advantage of this app is student and
faculty can download this app and make interaction and share the ideas.

TABLE OF CONTENTS
6

TOPIC

PAGE NO

1. INTRODUCTION

11

1.1 Introduction to the Project

11

1.2 Objective of the Project


1.3 Problem Definition
1.4 Organization of the Document
2. SYSTEM REQUIREMENTS

14

2.1. Technology Over View 12


2.1.1. Software Environment: JAVA
2.1.2. Software Environment: ANDROID
2.2. Functional Requirements

38

2.3. Non Functional Requirements


2.4. System Requirements
2.4.1. Software Requirements
2.4.2. Hardware Requirements
2.5. Domain Description
3. SYSTEM ANALYSIS

42

3.1. Introduction 34
3.2. Software Requirement Specification
3.3. Feasibility study
3.3.1. Economical feasibility
3.3.2. Technical feasibility
3.3.3. Social feasibility
4. SYSTEM DESIGN

48
7

4.1. Introduction

48

4.2. Data Flow Diagrams

50

4.3. UML Diagrams

55

4.3.1. Use Case Diagram

55

4.3.2. Class Diagram

57

4.3.3. Sequence Diagram

58

4.3.4. Activity Diagram

59

4.3.5. State chart Diagram

60

4.3.6. Component Diagram

61

4.3.7. Deployment Diagram

63

4.3.8. Collaboration Diagram

64

5. Implementation

66

5.1. Introduction
5.2. Sample data
5.3. Sample code

70

6. OUTPUT SCREENS

89

7. TESTING AND VALIDATIONS

98

8. CONCLUSION

113

9. BIBLIOGRAPHY

115

10. USER MANUAL

116

INTRODUCTION

1. INTRODUCTION
1.1 Introduction
This android application is mainly developing for online interacion about
student and faculty.In this app every student and faculty has its own username
and password for logon to the application.There are three modules inthis app
Admin
Student
Faculty
1.2Objective of the Project
The project Student Faculty Interaction is designed and developed on
Android platform using Java Language and SQLite. This project lends a helping
hand to students in sending theirdoubtsin the app itself. This project is developed to
provide the student with message system and to get the solution/answer issued in
the app itself. This project accepts any inputs and displays the required output
within no time. In this application we are aiming for the student and faculty
interaction ,where in earlier applications and portals of specific colleges, we dont
have idea sharing between the student and faculty. In previous ideas they provide
college portals for the information about the college.
And there give the college details and faculty details and subjects etc, but
they dont give the interaction. They can provide information about the academic
year and student details and further details about

the student according to year

,semester and branch . student academic details of the particular student has been
provide .

10

Details about the faculty in the Particular department under the guidance of the
particular hod. Their subjects and e-books and further details of the subjects have
been provided. but thereis no particular subject to student doubt clarification
interaction program. But here we can provide that idea sharing application through
college portal.

1.3 Problem Definition


Post doubts
Sharing ideas
Faculty can view and send their solution to their respective subjects.
1.4Organization of Documentation
In this project documentation we have initially put the definition and
objective of the project as well as the design of the project which is followed by
the implementation and testing phases. Finally the project has been concluded
successfully.

11

SYSTEM REQUIREMENTS

12

2. SYSTEM REQUIREMENTS

2.1 Technology Over View


2.1.1 Software Environment: JAVA
Java Technology
Java technology is both a programming language and a platform.
The Java Programming Language
The Java programming language is a high-level language that can be
characterized by all of the following buzzwords:

Simple
Architecture neutral
Object oriented
Portable
Distributed
High performance
Interpreted
Multithreaded
Robust
Dynamic
Secure

With most programming languages, you either compile or interpret a program


so that you can run it on your computer. The Java programming language is
unusual in that a program is both compiled and interpreted. With the compiler, first
you translate a program into an intermediate language called Java byte codes the
platform-independent codes interpreted by the interpreter on the Java platform. The
13

interpreter parses and runs each Java byte code instruction on the computer.
Compilation happens just once; interpretation occurs each time the program is
executed. The following figure illustrates how this works.

Figure: Working of Java

You can think of Java byte codes as the machine code instructions for the Java
Virtual Machine(Java VM). Every Java interpreter, whether its a development tool
or a Web browser that can run applets, is an implementation of the Java VM. Java
byte codes help make write once, run anywhere possible. You can compile your
program into byte codes on any platform that has a Java compiler. The byte codes
can then be run on any implementation of the Java VM. That means that as long as
a computer has a Java VM, the same program written in the Java programming
language can run on Windows 2000, a Solaris workstation, or on an iMac.

14

The Java Platform


A platform is the hardware or software environment in which a program
runs. Weve already mentioned some of the most popular platforms like
Windows 2000, Linux, Solaris, and MacOS. Most platforms can be described as
a combination of the operating system and hardware. The Java platform differs
from most other platforms in that its a software-only platform that runs on top
of other hardware-based platforms.
The Java platform has two components:

TheJava Virtual Machine (Java VM)


TheJava Application Programming Interface (Java API)
Youve already been introduced to the Java VM. Its the base for the Java
platform and is ported onto various hardware-based platforms.
The Java API is a large collection of ready-made software components
that provide many useful capabilities, such as graphical user interface (GUI)
widgets. The Java API is grouped into libraries of related classes and interfaces;
these libraries are known as packages.The next section, What Can Java
Technology Do? Highlights what functionality some of the packages in the Java
API provide.
The following figure depicts a program thats running on the Java
platform. As the figure shows, the Java API and the virtual machine insulate the
program from the hardware.

15

Figure 3.2 Platform Dependency

Native code is code that after you compile it, the compiled code runs on a specific
hardware platform. As a platform-independent environment, the Java platform can
be a bit slower than native code. However, smart compilers, well-tuned
interpreters, and just-in-time byte code compilers can bring performance close to
that of native code without threatening portability.
What Can Java Technology Do?
The most common types of programs written in the Java programming
language are applets and applications. If youve surfed the Web, youre
probably already familiar with applets. An applet is a program that adheres to
certain conventions that allow it to run within a Java-enabled browser.
However, the Java programming language is not just for writing cute,
entertaining applets for the Web. The general-purpose, high-level Java

16

programming language is also a powerful software platform. Using the


generous API, you can write many types of programs.
An application is a standalone program that runs directly on the Java
platform. A special kind of application known as a serverserves and supports
clients on a network. Examples of servers are Web servers, proxy servers, mail
servers, and print servers.
Another specialized program is a servlet. A servlet can almost be thought
of as an applet that runs on the server side. Java Servlets are a popular choice
for building interactive web applications, replacing the use of CGI scripts.
Servlets are similar to applets in that they are runtime extensions of
applications. Instead of working in browsers, though, servlets run within Java
Web servers, configuring or tailoring the server.
How does the API support all these kinds of programs? It does so with
packages of software components that provides a wide range of functionality.
Every full implementation of the Java platform gives you the following
features:
The essentials: Objects, strings, threads, numbers, input and output,
data structures, system properties, date and time, and so on.
Applets: The set of conventions used by applets.
Networking: URLs, TCP (Transmission Control Protocol), UDP
(User Data gram

Protocol) sockets, and IP (Internet Protocol)

addresses.
Internationalization: Help for writing programs that can be localized
for users worldwide. Programs can automatically adapt to specific
locales and be displayed in the appropriate language.
17

Security: Both low level and high level, including electronic


signatures, public and private key management, access control, and
certificates.
Software components: Known as JavaBeans
existing component architectures.
Object serialization: Allows

lightweight

TM

, can plug into

persistence

and

communication via Remote Method Invocation (RMI).


How Will Java Technology Change My Life?
We cant promise you fame, fortune, or even a job if you learn the Java
programming language. Still, it is likely to make your programs better and
requires less effort than other languages. We believe that Java technology will
help you do the following:
Get started quickly: Although the Java programming language is a
powerful object-oriented language, its easy to learn, especially for
programmers already familiar with C or C++.
Write less code: Comparisons of program metrics (class counts,
method counts, and so on) suggest that a program written in the Java
programming language can be four times smaller than the same
program in C++.
Write better code: The Java programming language encourages good
coding practices, and its garbage collection helps you avoid memory
leaks. Its object orientation, its JavaBeans component architecture, and
its wide-ranging, easily extendible API let you reuse other peoples
tested code and introduce fewer bugs.
Develop programs more quickly: Your development time may be as
much as twice as fast versus writing the same program in C++. Why?
18

You write fewer lines of code and it is a simpler programming language


than C++.
Avoid platform dependencies with 100% Pure Java: You can keep
your program portable by avoiding the use of libraries written in other
languages. The 100% Pure JavaProduct Certification Program has a
repository of historical process manuals, white papers, brochures, and
similar materials online.
Write once, run anywhere: Because 100% Pure Java programs are
compiled into machine-independent byte codes, they run consistently
on any Java platform.
Distribute software more easily: You can upgrade applets easily from
a central server. Applets take advantage of the feature of allowing new
classes to be loaded on the fly, without recompiling the entire
program.

Java has two things:


A programming language and a platform.
Java is a high-level programming language that is all of the following.

19

Secure

Architectural neutral

Object oriented

Portable

Distributed

High Performance

Interpreted

Multithreaded

Robust and Dynamic

Secure

Java is also unusual in that each Java program is both compiled and interpreted.
With a compile you translate a Java program into an intermediate language called
Java byte codes the platform-independent code instruction is passed and run on the
computer.
Compilation happens just once; interpretation occurs each time the program
is executed. The figure illustrates how this works.
You can think of Java byte codes as the machine code instructions for the
Java Virtual Machine (Java VM). Every Java interpreter, whether its a Java
development tool or a Web browser that can run Java applets, is an
implementation of the Java VM. The Java VM can also be implemented in
hardware.
Java byte codes help make write once, run anywhere possible. You can
compile your Java program into byte codes on my platform that has a Java
compiler. The byte codes can then be run any implementation of the Java VM.
For example, the same Java program can run Windows NT, Solaris, and
Macintosh.
Java provides more packages to develop all kind of applications and applets.
Some of them are listed below.

20

java.lang- handles all basic operations and contains the data types.

java.io - handles all kinds of input and output operations.


java.util - contains collection based classes and interfaces.
java.awt- contains user interface components.
java.awat.event - contains user interface component event listeners.
java.awt.image- contains image handling classes and interfaces.
javax.swing - contains enhanced user interface components.
javax.swing.event - contains event listeners of enhanced user
interface components.

Swing is a platform-independent, Model-View-Controller GUI framework


for Java. It follows a single-threaded programming model, and possesses the
following traits:
Platform Independence
Swing is platform independent both in terms of its expression (Java) and its
implementation (non-native universal rendering of widgets).
Extensibility
Swing is a highly partitioned architecture, which allows for the
"plugging" of various custom implementations of specified framework
interfaces: Users can provide their own custom implementation(s) of these
components to override the default implementations. In general, Swing users
can extend the framework by extending existing (framework) classes and/or
providing alternative implementations of core components.
Component-oriented

21

Swing is a component-based framework. The distinction between objects


and components is a fairly subtle point: concisely, a component is a wellbehaved object with a known/specified characteristic pattern of behavior. Swing
objects asynchronously fire events, have "bound" properties, and respond to a
well-known set of commands (specific to the component.) Specifically, Swing
components are Java Beans components, compliant with the Java Beans
Component Architecture specifications.
Customizable
Given the programmatic rendering model of the Swing framework, fine
control over the details of rendering of a component is possible in Swing. As a
general pattern, the visual representation of a Swing component is a
composition of a standard set of elements, such as a "border", "inset",
decorations, etc. Typically, users will programmatically customize a standard
Swing component (such as a JTable) by assigning specific Borders, Colors,
Backgrounds, opacities, etc., as the properties of that component. The core
component will then use these properties (settings) to determine the appropriate
renderers to use in painting its various aspects. However, it is also completely
possible to create unique GUI controls with highly customized visual
representation.

Configurable
Swing's heavy reliance on runtime mechanisms and indirect composition
patterns allows it to respond at runtime to fundamental changes in its settings.
For example, a Swing-based application can change its look and feel at runtime.
22

Further, users can provide their own look and feel implementation, which
allows for uniform changes in the look and feel of existing Swing applications
without any programmatic change to the application code.
Lightweight UI
Swing's configurability is a result of a choice not to use the native host
OS's GUI controls for displaying itself. Swing "paints" its controls
programmatically through the use of Java 2D APIs, rather than calling into a
native user interface toolkit. Thus, a Swing component does not have a
corresponding native OS GUI component, and is free to render itself in any way
that is possible with the underlying graphics APIs. However, at its core every
Swing component relies on an AWT container, since (Swing's) JComponent
extends (AWT's) Container. This allows Swing to plug into the host OS's GUI
management framework, including the crucial device/screen mappings and user
interactions, such as key presses or mouse movements. Swing simply
"transposes" its own (OS agnostic) semantics over the underlying (OS specific)
components. So, for example, every Swing component paints its rendition on
the graphic device in response to a call to component. Paint (), which is defined
in (AWT) Container. But unlike AWT components, which delegated the
painting to their OS-native "heavyweight" widget, Swing components are
responsible for their own rendering.
This transposition and decoupling is not merely visual, and extends to
Swing's management and application of its own OS-independent semantics for
events fired within its component containment hierarchies. Generally speaking,
the Swing Architecture delegates the task of mapping the various flavors of OS
GUI semantics onto a simple, but generalized, pattern to the AWT container.
23

Building on that generalized platform, it establishes its own rich and complex
GUI semantics in the form of the JComponent model. A review of the source of
container. Java and JComponent.java classes are recommended for further
insights into the nature of the interface between Swing's lightweight
components and AWT's heavyweight widgets.
Loosely-Coupled/MVC
The Swing library makes heavy use of the Model/View/Controller
software design pattern, which conceptually decouples the data being viewed
from the user interface controls through which it is viewed. Because of this,
most Swing components have associated models (which are specified in terms
of

Java

interfaces), and the programmer

can use

various

default

implementations or provide their own. The framework provides default


implementations of model interfaces for all of its concrete components.
Typically, Swing component model objects are responsible for providing
a concise interface defining events fired, and accessible properties for the
(conceptual) data model for use by the associated JComponent. Given that the
overall MVC pattern is a loosely-coupled collaborative object relationship
pattern, the model provides the programmatic means for attaching event
listeners to the data model object. Typically, these events are model centric (ex:
a "row inserted" event in a table model) and are mapped by the JComponent
specialization into a meaningful event for the GUI component.
For example, the JTable has a model called Table Model that describes an
interface for how a table would access tabular data. A default implementation of
this operates on a two-dimensional array. The view component of a Swing
JComponent is the object used to graphically "represent" the conceptual GUI
24

control. A distinction of Swing, as a GUI framework, is in its reliance on


programmatically-rendered GUI controls (as opposed to the use of the native
host OS's GUI controls). This distinction is a source of complications when
mixing AWT controls, which use native controls, with Swing controls in a GUI.
Finally, in terms of visual composition and management, Swing favors
relative layouts (which specify

the positional relationships between

components) as opposed to absolute layouts (which specify the exact location


and size of components). This bias towards "fluid"' visual ordering is due to its
origins in the applet operating environment that framed the design and
development of the original Java GUI toolkit. (Conceptually, this view of the
layout management is quite similar to that which informs the rendering of
HTML content in browsers, and addresses the same set of concerns that
motivated the former.)
Look and feel
Swing allows one to specialize the look and feel of widgets, by
modifying the default (via runtime parameters), deriving from an existing one,
by creating one from scratch, or, beginning with J2SE 5.0, by using the
skinnable synth Look and Feel (see Synth Look and Feel), which is configured
with an XML property file. The look and feel can be changed at runtime, and
early demonstrations of Swing frequently provided a way to do this.
Features of Swing components:
Swing buttons and 1abels can display images instead of, or in addition
to text.
User can easily add or change the borders drawn around most swing
components.
25

Users can easily change the behavior or appearance of a swing


component by either invoking methods on it or creating a subclass of
it.
Swing components dont have to be rectangular, buttons, for e.g., can
be round.
Assistive technologies such as screen renders can get information
from swing components.
Swing lets to specify which look and feel a programs GUI uses.
The Swing API is flexible, powerful and immense. It is available in
two forms:
As a core part of the Java2 platform
JFC 1.1
JFrame: The JFrame class is slightly incompatible with Frame. Like all
other JFC/Swing top-level containers, a JFrame contains a JRootPane as its
only child. The content pane provided by the root pane should, as a rule,
contain all the non-menu components displayed by the JFrame. This is
different from the AWT Frame case.
JPanel:JPanel is an extension of Jcomponent used for grouping together
other components. It gets most of its implementations from its super classes.
JButton:JButton is a push button that is a replacement for java.awt.Button.
Like AWT buttons, Swing button fire action events when they activated. An
action Listener can register with a button, and the listeners action performed
method will be invoked whenever the button is activated.
JTextField: JTextField allow the user to enter a single line of text, scrolling
the text if its size exceeds the physical size of the field. Horizontal alignment
either LEFT, RIGHT or CENTER can be specified for a text fields text.
JTextArea: JTextArea class displays multiple times of text in a single font
and style. Its default behavior is not to wrap lines of text, but line wrapping
can be enabled on word (or) character boundaries.
26

JList: Swing lists, represented by the JList class, display a list of selectable
objects.
JSplit: The JSplitPane component allows you to place two (and only two)
components side by side in a single pane.
JScrollPane: The JScrollPane class is actually just a panel with a hardworking layout manager and some convenient access methods for the
manager.
-JScrollPane control
-Row header
-Column header
-View port
-Horizontal Scrollbar
-Vertical Scrollbar
-Four corners (Upper left, Upper right, lower left)
JTabbedPane: The JTabbedPane is used for creating your own tabbed pane
with tab activation components, very quickly.
JFileChooser:JFileChooser class bundles a directory pane into a handy
interface.
JMenubar:JMenubar uses the Default single Selection model as its data
model because the user can raise, or activate, only one of its menus at a
given time.
JMenuItem: An implementation of an item in a menu. A menu item is
essentially a button sitting in a list. When the user selects the "button", the
action associated with the menu item is performed. A JMenuItem contained
in a JPopupMenu performs exactly that function.
JTree: The JTree class can build up trees out of several different objects,
including a Tree model. JTree extends directly from JComponent and
represent the visual side of any valid tree structure.
DefaultMutableTreeNode:DefaultMutableTreeNode inherits many of its
properties from the MutableTreeNode and TreeNode interfaces.
27

Border Layout: Border Layout lays out a container, arranging and resizing
its components to fit in five regions: north, south, east, west and center. Each
region may contain no more than one component, and is identified by a
corresponding constant: NORTH, SOUTH, EAST, WEST and CENTER.
Null Layout: A null layout arranges components in a user-defined position.

2.1.2 Software Environment: ANDROID


Introduction To Android:
Android is an open source and Linux-based Operating System for
mobile devices such as smart phones and tablet computers. Android was
developed by the Open Handset Alliance, led by Google, and other companies.
Android offers a unified approach to application development for mobile
devices which means developers need only develop for Android, and their
applications should be able to run on different devices powered by Android.
The first beta version of the Android Software Development Kit (SDK) was
released by Google in 2007 where as the first commercial version, Android 1.0,
was released in September 2008. On June 27, 2012, at the Google I/O
conference, Google announced the next Android version, 4.1 Jelly Bean. Jelly
Bean is an incremental update, with the primary aim of improving the user
interface, both in terms of functionality and performance.

28

The source code for Android is available under free and open source
software licenses. Google publishes most of the code under the Apache License
version 2.0 and the rest, Linux kernel changes, under the GNU General Public
License version 2.
Features of Android:
Android is a powerful operating system competing with Apple 4GS and
supports great features. Few of them are listed below:

Feature
Beautiful UI

Description
Android OS basic screen provides a beautiful and intuitive user

Connectivity

interface.
GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi,

Storage

LTE, NFC and WiMAX.


SQLite, a lightweight relational database, is used for data storage

Media

purposes.
H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC,

support

AAC 5.1, MP3, MIDI, OggVorbis, WAV, JPEG, PNG, GIF, and

Messaging
Web browser

BMP
SMS and MMS
Based on the open-source WebKit layout engine, coupled with

Multi-touch

Chrome's V8 JavaScript engine supporting HTML5 and CSS3.


Android has native support for multi-touch which was initially

Multi-tasking

made available in handsets such as the HTC Hero.


User can jump from one task to another and same time various

Resizable

application can run simultaneously.


Widgets are resizable, so users can expand them to show more

widgets

content or shrink them to save space


29

Multi-

Supports single direction and bi-directional text.

Language
GCM

Google Cloud Messaging (GCM) is a service that lets developers


send short message data to their users on Android devices,

Wi-Fi Direct

without needing a proprietary sync solution.


A technology that lets apps discover and pair directly, over a

high-bandwidth peer-to-peer connection.


Android Applications:
Android applications are usually developed in the Java language using
the Android Software Development Kit.
Once developed, Android applications can be packaged easily and sold
out either through a store such as Google Play or the Amazon Appstore.
Android powers hundreds of millions of mobile devices in more than 190
countries around the world. It's the largest installed base of any mobile platform
and growing fast. Every day more than 1 million new Android devices are
activated worldwide.
The source code for Android is available under free and open source
software licenses. Google publishes most of the code under the Apache License
version 2.0 and the rest, Linux kernel changes, under the GNU General Public
License version 2. This tutorial has been written with an aim to teach you how
to develop and package Android application. We will start from environment
setup for Android application programming and then drill down to look into
various aspects of Android applications.

30

Android Architecture:
Android operating system is a stack of software components which is

roughly divided into five sections and four main layers as shown below in the
architecture diagram.

31

3.5 Platform Dependency

Linux kernel:
At the bottom of the layers is Linux - Linux 2.6 with approximately 115
patches. This provides basic system functionality like process management,
memory management, device management like camera, keypad, display etc.
Also, the kernel handles all the things that Linux is really good at such as
networking and a vast array of device drivers, which take the pain out of
interfacing to peripheral hardware.
Libraries:
On top of Linux kernel there is a set of libraries including open-source
Web browser engine WebKit, well known library libc, SQLite database which is

32

a useful repository for storage and sharing of application data, libraries to play
and record audio and video, SSL libraries responsible for Internet security etc.
Android Runtime:
This is the third section of the architecture and available on the second
layer from the bottom. This section provides a key component called Dalvik
Virtual Machine which is a kind of Java Virtual Machine specially designed
and optimized for Android.
The Dalvik VM makes use of Linux core features like memory
management and multi-threading, which is intrinsic in the Java language. The
Dalvik VM enables every Android application to run in its own process, with its
own instance of the Dalvik virtual machine.
The Android runtime also provides a set of core libraries which enable
Android application developers to write Android applications using standard
Java programming language.

Application Framework:
The Application Framework layer provides many higher-level services to
applications in the form of Java classes. Application developers are allowed to
make use of these services in their applications.
Applications & Components:
You will find all the Android application at the top layer. You will write
your application to be installed on this layer only. Examples of such
applications are Contacts Books, Browser, and Games etc.
33

Application components are the essential building blocks of an Android


application. These components are loosely coupled by the application manifest
file AndroidManifest.xml that describes each component of the application and
how they interact.
There are following four main components that can be used within an
Android application:
Components
Activities
Services
Broadcast

Description
They dictate the UI and handle the user interaction to the
smart phone screen
They handle background processing associated with an
application.
They handle communication between Android OS and

Receivers
applications.
Content Providers They handle data and database management issues.
Activities:
An activity represents a single screen with a user interface. For example,
an email application might have one activity that shows a list of new emails,
another activity to compose an email, and another activity for reading emails. If
an application has more than one activity, then one of them should be marked as
the activity that is presented when the application is launched.
An activity is implemented as a subclass of Activity class as follows:
public class MainActivity extends Activity { }
Services:

34

A service is a component that runs in the background to perform longrunning operations. For example, a service might play music in the background
while the user is in a different application, or it might fetch data over the
network without blocking user interaction with an activity.
A service is implemented as a subclass of Service class as follows:
public class MyService extends Service {}
Broadcast Receivers:
Broadcast Receivers simply respond to broadcast messages from other
applications or from the system. For example, applications can also initiate
broadcasts to let other applications know that some data has been downloaded
to the device and is available for them to use, so this is broadcast receiver who
will intercept this communication and will initiate appropriate action.
A

broadcast

receiver

of BroadcastReceiver class

and

is
each

implemented
message

as
is

subclass

broadcasted

as

an Intent object.
public class MyReceiver extends BroadcastReceiver {}
Content Providers:
A content provider component supplies data from one application to
others on request. Such requests are handled by the methods of
the ContentResolver class. The data may be stored in the file system, the
database or somewhere else entirely.A content provider component provided as
a sub class of ContentProvider class and must implement a standard set of
APIs that enable other applications to perform transactions.
public class MyContentProvider extends ContentProvider {}
35

Additional Components:
There are additional components which will be used in the construction
of above mentioned entities, their logic, and wiring between them. These
components are:
Components
Fragments

Description
Represents a behavior or a portion of user interface in an

Views

Activity.
UI elements that are drawn onscreen including buttons,

Layouts

lists forms
View hierarchies that control screen format and appearance

Intents
Resources

of the views.
Messages wiring components together.
External elements, such as strings, constants and drawables

Manifest

pictures.
Configuration files for the application.

2.2 Functional and Non-Functional Requirements

A Software Requirement specification (SRS) is a complete description of the


behavior of the system to be developed. It includes 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 use cases, the SRS also contains nonfunctional (or supplementary) requirements. Non-functional requirements are
requirements which impose constraints on the design or implementation (such as
performance engineering requirements, qualitystandards, or design constraints)
2.2.1 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 manipulations and processing and other specific functionality that
36

define what a system is supposed to accomplish. Behavioral requirements


describing all the cases where the system uses the functional requirements are
captured in the usecases. 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. In some cases a requirements analyst generates use cases after
gathering and validating a set of functional requirements. Each use case illustrates
behavioral scenarios through one or more functional requirements. Often, through
an analyst will begin by elicting 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.
Functional Requirements
Input: user id : password,: faculty or student
.
Output:subject details, messages.

2.2.2 .Non Functional Requirements


In systems engineering and requirements engineering, a non functional
requirement is a requirements that specifies criteria that can be used to judge the
operation of a system,rather than specific behaviours. This should be contrasted
with functional requirements that define specific behaviour or functions. In
general functional requirements define what a system is supposed to do whereas
non-functional requirements define how a system supposed to be. Non-functional
requirements are often called qualities of a system. Other terms for non functional
requirements are constraints,quality goals andquality of service requirements,
and non behavioural requirements. Qualities, that is, non-functional
requirements,can be divided into two main categories:
Execution qualities,such as security and usability,which are observable at
run time.

37

Evolution qualities,such as testability,maintability,extensibility


scalability,which are emboided in the structure of the software system.

and

2.3. Requirement Specifiation

To be used efficiently,all computer software needs certain hardware


components or other software resources to e present on a computer.these prerequisites are known as system requirements and are often used as aguideline as
opposed to an absolute rule. Most software defines two sets of system
requirements:minimum and recommended. With increasing demand for higher
processing power and resources in newer versions of software,system requirements
tend to increase over time. Industry analysts suggest that this trend plays a bigger
part in driving upgrades to existing computer system than technological
advancements.

2.3.1Software Requirements:
Software requirements deal with defining software resource requirements
and pre-requisite that need to be installed on computer to provide optimal
functioning of an application. These requirements are generally not include in the
software installation package and need to be installed seperately before the
software is installed.

Front end
Back End
Tools used
Operating system
Database

:
:
:
:
:

Java, Android.
java, JSON
Android SDK, Eclipse.
Windows 7
SQL

2.3.2 Hardware Requirements:


38

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 accomplished by a hardware compatibility
list(HCL),especially in case of operating systems. An HCL lists tested, compatible
and incompatible hardware devices for a particular operating system or application.
The following sub sections discuss the various aspects of hardware requirements.

Processor ARM (armeabi-v7a)


RAM 512MB
Android version Gingerbread 2.3.6
Display Density 240dpi
Application Interface Level 18

39

SYSTEM ANALYSIS

3.SYSTEM ANALYSIS
3.1 Identification Of Need
A system analysis is the process of examining a business situation with the
intent of improving it through better procedures and methods. Software design is a
process through which the requirements are translated into a representation of
software. Preliminary design is concerned with the transformation of requirements
into data and software architecture. It must act as a basis for detailed
implementation.
A system analysis is a detailed study of the various operations performed by
a system and their relationships within and outside the system. One aspect of
40

analysis is defining the boundaries of the system and determining whether a new
proposed system should consider other related items or not.
During analysis various data are collected using the toll like data flow
diagrams, interviews, On-line observations, procedural manuals and questionnaires
sensitively to the subjects being interviewed.

Purpose: The main purpose for preparing this document is to give a general
insight into the analysis and requirements of the existing system or situation and
for determining the operating characteristics of the system.

Scope:the scope of this project is to enable the student and faculty of an


organization to send their doubts, as well as answers. This Document plays a vital
role in the development life cycle (SDLC) and it describes the complete
requirement of the system. It is meant for use by the developers and will be the
basic during testing phase. Any changes made to the requirements in the future will
have to go through formal change approval process.

The developer is responsible for:


Developing the system, which meets the SRS and solving all the
requirements of the system?
Demonstrating the system and installing the system at client's location after
the acceptance testing is successful.
Submitting the required user manual describing the system interfaces to
work on it and also the documents of the system.
Conducting any user training that might be needed for using the system.

3.2. Existing System


41

In this application we are aiming for the student and faculty interaction ,where in
earlier applications and portals of specific colleges, we dont have idea sharing
between the student and faculty. In previous ideas they provide college portals for
the information about the college.
And there give the college details and faculty details and subjects etc, but
they dont give the interaction. They can provide information about the academic
year and student details and further details about the student according to year
,semester and branch.Student academic details of the particular student has been
provide. Details about the faculty in the Particular department under the guidance
of the particular HOD.Their subjects and e-books and further details of the subjects
have been provided. butthere is no particular subject to student doubt clarification
interaction program. But here we can provide that idea sharing application through
college portal.

DISADVANTAGES:
. No interaction between faculty and student
Subject wise doubt clarification is not there.
No communication .

3.3 .Proposed System


Proposed system is an automated Student-Faculty Interaction. Firstly he should
register with his id number into the app and then log on to the app. After login he
can send doubts. This paper represents online interaction of student and faculty. In
42

this app student can post his doubts corresponding to subject and branch. At the
same time faculty can give answers to their doubts corresponding to his assigned
subjects.This app is mainly developing for specific college.The main advantage of
this app is student and faculty can download this app and make interaction and
share the ideas.
.
ADVANTAGES:
1. By using this application we can reduce the users time and energy.
2. Student can easily share ideas.
3. Faculty can solve student doubts easily.

3.4. 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

43

Social Feasibility

3.4.1 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.

3.4.2 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 high 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 system must have a modest requirement, as only minimal or
null changes are required for implementing this system.
3.4.3 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 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.

44

SYSTEM DESIGN

45

4. SYSTEM DESIGN
4.1 Deign Overview
Design involves identification of classes, their relationship as well as their
collaboration. In objector, classes are divided into entity classes, interface classes and
control classes. The computer Aided Software Engineering (CASE) tools that are
available commercially do not provide assistance in this transition. CASE tools take
advantage of meta data modeling that are helpful only after the construction of the class
diagram. In the fusion method, some object oriented approaches like object modeling
technique (OMT), Classes, Responsibilities, collaborators, etc. are used. Objectory used
the term agents to represent some of the hardware and software systems. Any software
project is worked out by both the analyst and designer. The Analyst creates the usecase
diagram and Designer creates the Class Diagram. But, the designer can do this only after

46

the analyst creates the use case diagram. Once the design Is over, it is essential to decide
which software is suitable for the application.

4.2 Data Flow Diagram


Data flow diagram is a structure analysis tool that is used for graphical
representation of Data processes through any organization. The data flow approach
emphasis on the logic underlying the system, by using combination of only 4 symbols. It
follows a top down approach. A full description of a system actually consists of set of
DFD s , which comprises of various levels. And initial over view model is exploded
lower level diagrams that show additional feature of the system. Further each process can
be broken down into a more detailed DFD. This occurs repeatedly until sufficient details
are described.

DFD symbols
Square:

It defines a source (originator) or destination of system data.


Arrow:
It indicates data flow-data in motion. It is a pipeline through which information flows.
Circle or Bubble:

47

It represents a process that transforms incoming data flow(s) into outgoing data
flow(s).
Open Rectangle:

It is a data store-data at rest, or a temporary repository of data. Here I am giving


only the Data Flow Diagram:

View
subject

login
Student

Database
View&
postmessges

Log out
Faculty
48

4.3UML diagrams
It is a simple graphical formalism that can be used to represent a system in
terms of the input data to the system, various processing carried out on these data,
and the output data is generated by the system.

Modules:
1. Student Module.
2. Administrator Module: Is used to update or modify the database.
3. Faculty Module
Definition:
UML is a general-purpose visual modeling language that is used to specify,
visualize, construct, and document the artifacts of the software system.
UML is a language:
It will provide vocabulary and rules for communications and function on
conceptual and physical representation. So it is modeling language.
UML Specifying:
Specifying means building models that are precise, unambiguous and
complete. In particular, the UML address the specification of all the important
analysis, design and implementation decisions that must be made in developing
and displaying a software intensive system.
UML Visualization:
49

The UML includes both graphical and textual representation. It makes


easy to visualize the system and for better understanding.

UML Constructing:
UML models can be directly connected to a variety of programming
languages and it is sufficiently expressive and free from any ambiguity to
permit the direct execution of models.
UML Documenting:
UML provides variety of documents in addition raw executable codes.
Figure 4.1 Modeling a System Architecture using views of UML
The use case view of a system encompasses the use cases that describe the
behavior of the system as seen by its end users, analysts, and testers.
50

The design view of a system encompasses the classes, interfaces, and


collaborations that form the vocabulary of the problem and its solution.
The process view of a system encompasses the threads and processes that
form the system's concurrency and synchronization mechanisms.
The implementation view of a system encompasses the components and files
that are used to assemble and release the physical system.
The deployment view of a system encompasses the nodes that form the
system's hardware topology on which the system executes.
Uses of UML:
The UML is intended primarily for software intensive systems. It has been
used effectively for such domain as

Enterprise Information System


Banking and Financial Services
Telecommunications
Transportation
Defense/Aerosp
Retails
Medical Electronics
Scientific Fields
Distributed Web

Building blocks of UML:


The vocabulary of the UML encompasses 3 kinds of building blocks
Things:
Things are the data abstractions that are first class citizens in a model.
51

Structural Things
Behavioral Things
Grouping Things
Annotational Things

Relationships:
Relationships tie the things together. Relationships in the UML are

Dependency
Association
Generalization
Specialization

UML Diagrams:
A diagram is the graphical presentation of a set of elements, most often
rendered as a connected graph of vertices (things) and arcs (relationships).

52

UML Diagrams- Representation


Diagram is graphical representation of elements.UML diagrams can be
classified into two types
Structural Diagrams

Class Diagram
Component Diagram
Deployment Diagram
Object Diagram

Behavioral Diagrams

Usecase Diagram
Sequence Diagram
Collaboration Diagram
State Chart Diagram

4.3.1 Use case Diagram:


A use case is a set of scenarios that describing an interaction between a user
and a system. A use case diagram displays the relationship among actors and use
cases. The two main components of a use case diagram are use cases and
actors.An actor is represents a user or another system that will interact with the
system you are modeling. A use case is an external view of the system that
represents some action the user might perform in order to complete a task.
The primary goals of Use Case diagrams include:
Providing a high-level view of what the system does
Identifying the users ("actors") of the system
Determining areas needing human-computer interfaces
53

Figure 4.3.1 Use-case diagrams for Student-Faculty interaction

54

4.3.2 Class 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. The Class diagram is one of the most widely used
diagrams from the UML specification. Part of the popularity of Class diagrams
stems from the fact that many CASE tools, such as Rational XDE, will autogenerate code in a variety of languages, These tools can synchronize models and
code, reducing your workload, and can also generate Class diagrams from objectoriented code, for those "code-then-design" maintenance projects.

55

Figure 4.3.2 Class diagram


4.3.3 Sequence Diagram:
Sequence diagrams in UML shows how object interact with each other and
the order those interactions occur. Its important to note that they show the
interactions for a particular scenario. The processes are represented vertically and
interactions are show as arrows. Sequence diagrams document the interactions
between classes to achieve a result, such as a use case. Because UML is designed
for object-oriented programming, these communications between classes are
known as messages. The Sequence diagram lists objects horizontally, and time
vertically, and models these messages over time.

56

Figure 4.3.3 Sequence diagram for student-faculty

4.3.4 Activity Diagram:


Activity diagrams describe the workflow behavior of a system. Activity
diagrams are similar to state diagrams because activities are the state of doing
something. The diagrams describe the state of activities by showing the sequence
of activities performed. Activity diagrams can show activities that are conditional
or parallel. Activity diagrams should be used in conjunction with other modeling
techniques such as interaction diagrams and state diagrams. Activity Diagrams are
also useful for: analyzing a use case by describing what actions needs to take place
and when they should occur; describing a complicated sequential algorithm;
57

Activity diagram for Librar


4.3.5.State chart Diagram:
These diagrams render the states and responses of a class participating in
behavoiur,and the life cycle of an object.These diagrams describe the behaviour of
a class in response to external stimuli

58

State chart diagram for Library


4.3.6.Component Diagram:
In the Unified Modeling Language, a component diagram depicts
how components are wired together to form larger components and or software
systems. They are used to illustrate the structure of arbitrarily complex systems

59

A component is something required to execute a stereotype function.


Examples of stereotypes in components include executables, documents, database
tables, files, and library files.
Components are wired together by using an assembly connector to connect
the required interface of one component with the provided interface of another
component. This illustrates the service consumer - service provider relationship
between the two components.
An assembly connector is a "connector between two components that
defines that one component provides the services that another component requires.
An assembly connector is a connector that is defined from a required interface or
port to a provided interface or port."

60

4.3.7 Deployment Diagram:


A deployment diagram in the Unified Modeling Language models
the physical deployment of artifacts on nodes. To describe a web site, for example,
a deployment diagram would show what hardware components ("nodes") exist
(e.g., a web server, an application server, and a database server), what software
components ("artifacts") run on each node (e.g., web application, database), and
how the different pieces are connected (e.g. JDBC, REST, RMI).
The nodes appear as boxes, and the artifacts allocated to each node appear as
rectangles within the boxes. Nodes may have subnodes, which appear as nested
61

boxes. A single node in a deployment diagram may conceptually represent multiple


physical nodes, such as a cluster of database servers.
There are two types of Nodes.
1. Device Node
2. Execution Environment Node
Device nodes are physically computing resources with processing memory and
services to execute software, such as typical computer or mobile phones. An
execution environment node (EEN) is a software computing resource that runs
within an outer node and which itself provides a service to host and execute other
executable software elements.

62

4.3.8 Collaboration diagram:A communication diagram in the Unified Modeling Language (UML) 2.0 is
a simplified version of the UML 1.x collaboration diagram.
UML has four types of interaction diagrams:

Sequence diagram

Communication diagram

Interaction overview diagram

Timing diagram

A Communication diagram models the interactions between objects or parts in


terms of sequenced messages. Communication 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.
Communication diagrams show a lot of the same information as sequence
diagrams, but because of how the information is presented.

63

64

5.IMPLEMENTATION

5. IMPLEMENTATION
5.1 Introduction
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 its constraints on implementation, designing of methods to
achieve changeover and evaluation of changeover methods.

65

The implementation part is the most important phase of the project. In this
phase, we code the entire project in the chosen software according to the design
laid during the previous phase. The code has to be in such a way that the user
requirements are satisfied and also not complicated for the user i.e., the user
interface or GUI has to be easy to navigate. The code should be efficient in all
terms like space, easy to update, etc. In this manner, we can complete the coding
part of the project and later it can be sent for testing before being delivered to the
customer.
5.2 Sample data
DATABASE SUPPORT:
Database schema browsing to see the tables, views, and stored
procedures defined in a database
Database schema editing using wizards
Data view to see data stored in tables
SQL and DDL command execution to help you write and execute
more complicated SQL or DDL commands
Migration of table definitions across databases from different vendors
Works with databases, such as MySQL, PostgreSQL, Oracle, IBM
DB2,

Microsoft

SQL

Server,

PointBase,

Sybase,

Informix,

Cloudscape, Derby, and more


The Net Beans IDE also provides full-featured refactoring tools, which
allow you to rename and move classes, fields, and methods, as well as change
method parameters. In addition, you get a debugger and an Ant-based project
system.
66

DATABASE DESCRIPTION:
The data pertaining to proposed system is voluminous hence a careful design
of the database must proceed before storing the data in the database.
A database management system provides flexibility in the storage and
retrieval of data. The DBMS is a bridge between the application program, which
determines what data are needed and how they are processed, and the operating
system of the computer, which is responsible for placing data on the magnetic
storage devices.
Characteristics:
Represents complex relationships between data.
Keeps control on data redundancy.
Enforces data access authorization.
Has automatic intelligent backup and recovery procedure for data.
Database Administrator:
A database administrator is a block of code loaded into memory, which
organizes all information (database) between the users.
The DBA takes care of the following things:

Updating database.

Retrieving the data

Accepting the queries

Enforces security

Optimizing queries

NORMALIZATION:
First Normal Form:
67

A relation R is in first normal form if and only if all underlying domains


contains atomic values only.
Second Normal Form:
A relation R is in second normal form if and only if it is in first normal form
and every non-key attribute is fully dependent on primary key.
Third Normal Form:
A relation R is in third normal form if and only if t is in second normal form
and every non-key attribute is non-transitively dependent on primary key.
Boyce-Codd Normal Form:
A relation R is in Boyce-Codd form if and only if every determinate is a
candidate key. Normalization reduces redundancy. Redundancy is the unnecessary
reputation of data. It can cause problems with storage and retrieval of data. Fullnormalized record consists of a primary key, which identifies the entity and empty
set of attribute.

DATA DICTIONARY:
A data dictionary is a file that contains metadata i.e. data about data. This
file is consulates before actual data are read or modified in the database system. It
is also known as system catalogue. Among the types of information that the system
must store all the below items.
Name of the relations
Names of the attributes of each relation
Domains and lengths of attributes
68

5.3.Sample Code
HomeActivity.java
packagein.ganesh.model;
importin.ganesh.adapters.SubjectAdapter;
importin.ganesh.controllers.FacultyController;
importin.ganesh.controllers.StudentController;
importin.ganesh.entities.SubjectEntity;
importin.ganesh.util.SessionManagement;
importjava.util.List;
importandroid.app.Activity;
69

importandroid.content.Context;
importandroid.content.Intent;
importandroid.content.SharedPreferences;
importandroid.content.SharedPreferences.Editor;
importandroid.os.Bundle;
importandroid.view.Menu;
importandroid.view.MenuItem;
importandroid.view.View;
importandroid.widget.AdapterView;
importandroid.widget.AdapterView.OnItemClickListener;
importandroid.widget.ListView;
public class HomeActivity extends Activity{
privateSubjectAdapter adapter;
private List<SubjectEntity>subjectsList;
privateListViewlistView;
introleType;
int id;
String name;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
initComponents();
}

70

private void roleType() {


SharedPreferencessharedPreferences
getSharedPreferences(SessionManagement.FILENAME,
Context.MODE_PRIVATE);

if(sharedPreferences.contains(SessionManagement.ROLE)) {
roleType
sharedPreferences.getInt(SessionManagement.ROLE, -1);

id = sharedPreferences.getInt(SessionManagement.ID, -1);
name
sharedPreferences.getString(SessionManagement.NAME, "no name");

}
}
private void initComponents() {
roleType();
if(roleType == 1) {
subjectsList = new StudentController(this).getSubjectEntity(id);
adapter = new SubjectAdapter(this, subjectsList);
initListView(adapter);
} else if(roleType == 2) {
subjectsList = new FacultyController(this).getSubjectEntity(id);
adapter = new SubjectAdapter(this, subjectsList);
initListView(adapter);
}
}
71

private void initListView(SubjectAdapter adapter) {


listView = (ListView) findViewById(R.id.listView);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int position,
long arg3) {
Intent intent = new Intent(HomeActivity.this, MessageActivity.class);
intent.putExtra("id", subjectsList.get(position).getId());
intent.putExtra("name", name + "-"+(roleType == 1 ? "Student" : "Faculty")
+"");
startActivity(intent);
}
});
}
@Override
publicbooleanonCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
publicbooleanonOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
72

caseR.id.exit : exit(); break;


caseR.id.logout : logout();break;
}
return false;
}
public void logout() {
SharedPreferencessharedPreferences
getSharedPreferences(SessionManagement.FILENAME,
Context.MODE_PRIVATE);
Editor editor = sharedPreferences.edit();
editor.clear();
editor.commit();
moveTaskToBack(true);
HomeActivity.this.finish();
}
public void exit() {
moveTaskToBack(true);
HomeActivity.this.finish();
}}

MainActivity.java
packagein.ganesh.model;
importin.ganesh.controllers.FacultyController;
importin.ganesh.controllers.StudentController;
importin.ganesh.entities.FacultyEntity;
importin.ganesh.entities.StudentEntity;
73

importin.ganesh.util.SessionManagement;
importin.ganesh.util.ToastMessages;
importandroid.app.Activity;
importandroid.content.Context;
importandroid.content.Intent;
importandroid.content.SharedPreferences;
importandroid.content.SharedPreferences.Editor;
importandroid.os.Bundle;
importandroid.view.View;
importandroid.view.View.OnClickListener;
importandroid.widget.Button;
importandroid.widget.EditText;
importandroid.widget.RadioGroup;
importandroid.widget.RadioGroup.OnCheckedChangeListener;
public class MainActivity extends Activity
{
privateEditText username;
privateEditText password;
privateRadioGroup roles;
privateintroleType;
privateToastMessages messages = new ToastMessages(this);
privateSharedPreferencessharedPreferences;
private Button loginButton;
@Override
74

protected void onCreate(Bundle savedInstanceState)


{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initComponents();
}
private void initComponents()
{
username = (EditText) findViewById(R.id.username);
password = (EditText) findViewById(R.id.password);

roles = (RadioGroup) findViewById(R.id.radioGroup);


oles.setOnCheckedChangeListener(new OnCheckedChangeListener()
{
@Override
public void onCheckedChanged(RadioGroup arg0, int arg1)
{
switch(arg1)
{
caseR.id.student : roleType = 1;
break;
caseR.id.faculty : roleType = 2;
break;
}
}
75

}
);
loginButton = (Button) findViewById(R.id.loginButton);
loginButton.setOnClickListener(new OnClickListener()
{
@Overridepublic void Click(View arg0)
{
authenticateUser();
}});
}
@Override
pro+tected void onResume()
{
sharedPreferences = getSharedPreferences(SessionManagement.FILENAME,
Context.MODE_PRIVATE);
if(sharedPreferences.contains(SessionManagement.ID)
&&sharedPreferences.contains(SessionManagement.NAME))
{
Intent intent = new Intent(this, HomeActivity.class);
startActivity(intent);
}
super.onResume();
}
public void successfulLogin(String username, int id)
ditor.putString(SessionManagement.NAME, username);

76

editor.putInt(SessionManagement.ROLE, roleType);
editor.commit();
Intent intent = new Intent(this, HomeActivity.class);
startActivity(intent);
}
public void authenticateUser()
{
if(roleType == 1)
{
StudentEntity
entity
=
StudentController(this).loginSuccessful(username.getText().toString(),
password.getText().toString()) ;

new

if(entity != null)
{
successfulLogin(entity.getName(), entity.getId());
}
else
{
messages.showMessage("Login Failed.. Please Try again...!");
}
}
else
{
FacultyEntity
entity
=
FacultyController(this).loginSuccessful(username.getText().toString(),
password.getText().toString()) ;
77

new

if(entity != null)
{
successfulLogin(entity.getName(), entity.getId());
}
else
{
messages.showMessage("Login Failed.. Please Try again...!");
}
}

MessageActivity.java
packagein.ganesh.model;
importin.ganesh.adapters.MessageAdapter;
importin.ganesh.controllers.MessageController;
importin.ganesh.entities.MessageEntity;
importin.ganesh.util.ToastMessages;
importin.ganesh.util.WebResource;
importjava.util.ArrayList;
importjava.util.List;
importjava.util.Timer;
importjava.util.TimerTask;

78

importorg.apache.http.HttpEntity;
importorg.apache.http.HttpResponse;
importorg.apache.http.client.HttpClient;
importorg.apache.http.client.methods.HttpGet;
importorg.apache.http.impl.client.DefaultHttpClient;
importorg.apache.http.util.EntityUtils;
importorg.json.JSONArray;
importorg.json.JSONObject;
importandroid.app.Activity;
importandroid.app.ProgressDialog;
importandroid.content.Context;
importandroid.os.AsyncTask;
importandroid.os.Bundle;
importandroid.util.Log;
importandroid.view.Menu;
importandroid.view.MenuItem;
importandroid.view.View;
importandroid.view.View.OnClickListener;
importandroid.widget.Button;
79

importandroid.widget.EditText;
importandroid.widget.ListView;
public class MessageActivity extends Activity {
privateintsubjectId;
private String name;
privateToastMessages toast = new ToastMessages(this);
private Button sendButton;
privateEditText message;
privateMessageController controller = new MessageController(this);
privateListViewlistView;
privateMessageAdapter adapter;
private List<MessageEntity> list;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_messages);
initSubjectId();
initList();
private void initSubjectId() {
80

Bundle extras = getIntent().getExtras();


name = extras.getString("name");
subjectId = extras.getInt("id");
message = (EditText) findViewById(R.id.sendMessage);
sendButton = (Button) findViewById(R.id.button);
sendButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
sendMessage();
});
}
private void initList() {
listView = (ListView) findViewById(R.id.messages);
list = controller.getMessages(subjectId);
adapter = new MessageAdapter(this, list);
listView.setAdapter(adapter);
newgetMessages(this).execute();
}
81

private void setTimer() {


List<MessageEntity>newList = controller.getMessages(subjectId, getLastId());
for(MessageEntity en: newList) {
list.add(en);
}
adapter.notifyDataSetChanged();
@Override
publicbooleanonCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.message, menu);
return true;
}
@Override
publicbooleanonOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
caseR.id.refresh : setTimer(); break;
}
returnsuper.onOptionsItemSelected(item);
}
82

privateintgetLastId() {
MessageEntity entity = list.get(list.size()-1);
returnentity.getId();
}
public void sendMessage() {
if (message.getText().toString().length() > 0) {
if (controller.sendMessage(subjectId, message.getText().toString(),name)) {
toast.showMessage("Message Sent.. Successfully..!");
} else {
toast.showMessage("Message Sending Failed");
}
} else {
toast.showMessage("Blank Message cannot be sent");
}
}
publicclass getMessages extends AsyncTask<String, Void, List<MessageEntity>>
{
private Context context;
privateProgressDialog dialog;

83

private List<MessageEntity>newList = new ArrayList<MessageEntity>();


publicgetMessages(Context context) {
this.context= context;
}
@Override
protected void onPreExecute() {
super.onPreExecute();
dialog = new ProgressDialog(context);
dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
dialog.setMessage("Loading");
dialog.show();
}
@Override
protected List<MessageEntity>doInBackground(String... params) {
try {
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
84

newList = getList();
}
}, 1, 1000);
returnnewList;
} catch (Exception ex) {
Log.e("Error", ex.getMessage());
return null;
}
}
private List<MessageEntity>getList() {
try {
Log.e("Control", "Control came here");
HttpClient client = new DefaultHttpClient();
HttpGetget=newHttpGet(WebResource.GET_NEWMESSAGE+"/"+subjectId+"/"
+getLastId());
HttpResponse response = client.execute(get);
intstatusCode = response.getStatusLine().getStatusCode();
Log.i("Status Code", statusCode+"");
if(statusCode == 200) {

85

HttpEntity entity = response.getEntity();


String data = EntityUtils.toString(entity);
if(data != null) {
JSONArray array = new JSONArray(data);
List<MessageEntity> list = new ArrayList<MessageEntity>();
for(int i = 0; i <array.length(); i++) {
JSONObject object = array.getJSONObject(i);
MessageEntityent = new MessageEntity();
ent.setId(object.getInt("id"));
ent.setDate(object.getString("dateFormat"));
ent.setFrom(object.getString("person"));
ent.setMessage(object.getString("message"));
ent.setTime(object.getString("time"));
ent.setSubjectId(object.getInt("subject"));
list.add(ent);
}
return list;
} else {
Log.e("Data is not found", "Not Data");
86

return new ArrayList<MessageEntity>();


}
} else {
Log.e("Status COde is not 200", "staus code : "+statusCode);
return new ArrayList<MessageEntity>();
}
} catch (Exception ex) {
Log.e("Exception ", ex.getMessage());
return null;
}
}
@Override
protected void onPostExecute(List<MessageEntity> result) {
dialog.dismiss();
if(result != null) {
for(MessageEntity entity : result) {
list.add(entity);
}
Log.i("added", result.size()+"");
87

adapter.notifyDataSetChanged(); }
}
}
}

6.OUTPUT SCREENS

88

6.OUTPUT SCREENS
SCREEN1:
First student logon on his own username and pwd

89

SCREEN2:
The subjects will open based on his subid and branchid

90

SCREEN3:
The student can post his doubt and this message will go to particular faculty

91

SCREEN4:
Faculty can login based on his own username and password

92

SCREEN5:
The subjects will open based on his facultyid and subjectid.
93

SCREEN6:
The faculty can post his solution
94

95

SCREEN7:The student and faculty can logout successfully

96

7.TESTING AND VALIDATIONS

7. Testing and Validations


7.1 Introduction
97

Software testing is a critical element of software quality assurance and


represents the ultimate review of specification, design and coding. In fact, testing is
the one step in the software engineering process that could be viewed as
destructive rather than constructive. A strategy for software testing integrates
software test case design methods into a well-planned series of steps that result in
the successful construction of software. Testing is the set of activities that can be
planned in advance and conducted systematically. The underlying motivation of
program testing is to affirm software quality with methods that can economically
and effectively apply to both strategic to both large and small-scale systems.
The purpose of testing is to discover errors. Testing is the process of trying
to discover every conceivable fault or weakness in a work product. It provides a
way to check the functionality of components, sub assemblies, assemblies and/or a
finished product. It is the process of exercising software with the intent of ensuring
that theSoftware system meets its requirements and user expectations and does not
fail in an unacceptable manner. There are various types of test. Each test type
addresses a specific testing requirement.
The following are the Testing Objectives:
Testing is a process of executing a program with the intent of finding an
error.
A good test has a high probability of finding an as yet undiscovered error.
A successful test is one that uncovers an as yet undiscovered error.
7.2 System Testing and Implementation
The purpose is to exercise the different parts of the module code to detect
coding errors. After this the modules are gradually integrated into subsystems,
which are then integrated themselves too eventually forming the entire system.
98

During integration of module integration testing is performed. The goal of this is to


detect designing errors, while focusing the interconnection between modules. After
the system was put together, system testing is performed. Here the system is tested
against the system requirements to see if all requirements were met and the system
performs as specified by the requirements. Finally accepting testing is performed
to demonstrate to the client for the operation of the system.
For the testing to be successful, proper selection of the test case is essential.
There are two different approaches for selecting test case. The software or the
module to be tested is treated as a black box, and the test cases are decided based
on the specifications of the system or module. For this reason, this form of testing
is also called black box testing.
The focus here is on testing the external behavior of the system. In structural
testing the test cases are decided based on the logic of the module to be tested. A
common approach here is to achieve some type of coverage of the statements in
the code. The two forms of testing are complementary: one tests the external
behavior, the other tests the internal structure. Often structural testing is used for
lower levels of testing, while functional testing is used for higher levels.
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
99

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
7.3 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. 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.

100

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.
7.4 Testing Techniques
Testing is a process, which reveals errors in the program. It is the major quality
measure employed during software development. During testing, the program is
executed with a set of conditions known as test cases and the output is evaluated to
determine whether the program is performing as expected. In order to make sure
that the system does not have errors, the different levels of testing strategies that
are applied at differing phases of software development are:
Unit Testing: Unit testing involves the design of test cases that validate that the
internal program logic is functioning properly, and that program inputs produce
valid outputs. All decision branches and internal code flow should be validated. It
is the testing of individual software units of the application .it is done after the
completion of an individual unit before integration. This is a structural testing, that
relies on knowledge of its construction and is invasive. Unit tests perform basic
tests at component level and test a specific business process, application, and/or
system configuration. Unit tests ensure that each unique path of a business process
performs accurately to the documented specifications and contains clearly defined
inputs and expected results.
101

7.4.1 Test strategy and approach


Field testing will be performed manually and functional tests will be written
in detail.
7.4.2 Test objectives
All field entries must work properly.
Pages must be activated from the identified link.
The entry screen, messages and responses must not be delayed.
Features to be tested
Verify that the entries are of the correct format
No duplicate entries should be allowed
All links should take the user to the correct page.
Each module can be tested using the following two strategies:
Black Box Testing: Black Box Testing is testing the software without any
knowledge of the inner workings, structure or language of the module being tested.
Black box tests, as most other kinds of tests, must be written from a definitive
source document, such as specification or requirements document, such as
specification or requirements document. It is a testing in which the software under
test is treated, as a black box .you cannot see into it. The test provides inputs and
responds to outputs without considering how the software works.
Incorrect or missing functions
Interface errors
Errors in data structure or external database access
Performance errors
Initialization and termination errors.
102

In this testing only the output is checked for correctness. The logical flow of the
data is not checked.
White Box 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:
Guarantee that all independent paths have been executed.
Execute all logical decisions on their true and false sides.
Execute all loops at their boundaries and within their operational
Execute internal data structures to ensure their validity.
Integration 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.
Integration tests are designed to test integrated software components
to determine if they actually run as one program. Testing is event driven and is
more concerned with the basic outcome of screens or fields. Integration tests
demonstrate that although the components were individually satisfaction, as shown
by successfully unit testing, the combination of components is correct and
consistent. Integration testing is specifically aimed at exposing the problems that
arise from the combination of components.
7.4.3 Test Results: All the test cases mentioned above passed successfully. No
defects encountered.
System Testing: The purpose of testing is to discover errors. Testing is the process
of trying to discover every conceivable fault or weakness in a work product. It
103

provides a way to check the functionality of components, sub assemblies,


assemblies and/or a finished product. It is the process of exercising software with
the intent of ensuring that theSoftware system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various types
of test. Each test type addresses a specific testing requirement.
Functional test:Functional tests provide systematic demonstrations that functions
tested are available as specified by the business and technical requirements, system
documentation, and user manuals.
Functional testing is centered on the following items:
Valid Input

: identified classes of valid input must be accepted.

Invalid Input
Functions

: identified classes of invalid input must be rejected.


: identified functions must be exercised.

Output

: identified classes of application outputs must be

exercised.
Systems/Procedures

: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements,


key functions, or special test cases. In addition, systematic coverage pertaining to
identify Business process flows; data fields, predefined processes, and successive
processes must be considered for testing. Before functional testing is complete,
additional tests are identified and the effective value of current tests is determined.
Acceptance Testing: It is a pre-delivery testing in which entire system is tested at
client's site on real world data to find errors.

104

Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
Validation Testing: The system has been tested and implemented successfully and
thus ensured that all the requirements as listed in the software requirements
specification are completely fulfilled. In case of erroneous input corresponding
error messages are displayed.
Compilation Testing: It was a good idea to do our stress testing early on, because
it gave us time to fix some of the unexpected deadlocks and stability problems that
only occurred when components were exposed to very high transaction volumes.
Execution Testing: This program was successfully loaded and executed. Because
of good programming there was no execution error.
Output Testing: The successful output screens are placed in the output screens
section

7.5 Test cases:


STUDENT LOGIN TEST CASES:
105

If username and password is not correct the message wil be displayed


asloginfailed please try again.Then we have to enter correct uname and
pwd.

TEST
CASE

CONDIT
IONS
BEING
CHECK
ED

EXPECTED
BEHAVIOUR

OBSERVED
BEHAVIOUR

STAT
US

TEST
TYPE

Username=

Check
validation

Login not
successful

Login not
successful
please enter
correct uname
and pwd

Pass

Black
box
testing

Password=

Username=c
sefirstyear
Password=
csefirstyear

Check
If valid subjects
validation
will open
If valid subjects
will open

FACULTY LOGIN TEST CASES:

106

Pass
Black
box
testing

8.

If username and password is not correct the message wil be displayed


asloginfailed please try again.Then we have to enter correct uname and
pwd.

TEST
CASE

CONDIT
IONS
BEING
CHECK
ED

EXPECTED
BEHAVIOUR

OBSERVED
BEHAVIOUR

STAT
US

TEST
TYPE

Username=

Check
validation

Login not
successful

Login not
successful
please enter
correct uname
and pwd

Pass

Black
box
testing

Password=

Username=c
sefirstyear
Password=
csefirstyear

Check
If valid subjects
validation
will open
If valid subjects
will open

107

Pass
Black
box
testing

TESTCASE FOR MESSAGES:


If blank message will send then it shows error as blank message canno sent.
108

Then we have to send with atleat one character

TEST
CASE

CONDIT
IONS
BEING
CHECK
ED

EXPECTED
BEHAVIOUR

OBSERVED
BEHAVIOUR

STAT
US

TEST
TYPE

Blank
message

Check
validation

Message
cannot sent

Blank message
cannot sent

Pass

Black
box
testing

Message with
text

Check
validation

Message sent
successfully

Pass
Message sent
successfully

109

Black
box
testing

110

8.CONCLUSION

8.CONCLUSION
111

In this project we were developed an android application which is useful to


students who can share doubts easily.This android application is mainly
developing for online interacion about student and faculty.In this app every
student and faculty has its own username and password for logon to the
application.Faculty.
In this app student can post his doubts corresponding to subject and
branch.At the same time faculty can give answers to their doubts
corresponding to his assigned subjects.This app is mainly developing for
specifccollege.The main advantage of this app is student and faculty can
download this app and make interaction and share the ideas.

112

9. BIBLOGRAPHY

9.BIBLOGRAPHY
113

REFERNCES:
1.Java complete reference, Herbert schield,7th edition, Mc.Graw hill.
2.The definitive guide to SQLite,Mike Owens.
3. The Unified Modeling Language Reference Manual,James Rumbaugh,2nd
edition.
4. Expert Android, by SatyaKomatineni, Dave MacLean ,Dave MacLean
WEB LINKS:
1.www.sun.com
2.www.android.com
3.www.developers.android.com
4.www.SQLite.com

10. USER MANUAL


114

STEP1:
The student and faculty need to install the app in android mobile.The
database must be always should be in activemode.
The student should enter his own username and password
STEP2:
The subjects will open based on his subid and branched and year after log in
successfully.student can post his doubts by click on subject.
STEP3:
The student can post his doubts by entering text message at bottom of the
screen.after sending message it shows message send successfully.
STEP4:
The faculty can login based on his own username and password.
Faculty can view student posts by click on subject.
STEP5:
Faculty can send his solution to students by click on subjects.
STEP6:
The student and faculty can logout successfully by click on logout button

115

You might also like