Student Online Documentation

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

STUDENT ONLINE DOCUMENTATION

Submitted in fulfilment of the requirements


Of micro-project
Java Programming
By
“VAIBHAV MANDHARE”

Roll No. : 33

Enrollment No. : 20096121

SUBJECT INCHARGE Mrs.


Priyanka Rane

Department of Computer Engineering


Academic Year: 2020-2021
CERTIFICATE

This is certify that the micro project


“Salary Slip Generation”
Is done by
“VAIBHAV MANDHARE”
“JAVA PROGRAMMING”
Is submitted
for

The diploma in computer engineering to the

Sub Incharge Head of Department Principal


(Mrs. Priyanka Rane) (Mrs. Priyanka Rane) (Prof.D.R.Suroshe)
SALARY SLIP GENERATION
Submitted in fulfilment of the requirements
Of micro project of
Java programming
By

ROLL NO. NAME ENTROLLMENT NO.

31 Snehal Gaikwad 1909640016

17 Vaishnavi Patil 1909640017

18 Rishi Kajrolkar 1909640018

Department of Computer Engineering


Academic year: 2020-2021
Report

Introduction:
In this project, we generate a salary slip using java programming.

Rationale:

• This micro-project is on ‘Generation of Salary Slip’.


• A salary slip is a document issued by an employer to an employee.
It contains a detailed description of the employee’s salary
components.
• Employers are legally bound to issue Salary Slip to their employees
periodically, as a proof of salary payments to employees and the
deduction mode.
• Often it is a struggle for a corporation / company to keep a track of
how much money is entering and leaving their business.
• So this pay slips / salary slip can help to keep a significant track of
cash.
• And for the security purpose, an employee is provided by the user
id and password.
• The salary of an employee is divided into different part.
• The basic salary of an employee is fixed. And also an employee is
provided with some allowances.
• These allowances are Dearness Allowance, Conveyance Allowance
or the Travel Allowance, Medical Allowance and many more are
there depending on the corporations willing to provide.
• Deductions are also the part of salary slip. The net salary of an
employee is calculated by carrying out some deductions.
• These deductions includes PF (Provident Fund) which the
compulsory contribution by an employee towards a PF account
helps in his name with certain exceptions and other is the Tax
Deduction which is deducted by an employer on behalf of the
income tax department from employee’s salary based on the tax
slab of the employee after considering other factors.
• The salary slip / pay slip will only be generated by providing the
valid details.

Aim:
• A Java Program to generate salary slip of an employee by providing
the proper data and process that data.
• To display the generated salary slip.
• To provide complete details of an employee payrollment.
• To keep the significant track of the cash flow.
• To determine whether there is any tax due for an employee at the
end of tax year.

Course outcome:
• Develop programs using Object Oriented methodology in Java.
• Apply concept of inheritance for code reusability.
• Develop programs using multithreading.
• Implement Exception Handling.

Literature:
Book: Programming with Java Author:
Balagurusamy E.
Programming with Java is an easy to understand, concise book that
takes you through the entire process of Java programming used by
programmers. Written by Balaguruswamy, this book is the fourth
edition published by Tata McGraw-Hill Publishing Company. The
book examines the evolving use of Java and provides its latest form.
It also challenges the most critical aspects of software development
and management. The development of software engineering is
clearly chronicled to give the reader a simple and necessary
understanding of Java usage for programming. This book supports
any interested programmer to understand the fundamentals of
programming with Java, learn about its development through the
years and explore its current day usage.

Actual methodology Followed :


Topic Work Done Work Done By

1 Gathering of Information Rishi Kajrolkar

2 Execution of Program Snehal Gaikwad

3 Report Making Vaishnavi Patil

Skill developed:
• Creating classes and methods with relevant access specifies.
Providing security to data.
• Using term in such manner that it is easily accessed by the user (i.e.
making user friendly program).
• Providing the complete information about salary components.
• To display the salary slip by providing particular designation.
• To provide complete information to user on output screen.
• Use of menu driven program to show the source and destination.

• To provide one or more than one entry of passengers travelling.


Source code:
/* salary slip */ // import
java.util.Scanner; import
java.lang.*; import
java.util.*;
//import java.lang.Exception;
class UserId extends Exception
{
String str1="[email protected]"; //User ID
String str2="COMPUTER123"; //Password
String m,m2,m3;
String n,n2,n3; int
count=0,flag=0,end=0; Scanner in =
new Scanner(System.in); void input()
{ try
{
System.out.println("\nEnter User ID "); m
= in.next();
System.out.println("\nEnter User Password "); n
= in.next();
if ( str1.compareTo(m)!=0|| str2.compareTo(n)!=0)
{
System.out.println ("\n\n ERROR !!!!...........! "); throw
new Exception();
}
else
{
System.out.println("\n Login in .......... ");
}
}
catch(Exception e)
{
//System.out.println(e); do
{
if(str1.equals(m2)|| str2.equals(n2))
{
System.out.println("\n Login in .......... "); break;
}
else
{
//System.out.println(e);
System.out.println(" \n\nLogin in Fails..........Wrong Credentials ");
System.out.println("\nEnter User ID "); m2= in.next();

System.out.println("\nEnter User Password ");


n2 = in.next(); flag++;
}
count++; end++;
}
while(end!=3); if(flag==3&&end==3)
{
System.out.println("\n Try after 24 hours : !!!!!");
}
System.out.println("\n\n"+end);
System.out.println(flag);
System.out.println(count);
}
}
}
public class slip extends UserId
{
String ename; int emp;
int tday, tmonth, tyear;
int days, pay;

int bs,pf,da; int


hra,spt,medy; int
trav,tele,net; int
proft,fim; int
flag,totale,totald;
Scanner in =new Scanner(System.in); public
void input1() //FUNCTION 1
{//NAME emp=45;
System.out.println("\nEnter Employee ID : "); emp=in.nextInt();
System.out.println("\nEnter Employee Name : ");
ename=in.next();
//DATE
//time_tcurrent_time = time(NULL);
//structtm *tm= localtime(&current_time);
//ATTENDANCE try
{
System.out.println("\nEnter number of day employee is present : ");
days=in.nextInt(); if(days>0 && days<31)
{
System.out.println("\nYour Day Worked : "+days);
}
else
{
System.out.println("\n\t\t You Have Entered Wrong Number !!!!! ");
throw new Exception();
}
}
catch(Exception e)
{
System.out.println("\n You have entered wrong number "+ "of day
employee is present : \n "+e);
System.out.println("\nEnter again number of day employee is
present : "); days=in.nextInt(); if(days>0 && days<31)
{
System.out.println("\nYour Day Worked : "+days);
}
}
}
void cal()
{
//PAY pay=31000;
System.out.println("\npay_rate = "+pay);
If(pay>0&&pay<32000)
bs=pay*days; //earn
System.out.println("\nbasic = "+bs); pf=(bs/12);
//deduct
System.out.println("\npf = "+pf);
da=(bs/10); //earn hra=(bs/15);
System.out.println("\n da = "+da+"hra ="+hra); //earn
//OTHER INFO IN SALARY
spt=500; medy=(bs/25);
tele=400; trav=2500;
System.out.println("\n\nsport "+spt+" medical "+medy+" telephone =
"+tele+" travel = "+trav);
//earn proft=200;
//PROFESSION TAX
System.out.println("\n proft = "+proft);
//NET
totale=bs+spt+medy+hra+trav+tele;
System.out.println("\n totale = "+totale);
totald=(pf+proft); net=totale-totald;
System.out.println("\n Mothly Salary :"+net);
//class slaa: public slip
}
void run()
{
System.out.println("\n\n\n\n\n\n\t \t\t--: CAPEGEMINI :--"); flag=0;
//IF FOR BASIC if(net>0&&net<10000)
{
flag=1;
}
if(net>10000&&net<50000)
{
flag=2;
}
if(net>50000&&net<100000)
{
flag=3;
}
if(net>100000&&net<300000)
{
flag=4;
}
if(net>300000&&net<1000000)
{
flag=5;
}
if(net>1000000&&net<5000000)
{
flag=6;
}
if(net>5000000&&net<10000000)
{
flag=7;
}
if(net>10000000)
{
flag=8;
}
if (flag==1)
{
System.out.println("\n\t Desgnation : Helper ");
}
if (flag==2)
{
System.out.println("\n\t Desgnation : Clerk");
}
if (flag==3)
{
System.out.println("\n\t Desgnation : Salesmen");
}
if (flag==4)
{
System.out.println("\n\t Desgnation : Salesmen");
}
if (flag==5)
{
System.out.println("\n\t Desgnation : Developer ");
}
if (flag==6)
{
System.out.println("\n\t Desgnation : Manager");
}
if (flag==7)
{
System.out.println("\n\t Desgnation :CEO");
}
}
public void display()
{
System.out.println("\n\t Attendence : "+days);
System.out.println("|\n\n\t\t Name : "+ename+"\t\t\t EmpID :
"+emp+" |");
System.out.println("\n______________________________________
________________________________________");
System.out.println("\n| |");
System.out.println("\n| EARNING DEDUCTION |");
System.out.println("\n|------------------------------------------------------------
----------------- |");
System.out.println("\n| Basic Pay = "+bs+"\t Providant Fund =
"+pf+" |");
System.out.println("\n|------------------------------------------------------------
----------------- |");
System.out.println("\n| |");
System.out.println("\n| Sports : "+spt+" Travel Allo : "+trav+"
|");
System.out.println("\n| TelePhone :"+tele+" Housing Loan
:"+hra+" |");
System.out.println("\n| Dearness Allo :"+da+" Medical Allo :
"+medy+" |");
System.out.println("\n|------------------------------------------------------------
-------------------- |");
System.out.println("\n| Total Earn = "+totale +"\t Total Deduction =
"+totald+"|");
System.out.println("\n| \t Mothly Salary : "+net+" |");
System.out.println("\n|_____________________________________
______________________________________|");
}
public static void main(String args[]) throws Exception
{
Slip obj = new slip(); obj.input();
if( obj.str1.compareTo(obj.m)!=0|| obj.str2.compareTo(obj.n)!=0)
{
System.out.println(" \n\n ERROR !!!!...........! "); throw
new Exception();
}
else
{
System.out.println("\n Login in .......... ");
obj.input1(); obj.cal(); obj.run();
obj.display();
}
}
}
Output:
Application:
• This Micro-Project can be used in different sectors to generate ideal
salary slip of an employee.

• This Micro-Project can be used to show present earnings.

Conclusion:
From this project, we are able to generate salary slip using java.

You might also like