Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Java, SQL and Android

CHAPTER 1
COMPANY PROFILE
1.1 Company Caption
“ QSpiders is a place where businesses find talent and dreams take flight.”
1.2 Company Logo

1.3 Company Name


“QSpiders”
1.4 Address
No.01, 3rd cross Basappa Layout, Gavipuram Extn, Kempegowda
Nagar, Bengaluru, Karnataka 560019.

1.5 Phone number


+91-9845687781

1.6 Website URL


http://www.qspiders.com

1.7 Email Address


onlineenq@qspiders.com

1.8 Major Organization Milestones


• Established in 2007.
• Led by Industry Experts.
•Global Presence in 4 Countries.
•Spread Across 21 Centers in India.
•Presence in 8 States.
•Training Centers in 9 major Cities in India.

Dept. of CSE, BITM, Ballari. Page 1


Java, SQL and Android

CHAPTER 2
ABOUT THE COMPANY
2.1 History of the Organization
QSpiders is a best-in-class learning solutions organization headquartered
in India’s IT capital, Bangalore. We offer a wide range of courses in the area of software
testing and are official partners of the ISTQB®. A “finishing school” in many ways, the
institute provides young job aspirants the perfect launch-pad to build a rewarding career
in the growing IT sector. From its humble beginnings, QSpiders has exponentially grown
to be the world’s largest software testing training organization spread across countries. At
QSpiders, we ensure training is imparted by specialists with proven subject matter
expertise and who have spent over a decade in their area of specialization. Our faculty are
highly competent, skilled and dedicated to giving their best towards the professional
development of our students. Besides training, we also provide placement assistance to
our students and most of the big corporates in the corporate world hire our trained talent.
It is indeed our pleasure to have placed over thousands of job-seekers in various IT firms
across India over the years with an aim to place thousands more! Building competency
into over 5000 students a month, QSpiders is where talent meets opportunity and we
believe your search for the dream job or the dream professional ends here.

2.2 Organization Structure, Products, Services offered by the Company


2.2.1 Organization Structure
QSpiders has 21 centers across India, along with this, there are 4 different
units working parallel - altogether the total space used is 2,81,500Sqrft.
2.2.2 Products and Services
 Specialized in Software testing & Automation Tools Training.
 Specialized in Software Development Training.
 Services offered are:
 Graduate Internships.
 Incubation – CSR Activity.
 Campus Recruitment Training.
 Corporate Training.
 Post Graduate Internship.

Dept. of CSE, BITM, Ballari. Page 2


Java, SQL and Android

 Project Guidance.
 Placements.

2.3 Number of Employees in the Organization


Altogether we have 470 Employees & 112 Trainers in QSpiders Organization.

2.4 Employee Structure of the Organization

Founder & Managing Director

Vice President

Operations Head

Branch Heads

Counsellors & HR’s

Fig 2.4 Employee Structure of the Organization.

2.5 Financial Details-Operational cost of the organization


50 Crores Overall Turnover.

2.6 Process Adopted


Agile Methodology.
2.7 Introduction about the Department
 Train on Mobile Application Technologies.
 Train on QA Technologies.
 Train on Full Stack Development.
 Guidance on Internship & Project Implementation.

Dept. of CSE, BITM, Ballari. Page 3


Java, SQL and Android

2.8 Roles and Responsibilities of Individuals in the Department


 Mentoring the team.
 Preparing Syllabus.
 Solving intern’s Technical Problem.
 Nurturing them in building code.

2.9 Number of Systems and their Specifications


 DESKTOP: 20 Dell Desktops.
Specifications:
a. LED Monitor 15 inches wide Screen.
b. Dell CPU.
c. Intel i3 core processor
d. 8GB RAM & 1TB HDD.
 INTERNET ACCESS: LAN Connection.
2.10 Organization Structure of the Department

Manager

Lead

Sr. Member

Associates

Fig 2.10 Organization Structure of the Department.

Dept. of CSE, BITM, Ballari. Page 4


Java, SQL and Android

2.11 My Role in the Company


The roles and responsibilities assigned to me during the internship are:
1. The first task that must be performed by an application developer is to collect the
requirements.
2. The intern must be able to understand and visualize the requirements collected in
order to frame the objectives required for developing the application.
3. Further the intern must identify the tools that are required for the development.
4. Develop a plan in order to carry out the tasks assigned to them on a step by step
basis.
5. Break down the program specifications into simplest elements and translate the
logic into a programming language.
6. Combine all the logics of the program design by integrating the logics.
7. Debugging the program and minimize the errors present in the logic.
8. Perform testing to check whether that the output works as intended.
9. Generate a report by writing a detailed documentation for the operation of the
program.

Dept. of CSE, BITM, Ballari. Page 5


Java, SQL and Android

CHAPTER 3
TASKS PERFORMED
3 Introduction about the Concepts
3.1 JAVA
In 1995, Java, which originally went by the name Oak and then Green, was
created by a team led by James Gosling for Sun Microsystems, a company now owned
by Oracle. Java was originally designed for use on digital mobile devices, such as cell
phones. However, when Java 1.0 was released to the public in 1996, its main focus had
shifted to use on the internet, providing interactivity with users by giving developers a
way to produce animated web pages.
Java is a high-level object-oriented programming language developed by
Sun Microsystems. It came into existence as a part of web application, web services and a
platform independent programming language in 1990s.
3.2 Features of JAVA
3.2.1 Simple: We wanted to build a system that could be programmed easily
without a lot of esoteric training and which leveraged today’s standard practice.
3.2.2 Object Oriented: Simply stated, object-oriented design is a technique for
programming that focuses on the data (objects) and on the interfaces to that object.
3.2.3 Robust: Java is intended for writing programs that must be reliable in a
variety of ways. The single biggest difference between Java and C/C++ is that java has a
pointer model that eliminates the possibility of overwriting memory and corrupting data.
3.2.4 Secure: Java is intended to be used in networked/distributed environments.
Toward that end, a lot of emphasis has been placed on security. Java enables the
construction of virus-free, tamper-free systems.
3.2.5 Portable: Unlike C and C++, there are no “implementation-dependent”
aspects of the specification. The sizes of the primitive data types are specified, as is
the behavior of arithmetic on them.
3.2.6 Interpreted: The Java interpreter can execute Java byte codes directly on
any machine to which the interpreter has been ported.

Dept. of CSE, BITM, Ballari. Page 6


Java, SQL and Android

3.2.7 High Performance: While the performance of interpreted byte codes is


usually more than Adequate, there are situations where higher performer is required.
3.2.8 Multithreaded: The benefits of multithreading are better interactive
responsiveness and real-time behavior.
3.2.9 Dynamic: In a number of ways, Java is a more dynamic language than C
or C++. It was designed to adapt to an evolving environment.

3.3 Object-Oriented Programming Concepts


The Java language is object oriented. This section is an introduction to OOP
language concepts, using structured programming as a point of contrast.
3.3.1 CLASSES:
A class is the template or blueprint from which objects are made. Thinking
about classes as cookie cutters. Objects are the cookies themselves. When you
construct an object from a class, you are said to have created an instance of the class.
● General form of a class: A class is declared by use of the class keyword. The
general form of a class definition is shown as:
Class class_name{
type instance-variable1;
type instance-variable2;
type method-name(parameter-list)
{
//body of method
}
}
3.3.2 OBJECTS:
Objects are the basic run time entity or in other words object is an instance
of a class. Each object made from a class can have its values for the instance variables of
that class.
● Syntax for the Object: class_nameobject_name= newclass_name();
To work with OOP, you should be able to identify three key characteristics of objects:
• The object’s behavior - What can you do with this object, or what methods can
you apply to it?
• The object’s state - How does the object react when you apply those methods?

Dept. of CSE, BITM, Ballari. Page 7


Java, SQL and Android

• The object’s identity - How is the object distinguished from others that may have the
same behavior and state?
Example: Class Dog{
int size;
String breed;
String name;
void bark(){
System.out.println(“Ruff! Ruff!”);
}
Class DogTestDrive{
Public static void main (String[] args){
Dog d=new Dog();
d.size=40;
d.bark();
}
}
3.3.3 METHODS:
A class has one or more methods. Methods must be declared inside the
class. Within the curly braces of a method, write the instructions for how that method
should be performed. Method code is basically a set of statements, and you can think of a
method kind of like a function or procedure.
public class class_name{
returntypemethod_name(){
//statements;
}
}
3.3.4 INHERITANCE:
● When one class inherits from another, it is called Inheritance.
● The class which is inherited is called superclass and the class which
inherits is called subclass.
Example: Public class Doctor{
Boolean worksAtHospital;
void treatPatient( ) {
//Perform a checkup
}
}
Public class FamilyDoctor extends Doctor{
Boolean makesHouseCalls;
voidgiveAdvice( ) {
//give homespun advice
}

Dept. of CSE, BITM, Ballari. Page 8


Java, SQL and Android

}
Public class Surgeon extends Doctor{
void treatPatient( ) {
//perform surgery
}
void makeIncision( ) {
//make incision(yikes!)
}
}
3.3.5 ABSTRACTION
The process of abstraction in Java is used to hide certain details and only
show the essential features of the object. Through the process of abstraction,
a programmer hides all but the relevant data about an object in order to reduce
complexity and increase efficiency.
● An abstract class has no use, no value, and no purpose in life unless it is extended.
● An abstract class means that nobody can ever make a new instance of that class.
Syntax: abstract public class canine extends Animal{
Public void roam( ){ }
}
3.3.6 ENCAPSULATION
Encapsulation is the concept of hiding the implementation details of a class
and allowing access to the class through a public interface. For this, we need to declare
the instance variables of the class as private or protected. The client code should access
only the public methods rather than accessing the data directly.
For Example: public class Employee{
private float salary;
public float getSalary(){
return salary;
}
public void setSalary(float salary){
this.salary = salary;
}
}
3.3.7 CONSTRUCTORS
A class contains constructors that are invoked to create objects from the class
blueprint. Constructor declarations look like method declarations-except that they use the
name of the class and have no return type.

Dept. of CSE, BITM, Ballari. Page 9


Java, SQL and Android

For Example: Bicycle has one constructor:


Public Bicycle (intstartCadence, intstartSpeed, intstartGear) {
gear = startGear;
cadence = startCadence;
speed = startSpeed;
}
To create a new Bicycle object called myBike, a constructor is called by the new
operator:
Bicycle myBike = new Bicycle(30, 0, 8);
3.3.8 THIS KEYWORD
● When we declare the name of instance variable and local variables same,
This keyword helps us to avoid name conflicts.
● In the example, this.lengthand this.breadth refers to the instance variable
length and breadth while length and breadth refers to the arguments passed
in the method.
Example: class Rectangle{
intlength,breadth;
void show(intlength,int breadth){
this.length=length;
this.breadth=breadth;
}
Intcalculate(){
return(length*breadth);
}
}
public classUseOfThisOperator{
public static void main(String[] args){
Rectangle rectangle = newRectangle();rectangle.show(5,6);
int area = rectangle.calculate();
System.out.println(“The area of a Rectangle is : “+ area);
}
}
Output:C:\java>java UseOfThisOperator
The area of a Rectangle is: 30

3.4 Structured Query Language (SQL)


SQL is the only language which is used to interact with the relational
database system. SQL was developed by IVM. Previously SQL was also called as SEQL
(Simple/Structured English Query Language). SQL helps us to maintain data consistency
and integrity i.e., helps us to maintain correctness of data.

Dept. of CSE, BITM, Ballari. Page 10


Java, SQL and Android

Data integrity and consistency is maintained with the help of:


1. Data types.
2. Constraints.
1. DATATYPES
These include character (n), varchar (n), number (n), date (dd-mm-yy),
Boolean, BLOB (Binary Large Object), CLOB, Integer (n), Float (p,s),
Number (n,s).
2. CONSTRAINTS
a) Unique: Unique constraints helps us to eliminate duplicate values
from a column i.e., storage of duplicate values is not allowed.
Examples: phone number, aadhar card number, USN, PAN card number etc.
b) Not Null: A not Null constraint when applied on the column does
not allow null storage.
c) Check: Check constraint is used to apply some additional business
scenarios.
d) Default: Default constraint is used to declare a default value to a
column if a value is not specified. By default, in SQL, the default value for all
the columns is NULL.
e) Primary Key: Primary key is used to uniquely identify a record
from the table. The column which is made as primary key is both unique as
well as “NOT NULL”. The column which is unique as well as not null is
eligible to become primary key.
f) Foreign Key: Foreign key is used to create a relationship across
multiple tables. Foreign key is also called ass referral integrity constraint. A
foreign key is also called as “REFERAL INTEGRITY CONSTRAINT”.
3.5 SUB LANGUAGES OF SQL
There are five sub languages in SQL. They are as follows:
1. Data Query Language.
2. Data Manipulation Language.
3. Transaction Control Language.
4. Data Definition Language.

Dept. of CSE, BITM, Ballari. Page 11


Java, SQL and Android

5. Data Control Language.


1. DATA QUERY LANGUAGE (DQL):
DQL is used to fetch the records from the database based on certain
requirements. The records are fetched using “SELECT” statements. “SELECT”
statement is capable of performing three tasks:
a) Projection: This means selecting columns from the table.
b) Selection: This is used to select rows from the table.
c) Joins: This is used to select rows and columns from multiple tables and
displaying it as one single table.
a) PROJECTION:
Selecting columns from the table is called projection.
Syntax: select */Distinct [column list]/express as [Alias] from tablename;
Examples:
 Display all the employee names along with their salary and the
department numbers.
SELECT ename, sal, deptno FROM emp;
b) SELECTION:
Here we limit the number of rows in the table.
Syntax: SELECT * / {Distinct [column] / Expression (Alias)}
FROM tablename WHERE condition (?);
“WHERE” clause restricts the number of records in the table and returns
the records only for the specified condition. “WHERE” clause checks
condition for each and every record once.
Example: SELECT * FROM emp WHERE deptno=10;
c) JOINS:
Join is one of the capabilities of SELECT clause. It is used to display rows
and columns from different tables. According to joins, there are two types:
a) Inner join.
b) Outer join
INNER JOIN OUTER JOIN
Joint condition which returns Joint condition which returns both

Dept. of CSE, BITM, Ballari. Page 12


Java, SQL and Android

only the matching records of matching and un-matching records of


the table is known as “Inner the table based on join condition is
Join”. known as “Outer Join”.

2. DATA MANIPULATION LANGUAGE:


DML involves three types of SQL commands. They are:
a) Insert.
b) Update.
c) Delete.
a) Insert: This command is used to insert the values into the existing table.
When we try to insert the values into a table that does not exist, then we get an
error as “TABLE OR VIEW DOES NOT EXISTS”.
Syntax: INSERT INTO tablename (column1, column2 …) VALUES (value1,
value2…);
Example: INSERT INTO emp (empno, ename, job, sal) VALUES (1234,
‘Arnav’, ‘artist’, 20000);
b) Update: This command is used to update one record, multiple records or all
records of the table. Without “WHERE” clause, the expression in the “SET”
clause is applied to all the columns of the table i.e., all the columns are
updated.
Syntax: UPDATE tablename SET expression WHERE condition;
Example: UPDATE emp SET sal=50000 WHERE empno=1234;
c) Delete: This command is used to delete one record, multiple records or all
records from the table.
Syntax: DELETE FROM tablename WHERE condition;
Example: DELETE FROM emp WHERE empno=1234;
3. TRANSACTION CONTROL STATEMENTS:
There are three transaction control statements that are used in SQL. They are:
a) Commit.
b) Roll back.
c) Save point.

Dept. of CSE, BITM, Ballari. Page 13


Java, SQL and Android

a) Commit: Commit statement is used to make the changes made by the


transactions (SQL statements) permanent.
b) Roll Back: Roll back is used to reverse the changes made by the transactions
up to previous commit point or specified save point.
c) Save point: Save point helps us to create temporary intermediate points to
which we can roll back.
4. DATA DEFINATION LANGUAGE:
The concept of the data definition language used to refer to a subset
of Structured Query Language (SQL) for declaring tables, columns, data types
and constraints.
This includes the following statements (or commands):
a) Create.
b) Drop.
c) Alter.
d) Truncate.
a) CREATE statement:
A commonly used CREATE command is the CREATE TABLE command.
The typical usage is:
Syntax: CREATE TABLE [table name] ([column definitions]) [table
parameters];
The column definitions are:
 A comma-separated list consisting of any of the following
 Column definition: [column name] [data type] {NULL | NOT
NULL} {column options}
 Primary Key definition: PRIMARY KEY ( [comma separated column
list] )
 Constraints: {CONSTRAINT} [constraint definition]
Example: CREATE TABLE products
(P_id number (4) primary key, man_date date NOT NULL,
Price number (5) NOT NULL, p_name varchar2 (10));

Dept. of CSE, BITM, Ballari. Page 14


Java, SQL and Android

b) DROP statement:
The DROP statement destroys an existing database, table, index, or view.
A DROP statement in SQL removes a component from a relational database
management system(RDBMS).
Syntax: DROP TABLE tablename;
A table to be dropped should not have any primary key which are used as
references by the other table.
c) ALTER statement:
The ALTER statement modifies an existing database object.
 ALTER statement to add a column:
Syntax: ALTER TABLE tablename
ADD column_name datatype constraint;
Example: ALTER TABLE emp ADD phone number (10) unique;
 ALTER statement to drop a column:
Syntax: ALTER TABLE tablename DROP column column_name;
Example: ALTER TABLE emp DROP column phone;
d) TRUNCATE statement:
The TRUNCATE statement is used to delete all data from a table. It's much
faster than DELETE.
Syntax: TRUNCATE TABLE tablename;
When we use TRUNCATE statement, only the data is deleted permanently
but it does not delete the structure i.e., it retains the structure.
5. DATA CONTROL LANGUAGE:
A data control language (DCL) is syntax similar to a computer programming
language used to control access to data stored in a database (Authorization).
Examples of DCL commands include:
a) GRANT to allow specified users to perform specified tasks.
b) REVOKE to cancel previously granted or denied permissions.
3.6 NORMALIZATION
Database normalization is a database schema design technique, by which an
existing schema is modified to minimize redundancy and dependency of data.

Dept. of CSE, BITM, Ballari. Page 15


Java, SQL and Android

Normalization split a large table into smaller tables and define relationships between
them to increases the clarity in organizing data.
 Normalization was developed by IBM researcher E.F. Codd in the 1970s.
 Normalization increases the clarity in organizing data in Database.
Database Normalization process is divided into the following normal from:
1) First Normal Form (1NF)
2) Second Normal Form (2NF)
3) Third Normal Form (3NF)
1. FIRST NORMAL FORM (1NF):
Rules:
 The field should represent the data with respect to the same domain.
 The fields should be identified by distinct identifiers.
Example: Sample employee table that displays employees are working with
different departments.

Employee Age Department

Melvin 32 Marketing, Sales

Edward 45 Quality Assurance

Alex 36 Human Resource

Employee table following 1NF:

Employee Age Department

Melvin 32 Marketing

Melvin 32 Sales

Edward 45 Quality Assurance

Alex 36 Human Resource

2. SECOND NORMAL FORM (2NF):


The entity should be considered already in 1NF, and all attributes within the
entity should depend solely on the unique identifier of the entity.

Dept. of CSE, BITM, Ballari. Page 16


Java, SQL and Android

Example: Sample Products table

ProductID Product Brand

1 Monitor Apple

2 Monitor Samsung

3 Scanner HP

4 Head phone JBL


Product table following 2NF:
Products Category table: Brand table:

ProductID Product BrandID Brand

1 Monitor 1 Apple

2 Scanner 2 Samsung

3 Head phone 3 HP

4 JBL
Products Brand table:

PbID ProductID BrandID

1 1 1

2 1 2

3 2 3

4 3 4

3. THIRD NORMAL FORM (3NF):


The entity should be considered already in 2NF, and no column entry should
be dependent on any other entry (value) other than the key for the table. If such an
entity exists, move it outside into a new table.

Dept. of CSE, BITM, Ballari. Page 17


Java, SQL and Android

3.7 ANDROID
HISTORY OF ANDROID
Android is a mobile operating system developed by Google. It is based on a
modified version of the Linux kernel and other open source software, and is designed
primarily for touch screen mobile devices such as smart phones and tablets. In addition,
Google has further developed Android TV for televisions, Android Auto for cars
and Wear OS for wrist watches, each with a specialized user interface. Variants of
Android are also used on game consoles, digital cameras, PCs and other electronics.
Initially developed by Android Inc., which Google bought in 2005, Android was unveiled
in 2007, with the first commercial Android device launched in September 2008. The
operating system has since gone through multiple major releases, with the current version
being 9 "Pie", released in August 2018. The core Android source code is known as
Android Open Source Project (AOSP), and is primarily licensed under the Apache
License.
3.7.1 Versions of Android
1. Android 1.5: Android CupCake.
2. Android 1.6: Android Donut.
3. Android 2.0: Android Eclair.
4. Android 2.2: Android Froyo.
5. Android 2.3: Android GingerBread.
6. Android 3.0: Android HoneyComb.
7. Android 4.0: Android IceCream Sandwich.
8. Android 4.1 – 4.3.1: Android JellyBean.
9. Android 4.4 – 4.4.4: Android KitKat.
10. Android 5.0 – 5.1.1: Android Lollipop.
11. Android 6.0 – 6.0.1: Android Marshmallow.
12. Android 7.0 – 7.1: Android Nougat.
13. Android 8.0 – 8.1: Android Oreo
14. Android 9.0: Android Pie.

Dept. of CSE, BITM, Ballari. Page 18


Java, SQL and Android

3.8 FEATURES OF ANDROID


The following are the list of features of Android:
1. General
2. Connectivity
3. Media
4. Hardware support

1. GENERAL:
a) Messaging
SMS and MMS are available forms of messaging, including threaded text
messaging and Android Cloud to Device Messaging (C2DM) and now
enhanced version of C2DM.
b) Auto Correction and Dictionary
Android Operating System has an interesting feature called Auto
Correction. When any word is misspelled, then Android recommends the
meaningful and correct words matching the words that are available in
Dictionary.
c) Web browser
The web browser available in Android is based on the open
source Blink (previously Web Kit) layout engine, coupled with Chromium's V8
JavaScript engine. Then the WebKit-using Android Browser scored 100/100 on
the Acid3 test on Android 4.0 ICS.
d) Multitasking
Multitasking of applications, with unique handling of memory allocation,
is available.
e) Screen capture
Android supports capturing a screenshot by pressing the power and home-
screen buttons at the same time
f) Multiple language support
Android supports multiple languages.

Dept. of CSE, BITM, Ballari. Page 19


Java, SQL and Android

2. CONNECTIVITY
Android supports connectivity technologies including GSM/EDGE,
Bluetooth, LTE, CDMA, EV-DO, UMTS, NFC, IDEN, and WiMax.
a) Bluetooth
Supports voice dialing and sending contacts between phones, playing music,
sending files (OPP), accessing the phone book (PBAP), A2DP and AVRCP.
b) Tethering
Android supports tethering, which allows a phone to be used as a
wireless/wired Wi-Fi hotspot. Before Android 2.2 this was supported by third-
party applications or manufacturer customizations.
3. MEDIA:
a) Streaming media support
RTP/RTSP streaming 3GPP PSS (ISMA), HTML progressive download
(HTML5 <video> tag), Adobe Flash Streaming (RTMP) and HTTP Dynamic
Streaming are supported by the Flash plug in.
b) Media support
Android supports the following audio/video/still media formats WebM,
H.263, H.264, AAC, and HE-AAC, MPEG-4 SP, AMR, AMR-WB, MP3, MIDI,
Ogg Vorbis, FLAC, WAV, JPEG, PNG, GIF, BMP and WebP.
c) External storage
Most Android devices include microSD card slots and can read microSD
cards formatted with the FAT32, Ext3 or Ext4 file systems. To allow use of
external storage media such as USB flash drives and USB HDDs, some Android
devices are packaged with USB-OTG cables.
4. HARDWARE SUPPORT:
Android devices can include still/video cameras, touchscreens, GPS,
accelerometers, gyroscopes, barometers, magnetometers, dedicated gaming
controls, proximity and pressure sensors, thermometers, accelerated 2D bits blits
(with hardware orientation, scaling, pixel format conversion) and accelerated 3D
graphics.

Dept. of CSE, BITM, Ballari. Page 20


Java, SQL and Android

3.9 ANDROID ARCHITECTURE


Android Architecture is classified into 5 parts:
1. Linux Kernel.
2. Native Libraries.
3. Android Runtime.
4. Android Framework.
5. Applications.
1. Linux Kernel: It is the heart of android architecture that exists at the root of
android architecture. Linux Kernel is responsible for device drivers, power
management, memory management, device management and resource access.
2. Native Libraries: On the top of Linux kernel, there are Native libraries such as
Web Kit, OpenGL, Free Type, SQLite, Media, C runtime library.
3. Android Runtime: In android runtime, there are core libraries and DVM (Dalvik
Virtual Machine) which is responsible to run android application. DVM is like
JVM but it is optimized for mobile devices.
4. Android Framework: On the top of Native libraries and android runtime, there is
android framework. Android framework includes Android API's such as UI (User
Interface), telephony, resources, locations, Content Providers (data) and package
managers.
5. Applications: On the top of android framework, there are applications. All
applications such as home, contact, settings, games, browsers are using android
framework that uses android runtime and libraries. Android runtime and native
libraries are using Linux Kernel.

Dept. of CSE, BITM, Ballari. Page 21


Java, SQL and Android

Fig 3.9 Android Architecture.


3.10 ANDROID COMPONENTS
There are 4 types of components:
1. Activities.
2. Services.
3. Broadcast Receivers.
4. Content Providers.
1. Activities: They dictate the UI and handle the user interaction to the smart phone
screen.
2. Services: They handle background processing associated with an application.
3. Broadcast Receivers: They handle communication between Android OS and
applications.
4. Content Providers: They handle data and database management issues.

Dept. of CSE, BITM, Ballari. Page 22


Java, SQL and Android

3.11 ANDROID ACTIVITY LIFECYCLE

Fig 3.11 Android Activity Lifecycle.


 onCreate ( ): This is called when the activity is first created. This is where you
should do all of your normal static set up: create views, bind data to lists, etc.
Always followed by onStart().
 onRestart ( ):This is called after your activity has been stopped, prior to it being
started again. Always followed by onStart().
 onStart ( ): This is called when the activity is becoming visible to the user.
Followed by onResume() if the activity comes to the foreground.
 onResume ( ): This is called when the activity will start interacting with the user.
At this point your activity is at the top of the activity stack, with user input going
to it. Always followed by onPause().
 onPause ( ): This is called as part of the activity lifecycle when an activity is
going into the background, but has not (yet) been killed. The counterpart to
onResume().

Dept. of CSE, BITM, Ballari. Page 23


Java, SQL and Android

 onStop (): This function is called when you are no longer visible to the user. You
will next receive either onRestart() , onDestroy(), or nothing, depending on later
user activity.
 onDestroy (): The final call you receive before your activity is destroyed.
When the Activity first time loads the events are called as below:
onCreate()
onStart()
onResume()
When you click on Phone button the Activity goes to the background and the
below events are called:
onPause()
onStop()
Exit the phone dialer and the below events will be called:
onRestart()
onStart()
onResume()

When you click the back button OR try to finish() the activity the events are
called as below:
onPause()
onStop()
onDestroy()
3.12 ANDROID LAYOUTS
1. Linear Layout.
2. Relative Layout.
3. Table Layout.
4. Absolute Layout.
5. Frame Layout.
6. List View.
7. Grid View.

Dept. of CSE, BITM, Ballari. Page 24


Java, SQL and Android

1. Linear Layout: Linear Layout is a view group that aligns all children in a
single direction, vertically or horizontally.
2. Relative Layout: Relative Layout is a view group that displays child views in
relative positions.
3. Table Layout: Table Layout is a view that groups views into rows and
columns.
4. Absolute Layout: Absolute Layout enables you to specify the exact location
of its children.
5. Frame Layout: The Frame Layout is a placeholder on screen that you can use
to display a single view.
6. List View: List View is a view group that displays a list of scrollable items.
7. Grid View: Grid View is a View Group that displays items in a two-
dimensional, scrollable grid.
3.14 FUNDAMENTALS
a. Toast: A toast provides simple feedback about an operation in a small popup.
It only fills the amount of space required for the message and the current
activity remains visible and interactive. Toasts automatically disappear after a
timeout.
Instantiate a Toast object with one of the makeText() methods. This
method takes three parameters: the application Context, the text message, and
the duration for the toast. It returns a properly initialized Toast object. You
can display the toast notification with show(), as shown in the following
example:
Context context = getApplicationContext ();
CharSequence text = "Welcome to BITM";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText (context, text, duration);
toast.show();

Dept. of CSE, BITM, Ballari. Page 25


Java, SQL and Android

Fig 3.14 (a) Toast Message.


b. Button: A button consists of text or an icon (or both text and an icon) that
communicates what action occurs when the user touches it.
With text, using the Button class:
<Button
android: layout width="wrap_content"
android: layout height="wrap_content"
android:text="@string/button_text"
... />

Fig 3.14 (b) Button.

Dept. of CSE, BITM, Ballari. Page 26


Java, SQL and Android

c. CheckBox: A CheckBox is an on/off switch that can be toggled by the user.


You should use check-boxes when presenting users with a group of selectable
options that are not mutually exclusive.

Fig 3.14 (c) CheckBox


d. ToggleButton / Switch: A toggle button allows the user to change a setting
between two states. You can add a basic toggle button to your layout with
the Toggle Button object. Android 4.0 (API level 14) introduces another kind
of toggle button called a switch that provides a slider control, which you can
add with a Switch object. SwitchCompat is a version of the Switch widget
which runs on devices back to API 7.

Fig 3.14 (d) Toggle Button / Switch.

Dept. of CSE, BITM, Ballari. Page 27


Java, SQL and Android

CHAPTER 4
REFLECTION NOTES (OUTCOMES)
4.1 Assessment and Experience in the Organization
This report is about the internship, worked at QSpiders. It was a good time to
practice and to improve the knowledge we had learnt into real environment. The
internship report has four chapters. The first chapter is about the company profile. The
second chapter writes about the company and department in the organization. The third
chapter says about the concepts learned and the last part in this reflection notes is the
conclusion of the internship and future work. The job description and motivation do it.

4.1.1 Internship position


The internship started from 16stJan 2019 to 16thFeb 2019. The Concepts learned
namely “Java, SQL and Android”.

4.1.3 Work Experience


The internship was quite satisfactorily in terms of work environment. The team
we have worked with was very friendly and helped a lot in all our problems. New
experiences include teamwork, responsibility and commitments.

4.2 Non–Technical Outcome


4.2.1 Verbal and Writing communication
Strong verbal communication skills are important for everyone. They are
extremely valuable in both our personal and professional life. When speaking clearly,
confidently and with poise, we are much more likely to commend the respect of others
and build rapport. This is particularly important in business interactions. We have
improved a lot in oral and written communication. The team was very good, co-
operative and they gave valuables ideas and suggestions.

Dept. of CSE, BITM, Ballari. Page 28


Java, SQL and Android

4.2.2 Oral Communication Skills


Making a speech or presentation before a large group of people such as manager,
customer or peers is now part of the job. The need is to effectively communication
technical information about our discipline to others.

Ways to develop oral communication skills


• Participate in oral presentation in classes.
• Join the debate team.
• Volunteer to work in on-campus activities that require public speaking.
• Give a speech.
• Chair a meeting or discussion group.

4.2.3 Personality Development


Personality development as in personal growth involves being conscious of one’s
thoughts, feelings, prejudices and judgments and using this personal knowledge to act
with mindfulness and in greater accordance with one’s values and potential. Internship is
a period of intense physical and emotional stress. Most studies have focused on the
negative effects of residency training. Cynicism, anger, depression, and burnout occur at
high rates during residency and may be associated with substance abuse, marital discord,
poor job satisfaction, isolation, and professional reprimand.

4.2.4 Time Management


Time management is one of the most important skills one can have in the
workplace. Deadlines are important, and while one might not meet all of them, they
teach us valuable professional lessons that we will carry with us throughout our career.

4.2.5 Resource Utilization


Resource utilization refers to the process of making the most of the resources
available to one in order to achieve the objective that one wants to. Or, on a personal
front, one’s individual project and the utilization of one’s resources for the same could
also be called resource utilization. The internship period has inculcated resource
utilization factor by helping us to utilize all the resources such as time, computing
systems, internet connectivity and many more in the most effective manner.

Dept. of CSE, BITM, Ballari. Page 29


Java, SQL and Android

CONCLUSION
On the whole, this internship was a useful experience. I have gained new knowledge and
skills. I achieved several of my learning goals. The things that they thought in our
internship was core Java, SQL and Android. At the end of the course we are able to
manage the data using SQL queries and the android development basics which is domain
of our project. Internship helped us in overcoming the difficulties faced in the project
related to android. Undergoing Internship in QSpiders was good experience which
enhanced our skills and made able to increase our knowledge in implementing the
project with android based domain.

Dept. of CSE, BITM, Ballari. Page 30

You might also like