Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 31

MAD Lab Mini Project EMI and INCOME TAX Calculator

ACKNOWLEDGEMENT

The mini project report on “University Management System” is the outcome of guidance, moral
support and devotion bestowed on us throughout our work. For this we acknowledge and express our
profound sense of gratitude and thanks to everybody who have been a source of inspiration during the
project work.

First and foremost, we offer our sincere phrases of thanks with innate humility to our Principal Dr. B.
S. Anami who has been a constant source of support and encouragement. We would like to thank our
Dean Academic Dr. S. G. Joshi. for his constant support and guidance.

We feel deeply indebted to our H.O.D. Mr. Mahantesh Sajjan for the right help provided from the time
of inception till date. I would take this opportunity to acknowledge our Guide and coordinator Mrs.
Puneeth N T who not only stood by us as a source of inspiration, but also dedicated his time to enable
us to present the project on time.

Radhika M Irkal

Vijayalaxmi M

Veena S Wali

Shweta Dalabanjan.

Department of ISE 1 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

TABLE OF CONTENT

CHAPTER NO. DESCRIPTION PAGE NO


Acknowledgement 1
Abstract 3
1 INTRODUCTION 4
1.1 Introduction to Android Studio 4
1.2 Android SDK 5
1.3 Introduction to XML 7
1.4 Introduction to JAVA 8
2 REQUIREMENT SPECIFICATION 9
2.1 Software Requirements
2.3 Hardware Requirements
3 OBJECTIVES OF THE PROJECT 10
4 IMPLEMENTATION 11
4.1 XML CODE 11
4.2 JAVA CODE 16
5 RESULTS 22
5.1 Result
5.2 Snapshots
6 CONCLUSION 30
7 REFERENCES 31

Department of ISE 2 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

ABSTRACT
This is an integrated application for calculating income tax and EMI. It will assist to assess, how much, we
should pay as our income tax or EMI. It can quickly calculate taxes and EMI rates. It has two modules
namely, (i)Income tax calculation module, (ii) EMI calculation module. The tax calculation module is used
to perform tax related calculations required by a salaried person in government and non-organization the tax
rules and rates are based on government regulations. This module calculates income tax to be paid on their
income. An EMI Calculator is a utility tool, which helps you to calculate the amount you repay each month
towards your loan. You can use the EMI calculator and calculate the EMI amount on a car loan, home loan,
bike loan, or a personal loan. You get an idea of the monthly repayments you make towards these loans. The
application is user friendly, interactive and provides easy to use options for the aforementioned financial
computations.

CHAPTER 1
Department of ISE 3 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

INTRODUCTION

1.1 INTRODUCTION TO ANDROID STUDIO

Android Studio is the official integrated development environment (IDE) for Google's Android
operating system, built on JetBrains' IntelliJ IDEA software and designed specifically for Android
development. It is available for download on Windows, macOS and Linux based operating systems or as
a subscription-based service in 2020. It is a replacement for the Eclipse Android Development Tools (E-
ADT) as the primary IDE for native Android application development

Android Studio was announced on May 16, 2013 at the Google I/O conference. It was in early access
preview stage starting from version 0.1 in May 2013, then entered beta stage starting from version 0.8
which was released in June 2014.The first stable build was released in December 2014, starting from
version 1.0.

On May 7, 2019, Kotlin replaced Java as Google's preferred language for Android app development. Java
is still supported, as is C++.

A specific feature of the Android Studio is an absence of the possibility to switch autosave feature

off. The following features are provided in the current stable version:

 Gradle-based build support


 Android-specific refactoring and quick fixes
 Lint tools to catch performance, usability, version compatibility and other problems
 ProGuard integration and app-signing capabilities
 Template-based wizards to create common Android designs and components
 A rich layout editor that allows users to drag-and-drop UI components, option to preview
layouts on multiple screen configurations
 Support for building Android Wear apps
 Built-in support for Google Cloud Platform, enabling integration with Firebase Cloud
Messaging (Earlier 'Google Cloud Messaging') and Google App Engine

 Android Virtual Device (Emulator) to run and debug apps in the Android studio.

1.2 ANDROID SDK

Department of ISE 4 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

The Android software development kit (SDK) includes a comprehensive set of development tools. These
include a debugger, libraries, a handset emulator based on QEMU, documentation, sample code, and
tutorials. Currently supported development platforms include computers running Linux (any modern
desktop Linux distribution), Mac OS X 10.5.8 or later, and Windows 7 or later. As of March 2015, the
SDK is not available on Android itself, but software development is possible by using specialized Android
applications.

Until around the end of 2014, the officially-supported integrated development environment (IDE) was
Eclipse using the Android Development Tools (ADT) Plugin, though IntelliJ IDEA IDE (all editions) fully
supports Android development out of the box, and NetBeans IDE also supports Android development via a
plugin. As of 2015, Android Studio made by Google and powered by IntelliJ, is the official IDE; however,
developers are free to use others, but Google made it clear that ADT was officially deprecated since the end
of 2015 to focus on Android Studio as the official Android IDE. Additionally, developers may use any text
editor to edit Java and XML files, then use command line tools (Java Development Kit and Apache ANT
are required) to create, build and debug Android applications as well as control attached Android devices
(e.g., triggering a reboot, installing software package(s) remotely).

THE ANDROID STACK

Fig 1.1 ANDROID STACK

Linux kernel
Department of ISE 5 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

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.

Native libraries
On the top of Linux kernel, there are Native libraries such as Web Kit, OpenGL, Free Type,
SQLite, Media, C runtime library (lib c) etc.
The Web Kit library is responsible for browser support, SQLite is for database, Free Type for font
support, Media for playing and recording audio and video formats.

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. It
consumes less memory and provides fast performance.

Native libraries
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. It provides a lot of classes and interfaces for android
application development.

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.

1.3 INTRODUCTION TO XML


Extensible Markup Language (XML) is a markup language that defines a set of rules for

Department of ISE 6 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

encoding documents in a format that is both human-readable and machine-readable. The World Wide
Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them
free open standards—define XML.
The design goals of XML emphasize simplicity, generality, and usability across the Internet.
It is a textual data format with strong support via Unicode for different human languages. Although the
design of XML focuses on documents, the language is widely used for the representation of arbitrary data
structures such as those used in web services.

Several schema systems exist to aid in the definition of XML-based languages, while programmers have
developed many application programming interfaces (APIs) to aid the processing of XML data.

The design goals of XML include, "It shall be easy to write programs which process XML documents."
Despite this, the XML specification contains almost no information about how programmers might go
about doing such processing. The XML Info set specification provides a vocabulary to refer to the
constructs within an XML document, but does not provide any guidance on how to access this
information. A variety of APIs for accessing XML have been developed and used, and some have been
standardized.

Existing APIs for XML processing tend to fall into these categories:

 Stream-oriented APIs accessible from a programming language, for example SAX and Tax.
 Tree-traversal APIs accessible from a programming language, for example DOM.
 XML data binding, which provides an automated translation between an XML document
and programming-language objects.
 Declarative transformation languages such as XSLT and XQuery.
 Syntax extensions to general-purpose programming languages, for example LINQ and Scala.

1.4 INTRODUCTION TO JAVA

Java is a high-level, class-based, object-oriented programming language that is designed to have as few
Department of ISE 7 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

implementation dependencies as possible. It is a general-purpose programming language intended


to let application developers write once, run anywhere (WORA), meaning that compiled Java code can
run on all platforms that support Java without the need for recompilation. Java applications are typically
compiled to bytecode that can run on any Java virtual machine (JVM) regardless of the underlying
computer architecture. The syntax of Java is similar to C and C++, but has fewer low-level facilities than
either of them. The Java runtime provides dynamic capabilities (such as reflection and runtime code
modification) that are typically not available in traditional compiled languages. As of 2019, Java was
one of the most popular programming languages in use according to GitHub, particularly for client-
server web applications , with a reported 9 million developers.
Java was originally developed by James Gosling at Sun Microsystems (which has since been acquired by
Oracle) and released in 1995 as a core component of Sun Microsystems' Java platform. The original
and reference implementation Java compilers, virtual machines, and class libraries were originally
released by Sun under proprietary licenses. As of May 2007, in compliance with the specifications of the
Java Community Process, Sun had relicensed most of its Java technologies under the GPL-2.0-only
license. Oracle offers its own Hotspot Java Virtual Machine, however the official reference
implementation is the OpenJDK JVM which is free open source software and used by most developers
and is the default JVM for almost all Linux distributions.

Department of ISE 8 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Chapter 2
REQUIREMENT SPECIFICATION

2.1 SOFTWARE REQUIREMENTS

Operating System : 64 Bit Operating System, X64-Based

Processor Tools : Android Studio, JAVA JDK

Programming Language : Java

2.2 HARDWARE REQUIREMENTS

Processor : Any Processor of Speed 1.60GHz

RAM : 6.00 GB or More

Hard Disk : 20 GB or More

Input Device : Keyboard

Output Device : Connected Android Mobile / Android Emulator-Pixel 3a API 27

Department of ISE 9 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

CHAPTER 3

OBJECTIVE OF THE PROJECT

Income Tax and EMI Calculator is an android based application, and enables the user to check their income
tax rates and EMI rates. It will assist to assess, how much, we should pay as our income tax or EMI. The
app is user friendly, and the user shall find it extremely easy to calculate the income tax that the user has to
pay based of their income and government rules and also to calculate the EMI rates on their loan. The
application is user friendly, interactive and provides easy to use options for the aforementioned financial
computations.

Department of ISE 10 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

CHAPTER 4
IMPLEMENTATION
4.1 XML CODE
a) activity_emi.xml
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.cmt.taxcalculator.EMIActivity"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent">

<android.support.v4.widget.NestedScrollView
android:layout_height="match_parent"
android:layout_width="match_parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:orientation="vertical"
android:paddingLeft="20dp"
android:paddingTop="10dp"
android:paddingRight="20dp">

<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_principal"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<EditText
android:id="@+id/principal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="0123456789."
android:hint="@string/hint_principal"
android:inputType="number"
android:singleLine="true"
tools:ignore="Autofill" />

</android.support.design.widget.TextInputLayout>

<android.support.design.widget.TextInputLayout
android:id="@+id/input_layout_interest"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<EditText
android:id="@+id/interest"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="0123456789."
android:hint="@string/hint_interest"
android:inputType="number"

Department of ISE 11 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

android:singleLine="true"
tools:ignore="Autofill" />

</android.support.design.widget.TextInputLayout>

<android.support.design.widget.TextInputLayout

android:id="@+id/input_layout_tenure"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<EditText
android:id="@+id/years"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:digits="0123456789."
android:hint="@string/hint_years"
android:inputType="number"
tools:ignore="Autofill" />

</android.support.design.widget.TextInputLayout>

<Button
android:id="@+id/btn_calculate2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:background="@color/colorPrimary"
android:text="Calculate"
android:textColor="@android:color/white"
tools:ignore="HardcodedText" />

<android.support.design.widget.TextInputLayout

android:id="@+id/input_layout_emi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp">

<EditText
android:id="@+id/emi"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_emi"
android:inputType="number"
android:maxEms="0"
tools:ignore="Autofill" />

</android.support.design.widget.TextInputLayout>

<android.support.design.widget.TextInputLayout

android:id="@+id/input_layout_total_Interest"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">

<EditText
android:id="@+id/interest_total"
Department of ISE 12 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_interest_total"
android:inputType="number"
tools:ignore="Autofill" />

</android.support.design.widget.TextInputLayout>

</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>

b) activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.cmt.taxcalculator.MainActivity">

<Button
android:id="@+id/button1"
android:layout_width="280dp"
android:layout_height="53dp"
android:background="@android:color/holo_orange_light"
android:text="Income Tax Calculator"
app:layout_constraintBottom_toTopOf="@+id/button2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.42"
tools:ignore="HardcodedText" />

<Button
android:id="@+id/button2"
android:layout_width="284dp"
android:layout_height="51dp"
android:layout_marginBottom="16dp"
android:background="@android:color/holo_orange_light"
android:text="EMI Calculator"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.504"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button1"
tools:ignore="HardcodedText" />
</android.support.constraint.ConstraintLayout>

c)activity_income.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
Department of ISE 13 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.cmt.taxcalculator.IncomeActivity">

<EditText
android:id="@+id/edit1"
android:layout_width="143dp"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:layout_marginEnd="16dp"
android:ems="10"
android:inputType="number|numberDecimal"
android:labelFor="@id/edit1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.143"
tools:ignore="Autofill" />

<TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="Enter your Income:"
android:textAlignment="center"
android:textColor="@android:color/background_dark"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/edit1"
app:layout_constraintHorizontal_bias="0.652"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.177" />

<Button
android:id="@+id/button3"
android:layout_width="173dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="Amount"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.502"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.834" />

<TextView
android:id="@+id/text2"
android:layout_width="346dp"
android:layout_height="163dp"
android:layout_marginStart="8dp"
android:layout_marginTop="180dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:fontFamily="monospace"
Department of ISE 14 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

android:textAlignment="viewStart"
android:textColor="@android:color/black"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/button3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.687" />
</android.support.constraint.ConstraintLayout>

d)activity_splash_screen.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg3"
tools:context="com.cmt.taxcalculator.SplashScreen">

<TextView
android:id="@+id/textview1"
android:layout_width="331dp"
android:layout_height="56dp"
android:layout_marginStart="68dp"
android:layout_marginTop="397dp"
android:layout_marginEnd="55dp"
android:layout_marginBottom="127dp"
android:fontFamily="serif-monospace"
android:text="Tax Calculator"
android:textAlignment="center"
android:textColor="@android:color/background_light"
android:textSize="36sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.585"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
</android.support.constraint.ConstraintLayout>

Department of ISE 15 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

4.2 JAVA CODE

a) mainActivity.java
package com.cmt.taxcalculator;

import android.app.Application;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

Button b1;
Button b2;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

b1 = findViewById(R.id.button1);
b2 = findViewById(R.id.button2);

b1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent= new Intent(MainActivity.this,
com.cmt.taxcalculator.IncomeActivity.class);
startActivity(intent);
}
});

b2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent=new Intent(MainActivity.this,
com.cmt.taxcalculator.EMIActivity.class);
startActivity(intent);
}
});
}
}

b) EMIActivity.java
package com.cmt.taxcalculator;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
Department of ISE 16 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

public class EMIActivity extends AppCompatActivity {

Button emiCalcBtn;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_emi);

final EditText P = findViewById(R.id.principal);


final EditText I = findViewById(R.id.interest);
final EditText Y = findViewById(R.id.years);
final EditText TI = findViewById(R.id.interest_total);
final EditText result = findViewById(R.id.emi) ;

emiCalcBtn = findViewById(R.id.btn_calculate2);

emiCalcBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

String st1 = P.getText().toString();


String st2 = I.getText().toString();
String st3 = Y.getText().toString();

if (TextUtils.isEmpty(st1)) {
P.setError("Enter Principal Amount");
P.requestFocus();
return;
}

if (TextUtils.isEmpty(st2)) {
I.setError("Enter Interest Rate");
I.requestFocus();
return;
}

if (TextUtils.isEmpty(st3)) {
Y.setError("Enter Years");
Y.requestFocus();
return;
}

float p = Float.parseFloat(st1);
float i = Float.parseFloat(st2);
float y = Float.parseFloat(st3);

float Principal = calPric(p);

float Rate = calInt(i);

float Months = calMonth(y);

float Dvdnt = calDvdnt( Rate, Months);

float FD = calFinalDvdnt (Principal, Rate, Dvdnt);

float D = calDivider(Dvdnt);
Department of ISE 17 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

float emi = calEmi(FD, D);

float TA = calTa (emi, Months);

float ti = calTotalInt(TA, Principal);

result.setText(String.valueOf(emi));

TI.setText(String.valueOf(ti));

}
});
}

public float calPric(float p) {

return (p);

public float calInt(float i) {

return (i/12/100);

public float calMonth(float y) {

return (y * 12);

public float calDvdnt(float Rate, float Months) {

return (float) (Math.pow(1+Rate, Months));

public float calFinalDvdnt(float Principal, float Rate, float Dvdnt) {

return (Principal * Rate * Dvdnt);

public float calDivider(float Dvdnt) {

return (Dvdnt-1);

public float calEmi(float FD, Float D) {

return (FD/D);

public float calTa(float emi, Float Months) {

return (emi*Months);

Department of ISE 18 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

public float calTotalInt(float TA, float Principal) {

return (TA - Principal);

}
}

c)GSTActivity.java
package com.cmt.taxcalculator;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class GSTActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_emi);

}
}

d)IncomeActivity.java
package com.cmt.taxcalculator;

import android.annotation.SuppressLint;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

public class IncomeActivity extends AppCompatActivity {

EditText et;
TextView tx;
TextView tx1;
Button b1;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_income);

et=findViewById(R.id.edit1);
tx=findViewById(R.id.text1);
tx1=findViewById(R.id.text2);
b1=findViewById(R.id.button3);

b1.setOnClickListener(new View.OnClickListener() {
Department of ISE 19 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

@Override
public void onClick(View view) {

try {
Integer.parseInt(String.valueOf(et.getText()));
calculate();
}
catch (Exception e) {
Toast.makeText(getApplicationContext(), "You have exceeded the
Input Limit!", Toast.LENGTH_LONG).show();
tx1.setText("");
}
}
});
}

@SuppressLint("SetTextI18n")
public void calculate()
{
long Total = 0;
long Tax=0;
long in= Integer.parseInt(et.getText().toString());
if (in >= 200000 && in < 1000000)
{
Tax= (in * 5)/100;
Total = in + Tax;
}
else if(in >= 1000000 && in < 2000000)
{
Tax = (in * 10)/100;
Total = in + Tax;
}
else if(in >= 2000000 && in < 3000000)
{
Tax= (in * 15)/100;
Total = in + Tax;
}
else if (in >= 3000000 && in < 4000000)
{
Tax = (in * 20)/100;
Total = in + Tax;
}
else if(in >= 4000000 && in < 5000000)
{
Tax = (in * 25)/100;
Total = in + Tax;
}
else if (in >= 5000000 && in < 7000000)
{
Tax = (in * 30)/100;
Total = in + Tax;
}
else if (in >= 7000000 && in < 10000000)
{
Tax = (in * 35)/100;
Total = in + Tax;
}
else if (in >= 10000000)
{
Tax = (in * 40)/100;
Department of ISE 20 KLEIT, Hubli
MAD Lab Mini Project EMI and INCOME TAX Calculator

Total = in + Tax;
}
tx1.setText("Tax on your income "+et.getText()+"= \t"+Tax+"\n \n"+
"Total Income (Inclusion of Tax) "+"= \t"+Total);
}
}

e) SplashScreen.java
package com.cmt.taxcalculator;

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class SplashScreen extends AppCompatActivity {

private static int SPLASH_TIMEOUT=2000;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);

new Handler().postDelayed(new Runnable() {


@Override
public void run() {
Intent intent= new Intent(SplashScreen.this, MainActivity.class);
startActivity(intent);
finish();
}
},SPLASH_TIMEOUT);
}
}

Department of ISE 21 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

CHAPTER 5
RESULTS AND SNAPSHOTS
5.1 Result
5.2 Snapshots
5.2.1 Opening of Android

Fig. 5.2.1 Opening of Android

Department of ISE 22 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

5.2.2 EMI and TAX Calculator

Fig. 5.2.2 EMI and TAX Calculator

5.2.3 Details to Calculate TAX

Department of ISE 23 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Fig. 5.2.3 Details to Calculate TAX

5.2.4 Calculation of TAX

Department of ISE 24 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Fig. 5.2.4 Calculation of TAX

5.2.5 Result of TAX

Department of ISE 25 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Fig. 5.2.5 Result of TAX

5.2.6 Details to Calculate EMI

Department of ISE 26 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Fig. 5.2.6 Details to Calculate EMI

5.2.7 Calculation of EMI

Department of ISE 27 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Fig. 5.2.7 Calculation of EMI

5.2.8 Result of EMI

Department of ISE 28 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Fig. 5.2.8 Result of EMI

CHAPTER 6
CONCLUSION
6.1 Conclusion
This application makes it very easy for the user to calculate the income tax, with these simple steps, you can
perform the income tax calculation. As we all know It’s important to pay your taxes and file your IT returns
on time.

Department of ISE 29 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Even before you apply for a loan, you must know if you are eligible for the loan. This can be done with the
help of an EMI calculator. Calculating your EMIs will help you prepare to make the EMI payments on time.
The other benefits of the EMI calculator include:
Accessibility: You can use the EMI calculator anytime, anywhere, and make your budget calculations.
Financial Planning: EMI calculations must be done even before you start applying for your loan. An EMI
calculator can help you with this.

CHAPTER 7
REFERENCES

Department of ISE 30 KLEIT, Hubli


MAD Lab Mini Project EMI and INCOME TAX Calculator

Department of ISE 31 KLEIT, Hubli

You might also like