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

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belagavi-590018, Karnataka, India

A MINI PROJECT REPORT ON


“PERSONALITY PREDICTION”
A Mini Project Work Report Submitted in partial fulfilment of the requirement for
the degree of
BACHELOR OF ENGINEERING
In
COMPUTER SCIENCE ENGINEERING
For the course
MOBILE APPLICATION DEVELOPMENT
Submitted By

AAKRITI UPADHYAY(1RG19CS002)

AKRITI A (1RG19CS004)

HONNURASWAMY L(1RG19CS018)

Under the guidance of


Dr. A ANTHONY RAJ
(Asst. Professsor, Dept CSE, RGIT, Banglore 32)

Department Of Computer Science & Engineering


RAJIV GANDHI INSTITUTE OF TECHNOLOGY
Cholanagar, R.T. Nagar Post, Bangaluru-560032

2021-2022
RAJIV GANDHI INSTITUTE OF TECHNOLOGY
(Affiliated To Visvesvaraya Technological University)
Cholanagar, R.T.Nagar Post, Bangalore-560032

Department of Computer Science Engineering

This is to certify that the Mini Project Report entitled “PERSONALITY PREDICTION” is a
bonafide work carried out by Miss AAKRITI UPADHYAY (1RG19CS002), Miss AKRITI
A (1RG19CS004) and Mr. HONNURASWAMY L (1RG19CS018) in partial fulfillment for
the award of Bachelor of Engineering in Computer Science Engineering under
Visvesvaraya Technological University, Belgavi, during the year 2021-2022. It is certified that
all corrections/suggestions given for Internal Assessment have been incorporated in the report.
This Mini Project report has been approved as it satisfies the academic requirements in respect of
work.

Signature of Guide Signature of HOD


Dr. A Anthony Raj Mrs. Arudra A
Asst. Professor Professor & HOD
, Dept. of CSE Dept of CSE
RGIT ,Bangalore RGIT, Bangalore

EXTERNAL VIVA

NAME OF THE EXAMINERS: SIGNATURE WITH DATE:

1.

2.
VISVESVARAYA TECHNOLOGICAL UNIVERSITY

Jnana Sangama, Belagavi-590018

RAJIV GANDHI INSTITUTE OF TECHNOLOGY


DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

DECLARATION

We hereby declare that the mini project entitled “PERSONALITY PREDICTION” submitted
to the Visvesvaraya Technological University, Belagavi during the academic year 2021-2022,
is record of an original project done by us under the guidance of Dr.Anthony Raj , Assistant
Professor, Department of Computer Science and Engineering, Rajiv Gandhi Institute of
Technology, Bengaluru and this project is submitted in the partial fulfillment of requirements for
the award of the degree of Bachelor of Engineering in Computer Science & Engineering. The
results embodied in this thesis have not been submitted to any other University or Institute for
award of any degree or diploma.

AAKRITI UPADHYAY (1RG19CS002)


AKRITI A (1RG19CS004)
HONNURASWAMY L (1RG19CS018)

i
ACKNOWLEDGEMENT

We take this opportunity to express our sincere gratitude and respect to the Rajiv Gandhi Institute
of Technology, Bengaluru for providing us an opportunity to carry out our project work.

We express our sincere regards and thanks to Dr. D G Anand, Principal, RGIT, Bengaluru and
Mrs. ARUDRA A, Professor and Head, Department of Computer Science & Engineering, RGIT,
Bengaluru, for their encouragement and support throughout the Project.

With profound sense of gratitude, I acknowledge the guidance and support extended by
Dr.Anthony Raj Asst. Professor, Department of Computer Science & Engineering,
RGIT,Bengaluru. Her incessant encouragement and valuable technical support have been of immense
help in realizing this project. Her guidance gave me the environment to enhance our knowledge, skills and
to reach the pinnacle with sheer determination, dedication and hard work.

We also extend our thanks to the entire faculty of the Department of CSE, RGIT, Bengaluru, who
have encouraged me throughout the course of Bachelor Degree.

AAKRITI UPADHYAY (1RG19CS002)

AKRITI A (1RG19CS004)

HONNURASWAMY L (1RG19CS018)

ii
ABSTRACT

The project is based on identifying the personality of an individual using machine learning algorithm .The personality
of a human plays a major role in his personal and professional life Nowadays many organization have also started
shortlisting the candidates based on their personality as this increase the efficiency of the work because the person is
working in what he is good at than what he is forced to do .In our project ,we have tried to combine both personality
prediction algorithm and logistic regression to predict the personality of a person and used term frequency algorithm
to get the skill in which the person is good at. User can easily identify his personality and his technical skill from this
model or system

iii
TABLE OF CONTENTS
Declaration i

Acknowledgement ii

Abstract iii

CHAPTERS TITLE PAGE NO


1. INTRODUCTION

1.1 PROJECT OVERVIEW 1

1.1.1 APPLICATIONS OF MAD 2

1.1.2 DESIGN 2

1.2 BACKGROUND OF THE PROJECT 2

1.3 SCOPE OF THE PROJECT 2

1.4 AIM OF THE PROJECT 2

1.5 OBJECTIVE OF THE PROJECT 3

2. REQUIREMENT SPECIFICATION

2.1 DETAILS OF SOFTWARE AND LANGUAGE 4


2
.
1
2.1.1 INTRODUCTION TO ANDROID 4
2.1.2 ANDROID ARCHITECTURE 5

2.2 INTRODUCTION TO ANDROID STUDIO 7

2.4 INTRODUCTION TO JAVA 8

2.5 SYSTEM REQUIREMENTS 9

2.5.1 HARDWARE REQUIREMENTS 9

2.5.2 SOFTWARE REQUIREMENTS 9

2.6 TOOLS USED 9

2.6.1 Android Software Development 9

2.6.2 Android Debug Bridge (ADB) 10


2.6.3 Gradle Build 10

2.6.4 SDK Manager 10

2.6.5 AVD Manager 10

3. SYSTEM DESIGN

3.1 DESIGN APPROACH 12

3.2 Front-End Design 12

4 SYSTEM IMPLEMENTATION

4.1 XML Code 14


4.1.1 Java Code 1
5 APPLICATION OUTPUT

5.1 Start page 20


5.1 Home page 20

5.1 Start Quiz page 21

5.1 Question page 21

5.1 Answer page 22

CONCLUSION 23

BIBLIOGRAPHY 24
TABLE OF FIGURES

2.1.2 Android architecture 4

5.1 Start Page 21

5.2 Home page 21

5.3 Start Quiz page 22

5.4 Question page 22

5.5 Result page 23


Personality Prediction 2021-2022

CHAPTER 1
INTRODUCTION

The project is based on identifying the personality of an individual using machine learning algorithm .The
personality of a human plays a major role in his personal and professional life Nowadays many organization have
also started shortlisting the candidates based on their personality as this increase the efficiency of the work
because the person is working in what he is good at than what he is forced to do .In our project ,we have tried to
combine both personality prediction using ML algorithm like KNN,CNN and logistic regression to predict the
personality of a person and used term frequency algorithm to get the skill in which the person is good at.
User can easily identify his personality and his technical skill from this model or system

1.1 PROJECT OVERVIEW

Open to Experience: It involves various dimensions, like imagination, sensitivity ,attentiveness


,preference to variety ,and curiosity.

Conscientiousness: This trait is used to describe the carefulness and diligence of the person. It is the
quality that describes how organized and efficient a person is.

Extraversion: It is the trait that describes how the best candidates can interact with people that is how good
are his/her social skills.

Agreeableness: It is a quality that analyses the individual behavior based on the generosity, sympathy,
cooperativeness and ability to adjust with people.

Neuroticism: This trait usually describes a person to have mood swings and has extreme expression power .

1.1.1 APPLICATIONS OF MAD

 Can Be used to predict a person’s personality with an accuracy of 85.81%


 Used to identify the right candidate to the right candidate based on his personality and skill
 Can be used to match marital profiles.

1.1.1 DESIGN

The design of the application plays a critical role in performance and scalability. This
system is intended to be continuously improved by the expansion of system capabilities. The system

Department of CSE Page 1


Personality Prediction 2021-2022

primarily consists of three parts: a login part to create profile by collecting information; a data warehouse
for data storage; and an efficient and stable data analysis center running in the backend. The mobile
operation APP is based on theAndroid system and can support versions 4.0 and higher.

1.2 BACKGROUND OF THE PROJECT

 UI Design in android platform


 Android application development
 Entity modeling relationship

1.3 SCOPE OF THE PROJECT


There are several highly successful personality apps on the market. The user is required to answer
20 questions, and the algorithm will then determine their personality depending on the answers.
.
1.4 AIM OF THE PROJECT

The main aim of the “Personality development” mini project is to illustrate the various layers in humans
.Through this app, we can find out the personality of a human being.
The users are presented with a set of questions which they are supposed to answer. The algorithm
with deduce their personality based on their answers.
The graphical user interface of the app should look appealing to the user so as to entice them. The app
should provide a pleasant experience and a feeling of accomplishment after being used to encourage
recurrent usage. It should be highly accessible regardless of the user’s familiarity with applications.
Whether the user is a novice or is experienced, the app will be good for both. The key to this app is
simplicity and this app will provide a few features popular in this market, through a simple and straight to
the point application

1.5 OBJECTIVE OF THE PROJECT

 The study is helps to you assess the person’s knowledge.


 The study is helps to you assess the person’s beliefs.
 The study is helps to you assess the person’s feelings.
 Allows assessing the person’s actions in regard to a wide range of personal skills, abilities and
interests.
 The assessments are graded, that exercises that generate individual personality in the organization.

Department of CSE Page 2


Personality Prediction 2021-2022

CHAPTER 2
REQUIREMENT SPECIFICATION

2.1 DETAILS OF SOFTWARE AND LANGUAGE


Software is a set of instructions, data or programs used to operate computers and execute specific
tasks. It is the opposite of hardware, which describes the physical aspects of a computer. Language is a script
or programs that run on a device. It can be thought of as the variable part of a computer, while hardware is the
invariable part.

2.1.1 INTRODUCTION TO ANDROID

Android is a mobile operating system (OS) currently developed by Google, based on the Linux
kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets. Android's user
interface is mainly based on direct manipulation, using touch gestures that loosely correspond to real-world
actions, such as swiping, tapping and pinching, to manipulate on-screen objects, along with a virtual keyboard
for text input. In addition to touchscreen devices, Google has further developed Android TV for televisions,
Android Auto for cars, and Android Wear for wrist watches, each with a specialized user interface. Variants of
Android are also used on notebooks, game consoles, digital cameras, and other electronics. Initially
developed by Android, Inc., which Google bought in 2005, Android was unveiled in 2007, along with the
founding of the Open Handset Alliance – a consortium of hardware, software, and telecommunication
companies devoted to advancing open standards for mobile devices. As of July 2013, the Google Play store has
had over one million Android applications ("apps") published, and over 50 billion applications downloaded.
An April–May 2013 survey of mobile application developers found that 71% of developers create
applications for Android, and a 2015 survey found that 40% of full-time professional developers see Android
as their priority target platform.

2.1.2 ANDROID ARCHITECTURE


Android architecture contains different number of components to support any android device needs.
Android software contains an open-source Linux Kernel having collection of number of C/C++ libraries which
are exposed through an application framework services. Among all the components Linux Kernel provides main
functionality of operating system functions to smartphones and Dalvik Virtual Machine (DVM) provide
platform for running an android application.

Department of CSE Page 3


Personality Prediction 2021-2022

The main components of android architecture are following:-

• Applications
• Application Framework
• Android Runtime
• Android Libraries
• Linux Kernel

Fig 2.1.2(a) Android Architecture

Applications
Applications are the top layer of android architecture. The pre-installed applications like home,
contacts, camera, gallery etc. and third party applications downloaded from the play store like chat applications,
games etc. will be installed on this platform only. It runs within the Android run time with the help of the classes
and service by application

Department of CSE Page 4


Personality prediction 2021-2022

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. Application
Framework provides several important classes which are used to create an Android application. It provides a
generic abstraction for hardware access and also helps in managing the user interface with application resources.
Generally, it provides the services with the help of which we can create a particular class and make t hat class
helpful for the Applications creation.

The Android framework includes the following key services −


Activity Manager − Controls all aspects of the application lifecycle and activity stack.
Content Providers − Allows applications to publish and share data with other applications.
Resource Manager − Provides access to non-code embedded resources such as strings, color settings and
user interface layouts.
Notifications Manager − Allows applications to display alerts and notifications to the user.
View System − An extensible set of views used to create application user interfaces.

Application runtime
Android Runtime environment is one of the most important part of Android. It contains components
like core libraries and the Dalvik virtual machine(DVM). Mainly, it provides the base for the application
framework and powers our application with the help of the core libraries.

Like Java Virtual Machine (JVM), Dalvik Virtual Machine (DVM) is a register-based virtual
machine and specially designed and optimized for android to ensure that a device can run multiple instances
efficiently. It depends on the layer Linux kernel for threading and low-level memory management. The core
libraries enable us to implement android applications using the standard JAVA or Kotlin programming
languages.

Android Libraries
This category encompasses those Java-based libraries that are specific to Android development.
Examples of libraries in this category include the application framework libraries in addition to those that
facilitate user interface building, graphics drawing and database access. A summary of some key core Android
libraries available to the Android developer is as follows –

Department of CSE Page 5


Personality prediction 2021-2022

• android.app − Provides access to the application model and is the cornerstone of all Android
applications.

• android.content − Facilitates content access, publishing and messaging between applications and
application components.

• android.database − Used to access data published by content providers and includes SQLite database
management classes.

• android.opengl − A Java interface to the OpenGL ES 3D graphics rendering API.

• android.os − Provides applications with access to standard operating system services including
messages, system services and inter-process communication.

• android.text − Used to render and manipulate text on a device display.

• android.view −The fundamental building blocks of application user interfaces.

• android.widget − A rich collection of pre-built user interface components such as buttons, labels, list
views, layout managers, radio buttons etc.

• android.webkit − A set of classes intended to allow web-browsing capabilities to be built into


applications.

Having covered the Java-based core libraries in the Android runtime, it is now time to turn our
attention to the C/C++ based libraries contained in this layer of the Android software stack.

Linux Kernel
Linux Kernel is heart of the android architecture. It manages all the available drivers such as display
drivers, camera drivers, Bluetooth drivers, audio drivers, memory drivers, etc. which are required during the
runtime. The Linux Kernel will provide an abstraction layer between the device hardware and the other
components of android architecture. It is responsible for management of memory, power, devices etc.

The features of Linux kernel are:

Department of CSE Page 6


Personality prediction 2021-2022

Security: The Linux kernel handles the security between the application and the system.
Memory Management: It efficiently handles the memory management thereby providing the freedom to
develop our apps.

Process Management: It manages the process well, allocates resources to processes whenever they need
them.
Network Stack: It effectively handles the network communication.
Driver Model: It ensures that the application works properly on the device and hardware manufacturers
responsible for building their drivers into the Linux build.

2.2 INTRODUCTION TO ANDROID STUDIO


Android Studio is exclusively designed for developing Android applications. It consists of all
Android SDK tools to design, develop, maintain, test, debug and publish our app. Previously, the
Android development was spread using the Eclipse platform with the Android Development Kit (ADK),
provided by Google, which launched the Android Studio platform. The IDE is designed very efficiently
which makes the developer’s job easy. It also supports the IntelliJ IDE but it has a high cost. The main
idea behind this IDE is that it automatically senses the variables, methods, classes, built-in functions. Java
files, layout files (for design) are integrated into a single project easily. After the completion of project, the
whole application could be put asan .APK (Android Package) file, in which we can run that APK file in any
device and use the application. Other main tools include Android SDK, ADB, and Gradle Build.
Android Studio can be installed on Windows operating systems, OSX and Linux
and isrecommended by Google itself that the hardware must have at least 4 GB of memory and 1GB of free
hard disk space, but we recommend that you have more memory because it was noted that Android Studio
is still a littleslow. You must have Java installed on the machine via the JDK (Java Development Kit),
not the JRE, as it is usually installed, once to develop on Android is necessary for all Java development
classes to be present on themachine.
Coding in Java within Android Studio is intuitive because it provides a rich Java
environment,including context-sensitive help and code suggestion hints. After you compile your Java
code cleanly, the components of Android Studio make sure all of the application is packaged properly,
including the AndroidManifest.xml file. Android Studio includes tools for managing multiple platform-
specific features with the SDK manager and the ability to test your application on either a real device or
the emulator

Department of CSE Page 7


Personality prediction 2021-2022

2.3 INTRODUCTION TO JAVA


Android applications are developed using the Java language using Android SDK (Software
Development Kit). It is the only option for native applications. Java is a very popular programming
language created by James Gosling from Sun Microsystems (now owned by Oracle). Developed long
after C and C++, Java incorporates many of the powerful features of those powerful languages while
addressing some of their drawbacks. Still, programming languages are only as powerful as their libraries.
These libraries exist to help developers build applications. JAVA is most preferred and mostly used
programming language for Android App Development. Java is defined by a specification and consists of a
programming language, a compiler, core libraries and a runtime (Java virtual machine) The Java runtime
allows software developers to write program code in other languages than the Java programming
language which still runs on the Java virtual machine. The Java platform is usually associated with the
Java virtual machine and the Java core libraries. As the project is developing an Android Application, the
default programming language is Java. All Android applications are built using Java in Android Studio
or Eclipse or both.
The language is flexible enough to maintain code complexity, test, implementation, integration
and support. Apart from these, there are other key features which make Java more special. It is object
oriented programming language, one of the important hierarchies in the programming languages which is
used to implement real time applications, it provides for code reusability, and it has a platform
independence feature. It is more secured as the compilers are designed efficiently to figure out any kind
of errors.

2.4 SYSTEM REQUIREMENTS


The application should be installed into a device, system or any machine in such a way that it
should have basic requirements like supporting software and hardware of the device, accessing in-built
software, saycamera for mobile device, internet permissions, and potential security issues such as virus
or any malware detection

2.4.1 HARDWARE REQUIREMENTS

• 64-bit Microsoft® Windows® 8/10


• x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support
for a Windows Hypervisor
• 8 GB RAM or more

Department of CSE Page 8


Personality prediction 2021-2022

• 8 GB of available disk space minimum (IDE + Android SDK + Android Emulator)


• 1280 x 800 minimum screen resolution
• Intel i3

2.4.2 SOFTWARE REQUIREMENTS

• Android Studio Version 4.1 or higher


• Plugins: Android SDK, ADT Plugin

2.5 TOOLS USED

2.5.1 Android Software Development


Android software development is the process by which applications are created for devices
running the Android operating system. Android apps can be written using Kotlin, Java, and C++
languages" using the Android software development kit (SDK), while using other languages is also possible.
All non-JVM languages, such as Go, JavaScript, C, C++ or assembly, need the help of JVM language
code, that may be supplied by tools, likely with restricted API support. Some programming languages
and tools allow cross platform app support (i.e. for both Android and iOS). Third party tools,
development environments, and language support have also continued to evolve and expand since the
initial SDK was released. The official Android app distribution mechanism to end users is Google
Play; it also allows staged gradual app release, as well as distribution of pre-release app versions to
testers.
One of the main tools used in developing android applications, as it packages many core features
into one SDK and it can be used in the application easily. This helps us to avoid writing lot of code, and
building applications faster.

2.5.2 Android Debug Bridge (ADB):


Android SDK uses ADB tool as a connection device which allows us to connect the Android
Devices or Emulator with the machine via USB. Android Debug Bridge (ADB) is a versatile command-
line tool that lets you communicate with a device. The ADB command facilitates a variety of device
actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to
run a variety of commands on a device. It is a client-server program that includes three components:

 A client, which sends commands. The client runs on your development machine. You can invoke a

Department of CSE Page 9


Personality prediction 2021-2022

client from a command-line terminal by issuing an adb command.


 A daemon (adbd), which runs commands on a device. The daemon runs as a background process on
each device.
 A server, which manages communication between the client and the daemon. The server runs asa
background process on your development machine.

2.5.3 Gradle Build


Gradle Scripts are the recent feature that is added to Android Studio. It is basically an
automated build system which is used to automate the various phases involved in designing an
application that includesdesign, development, test, debug, and publish. We need to configure the project
and modules by mentioning all the supported jar files, SDK’s, version name, level, compiled SDK version,
build tools version to ensure thatthe developed app is compatible with the testing device/emulator.
Gradle is also similar to Ant and Mavenwhich helps in maintaining java projects (repositories).

2.5.4 SDK Manager


It is one of the main tools to maintain the updates of all the installed components required to run
the project. It also notifies us when the project is not compatible with device or any other compatibility
issues and to download any component that is required. A software development kit (SDK or "devkit") is
typically a set of

software development tools that allows the creation of applications for a certain software package,
software framework, hardware platform, computer system, video game console, operating system, or
similar development platform.
To create applications you have to download this software development kit. For example, if
you want to create an Android app you require an SDK with java programming, for iOS apps you
require an iOSSDK with swift language, and to develop MS Windows apps you require the .net language.
There are also SDKs that are installed in apps to provide analytics and data about activity. Prominent
examples include Google and Facebook.

2.5.5 AVD Manager (Emulator)


The Android emulator is an Android Virtual Device (AVD), which represents a specific
Android device. We can use the Android emulator as a target device to execute and test our Android
application on ourPC. The Android emulator provides almost all the functionality of a real device. We can

Department of CSE Page 10


Personality prediction 2021-2022

get the incoming phone calls and text messages. It also gives the location of the device and simulates different
network speeds. Android emulator simulates rotation and other hardware sensors. It accesses the Google Play
store, and much more. It is used to create virtual devices of any desired API level to support higher level
SDK’s incase our device does not support. Using emulators to test the application is difficult as it might
be little slower when compared to real device Testing Android applications on emulator are sometimes
faster and easier than doing on a real device. For example, we can transfer data faster to the emulator
than to a real device connected through USB.

Department of CSE Page 11


Personality prediction 2021-2022
Personality prediction

CHAPTER 3

SYSTEM DESIGN
3.1 DESIGN APPROACH
This project is based on the functional design approach, which helps in understanding the design of
the project in a simpler way by explaining its flow, use cases, and implementation more like a modular
approach. For example, there are different modules in this project which have separate functionality and,
other sub functionalities/modules. This module body treats data as nodes connected to each other;
however, it allows for more complex connections, such as many-to-many relationships and cycles. This
schema can model the movement of attributes and entities between locations, or the workflow required to
accomplish a particular task. Furthermore, this is a blueprint for how the outlook is going to be. The design
is an abstract structure or outlinethat represents the pictorial view of the application as a whole. By defining
categories of data and relationships between those categories design makes data much easier to retrieve,
consume, manipulate, and interpret. The schema design organizes the data into separate entities,
determines how to create relationships between organized entities, and how to apply the constraints on the
data. All the modules are designed, implemented and integrated together to make a flawless working
application.

3.2 Front-End Design


Design for any application should be very simple. We should have only a few clicks or navigation
among the features when using the application to avoid hassle. In this application, there are two main
screens,the Login and Home screens.
The login page is the first page which appears when the user uses the application. In that page, if
he isa new user, he can sign up or if he is an existing user, he can login with credentials.
The next screen is the homepage where the users can select additional features like sharing the app
, description and use the app. this screen has all the key features. To make the application interactive,
different controls have been used and designed using the layout file. Following are the important
controls that aredesigned and used in this application-
• Text View: The text view component belongs to the view group as a part of GUI. It displays the
text or content view of any activity to the user and allows them to edit in the code section.
• Edit Text: This allows itself to be editable in the text box.

Department of CSE Page 12


Personality prediction 2021-2022

• Button: One of the important components in which the application needs. It is mainly
associated with action when the user clicks it. We can represent the button using any text which
holds the action class on it.
• List View: This is a key component under the view group which helps in displaying the
informationabout anything when we click the action button. It also allows us to scroll through
the screen and have a look about the information displayed. Using the list adapter, the content
is pulled from the database.
• Toggle Button: This is a user interface control that is used to display ON (Checked) or OFF
(Unchecked) states as a button with a light indicator.
• Image View: Displays image resources, for example Bitmap or Drawable resources. Image View
is also commonly used to apply tints to an image and handle image scaling.

Layout - A layout defines the structure for a user interface in your app, such as in an activity. All
elementsin the layout are built using a hierarchy of View and View Group objects.
• Constraint Layout: This is a View Group which allows you to position and size widgets in a
flexible way.
• Relative Layout: This is a view group that displays child views in relative positions. The position
of each view can be specified as relative to sibling elements or in positions relative to the
parent Relative Layout area.
• Linear Layout: This is a view group that aligns all children in a single direction, vertically or
horizontally.
• Table Layout: This used to arrange the group of views into rows and columns. Table Layout
containers do not display a border line for their columns, rows or cells. A Table will have as
manycolumns as the row with the most cells.

Department of CSE Page | 13


Personality prediction 2021-2022

CHAPTER 4

SYSTEM IMPLEMENTATION
System analysis to construct system elements that meet the stakeholder requirements And
system requirements developments development in the early life cycle phases. These system elements are
then integrated to form intermediate aggregates and finally the complete system of interest (SOI).
Implementation is the process that actually yields the lowest-level system elements in the system
hierarchy (system break down structure). System elements are made, bought or reused. Production involves
the hardware fabrication processes of forming, removing, joining and finishing. The software realization
process of coding and testing or operational procedures development processes for operator roles. If
implementation involves a production process a manufacturing system which uses the established
technical and management processes may be required. The purpose of implementation process is to
design and create (or fabricate) a system elements conforming to that elements design properties or
requirements. The element is constructed employing appropriate technologies and industry practices. The
process bridges the system definition processes and the integration process.

4.1 XML Code


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.quizfrag">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Dashboard"></activity>
<activity android:name=".firstActivity" />
<activity android:name=".SplashScreenActivity">
<intent-filter>

Department of CSE Page | 14


Personality prediction 2021-2022

<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>
<activity android:name=".ResultActivity" />
<activity android:name=".MainActivity" />
</application>
</manifest>

4.2 Java Code


Questions
package com.example.quizfrag;
public class Question {
private int ID;
private String QUESTION;
public Question()
{
ID=0;
QUESTION="";
}
public Question(String QUESTION) {
this.QUESTION = QUESTION;
}
public int getID() {
return ID;
}
public void setID(int ID) {
this.ID = ID;
}
public String getQUESTION() {
return QUESTION;
}
public void setQUESTION(String QUESTION) {

Department of CSE Page | 15


Personality prediction 2021-2022

this.QUESTION = QUESTION;
}
}
Result
package com.example.quizfrag;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.widget.Switch;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import com.example.quizfrag.data.DbHelper;
public class ResultActivity extends AppCompatActivity {
TextView txtPersonality,txtCareers;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_result);
txtPersonality=(TextView)findViewById(R.id.textResult);
txtCareers=(TextView)findViewById(R.id.textCareer);
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
int scoreM = sharedPref.getInt("scoreM", 0);
int scoreE = sharedPref.getInt("scoreE", 0);
int scoreN = sharedPref.getInt("scoreN", 0);
int scoreT = sharedPref.getInt("scoreT", 0);
String personalityType=testMind(scoreM)+testEnergy(scoreE)+testNature(scoreN)+testTactics(scoreT);
txtPersonality.setText( personalityType+personalityName(personalityType));
txtCareers.setText("We believe,these are the suitable careers for you"+personalityCareer(personalityType));
}
public String testMind(int mind)
{
int compare = 0;
if(mind > compare)
{ return "I"; }
else
{ return "E"; }
}
public String testEnergy(int energy)

Department of CSE Page | 16


Personality prediction 2021-2022

{
int compare = 0;
if(energy > compare)
{ return "S"; }
else
{ return "N"; }
}
public String testNature(int nature)
{
int compare = 0;
if(nature > compare)
{ return "F"; }
else
{ return "T"; }
}
public String testTactics(int tactics)
{
int compare = 0;
if(tactics > compare)
{ return "P"; }
else
{ return "J"; }
}public String personalityName(String ptype){
switch(ptype) {
case "ISTJ": return "-The Inspector";
case "ISTP": return "-The Crafter";
case "ISFJ": return "-The Protector";
case "ISFP": return "-The Artist";
case "INFJ": return "-The Advocate";
case "INFP": return "-The Mediator";
case "INTJ": return "-The Architect";
case "INTP": return "-The Thinker";
case "ESTP": return "-The Persuader";
case "ESTJ": return "-The Director";
case "ESFP": return "-The Performer";
case "ESFJ": return "-The Caregiver";
case "ENFP": return "-The Champion";
case "ENFJ": return " - The Giver";
case "ENTP": return "-The Debater";

Department of CSE Page | 17


Personality prediction 2021-2022

default: return "-The Commander";


}}
public String personalityCareer(String ptype){
switch(ptype) {
case "ISTJ":
return "\n" + "\n" + " Accountant\n" + " Computer Programmer\n" + " Dentist\n" + " Doctor\n" +
" Librarian\n" +
" Lawyer\n" + " Police Officer or Detective\n" + " Military Leader";
case "ISTP":
return "\n" + "\n" + " Forensic science\n" + " Engineering\n" + " Mechanics\n" + " Computer
programming\n" + " Carpentry\n" +
" Law enforcement\n" + " Software engineer\n" + " Video game designer\n" + "
Electrician\n" + " Scientist\n" + " Pilot\n" +
" Firefighter";
case "ISFJ":
return "\n" + "\n" + " Social worker\n" + " Counselor\n" + " Nurse\n" + " Paralegal\n" + "
Bookkeeper\n" +
" Child care provider\n" + " Office Manager\n" + " Administrator\n" + " Teacher\n" + "
Banker\n" + " Accountant";
case "ISFP":
return "\n" + "\n" + " Artist\n" + " Composer or musician\n" + " Chef\n" + " Designer\n" + "
Forest ranger\n" + " Nurse\n" +
" Naturalist\n" + " Pediatrician\n" + " Psychologist\n" + " Social worker\n" + " Teacher\n"
+" Veterinarian";
case "INFJ":
return "\n" + "\n" + " Artist\n" + " Actor\n" + " Entrepreneur\n" + " Religious worker\n" + "
Musician\n" +
" Librarian\n" + " Counselor\n" + " Psychologist\n" + " Writer\n" + " Teacher\n" + "
Photographer";
case "INFP":
return "\n" + "\n" + " Artist\n" + " Counselor\n" + " Graphic Designer\n" + " Librarian\n" +
" Psychologist\n" + " Physical Therapist\n" + " Social Worker\n" + " Writer";
case "INTJ":
return "\n" + "\n" + " Scientist\n" + " Mathematician\n" + " Engineer\n" + " Dentist\n" +
" Doctor\n" + " Teacher\n" + " Judge\n" + " Lawyer";
case "INTP":
return "\n" + "\n" + " Chemist\n" + " Physicist\n" + " Computer programmer\n" + " Forensic
scientist\n" +
" Engineer\n" + " Mathematician\n" + " Pharmacist\n" + " Software developer\n" + "

Department of CSE Page | 18


Personality prediction 2021-2022

Geologist";
case "ESTP":
return "\n" + "\n" + " Computer support technician\n" + " Detectives\n" + " Entrepreneur\n" +
" Marketer\n" + " Paramedic\n" + " Police officer\n" + " Sales agent";
case "ESTJ":
return "\n" + "\n" + " Police officer\n" + " Military\n" + " Judge\n" + " Politician\n" +
" Teacher\n" + " School administrator\n" + " Business manager\n" + " Accountant\n" + "
Banker";
case "ESFP":
return "\n" + "\n" + " Artist\n" + " Actor\n" + " Counselor\n" + " Social worker\n" + " Athletic
coach\n" +
" Child care provider\n" + " Musician\n" + " Psychologist\n" + " Human resources
specialist\n" + " Fashion designer";
case "ESFJ":
return "\n" + "\n" + " Childcare\n" + " Nursing\n" + " Teaching\n" + " Social work\n" +
" Counseling\n" + " Physician\n" + " Receptionist\n" + " Bookkeeper\n" + " Office
manager";
case "ENFP":
return "\n" + "\n" + " Psychologist\n" + " Journalist\n" + " Actor\n" + " TV Anchor/Reporter\n" +
" Nutritionist\n" + " Nurse\n" + " Social Worker\n" + " Politician\n" + " Counselor";
case "ENFJ":
return "\n" + "\n" + " Counselor\n" + " Teacher\n" + " Psychologist\n" +
" Social worker\n" + " Human resources manager\n" + " Sales representative\n" + "
Manager";
case "ENTP":
return "\n" + "\n" + " Engineer\n" + " Lawyer\n" + " Scientist\n" +
" Psychologist\n" + " Inventor\n" + " Psychiatrist\n" + " Journalist";
default:
return "\n" + "\n" + " Human resources manager\n" + " Company CEO or manager\n" + " Lawyer\n"
+ " Scientist\n" +
" Software developer\n" + " Business analyst\n" + " Entrepreneur\n" + " University
professor";
}}}

Department of CSE Page | 19


Personality prediction 2021-2022

CHAPTER 5

APPLICATION OUTPUT

5.1 Start page

5.2 Home page

Department of CSE Page | 20


Personality prediction 2021-2022

5.3 Start Quiz page

5.4 Questions page

Department of CSE Page | 21


Personality prediction 2021-2022

5.5 Result page

Department of CSE Page | 22


Personality prediction 2021-2022

CONCLUSION

FUTURE ENHANCEMENTS

The personality application market is growing and the developers need to be aware of all the new innovations
personality developments and application is less-known or used but it will be a very usefuland great success in
the near future. In the end, these applications are just like friends, the more we use them, the more benefits
we’ll get.

Department of CSE Page | 23


Personality prediction 2021-2022

BIBLIOGRAPHY

TEXTBOOKS REFFERED

• Google Developer Training, "Android Developer Fundamentals Course – Concept Reference”,


Google Developer Training Team, 2017.
• Eric Hellman, “Android Programming – Pushing the Limits”, 1st Edition, Wiley India Pvt Ltd,
2014. Dawn Griffiths and David Griffiths, “Head First Android Development”, 1st Edition,
O’Reilly SPD Publishers, 2015.
• J F DiMarzio, “Beginning Android Programming with Android Studio”, 4th Edition, Wiley India
Pvt Ltd, 2016.
• Anubhav Pradhan, Anil V Deshpande, “Composing Mobile Apps” using Android, Wiley 2014.

WEBSITES REFFERED
• https://www.geeksforgeeks.org
• https://www.youtube.com
• https://stackoverflow.com
• https://www.section.io
• https://www.codegrepper.com
• https://www.tutorialspoint.com

Department of CSE Page | 24

You might also like