COSC 210 Cosc 210-object oriented and GUI Programming Assignment 3 Problem State
ID: 3803185 • Letter: C
Question
COSC 210 Cosc 210-object oriented and GUI Programming Assignment 3 Problem Statement oxMart wants a new payroll application to generate pay checks and pay stubs for its employees. Each employee clocks in at that start of a work period and clock outs at the end of the period, this information is recorded in a time entry Box Mart Pay Report Employee No: 48399 Employee Name: Bill Jones Pay Period: 01/14/2012 to 01/20/2012 Normal Hours Worked 40 Overtime Hours Worked: 8 hrs Hourly Wage 12.25/hr Normal Pay: 490.00 Overtime Pay: 147.00 Gross Pay: 637.00 Federal Tax 13.70 State Tax 19.11 Net Pay: 604.19 Time Log In Out Hours OT Hrs Date 01/14/2012 8:00 17:00 01/15/2012 8:00 20:00 01/16/2012 12:00 19:00 01/17/2012 12:00 19:00 01/18/2012 8:00 17:00 01/19/2012 11:00 18:00 01/20/2012 9:00 12:00 01/27/2012 Pay Check 604.19 Pay to: Bill JonesExplanation / Answer
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Payroll Report</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFCC">
<%! int year;%>
<center>
<table border="1">
<th>EmpCode</th>
<th>Name</th>
<th>Address</th>
<th>DeptCode</th>
<th>DesnCode</th>
<th>Grade</th>
<th>Basic</th>
<th>year</th>
<th>month</th>
<th>OE-1</th>
<th>OE-2</th>
<th>IT</th>
<th>OD-1</th>
<th>OD-2</th>
<th>OD-3</th>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:payroll","payroll","payroll");
Statement st=con.createStatement();
Statement st1=con.createStatement();
ResultSet rs=st.executeQuery("select * from employee,deductions where employee.empid=deductions.empid");
while(rs.next())
{%>
<tr>
<td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(5)%></td>
<td><%=rs.getString(6)%></td>
<td><%=rs.getString(7)%></td>
<td><%=rs.getString(8)%></td>
<td><%=rs.getInt(9)%></td>
<td><%=rs.getInt(15)%></td>
<td><%=rs.getInt(16)%></td>
<td><%=rs.getInt(21)%></td>
<td><%=rs.getInt(22)%></td>
<td><%=rs.getInt(23)%></td>
<td><%=rs.getInt(24)%></td>
<td><%=rs.getInt(25)%></td>
<td><%=rs.getInt(26)%></td>
</tr><%}%>
</table>
<br><br><input type="submit" value="BACK"
>
</center>
</body>
</html>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Grade Report</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFCC">
<center>
<table border="1">
<th>Grade Code</th>
<th>Grade Desc</th>
<th>Starting Basic</th>
<th>Ending Basic</th>
<th>HRA</th>
<th>Con Per</th>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:payroll","payroll","payroll");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from grade order by gcode");
while(rs.next())
{%>
<tr>
<td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getDouble(3)%></td>
<td><%=rs.getDouble(4)%></td>
<td><%=rs.getDouble(5)%></td>
<td><%=rs.getDouble(6)%></td>
</tr>
<% }%>
</table>
<br><br><input type="submit" value="BACK">
</center>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Reports</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFCC">
<center>
<br>
<h1>Payroll Management System</h1>
<hr><br>
<pre>
<font face="Arial, Helvetica, sans-serif">
<a href="./empreport.jsp"><b>EMPLOYEE REPORT</b></a>
<br>
<a href="./gradereport.jsp">GRADE WISE REPORT</a>
<br>
<a href="./deptreport.jsp">DEPARTMENT WISE REPORT</a>
<br>
<a href="./desnreport.jsp">DESIGNATION WISE REPORT</a>
<br>
<a href="./payrollreport.jsp">PAYROLL REPORT</a>
<br>
<br>
<input type="submit" value="BACK">
</font>
</pre>
</center>
</body>
</html>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Employee Report</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script language="JavaScript">
function back()
{
document.emp.action="./home.jsp";
document.emp.submit();
}
</script>
<body bgcolor="#FFFFCC">
<center>
<form name="emp">
<table border="1">
<th>EmpCode</th>
<th>EmpName</th>
<th>Address</th>
<th>DesnCode</th>
<th>Grade</th>
<th>DeptCode</th>
<th>Basic</th>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:payroll","payroll","payroll");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from employee");
while(rs.next())
{%>
<tr>
<td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
<td><%=rs.getString(5)%></td>
<td><%=rs.getString(6)%></td>
<td><%=rs.getString(7)%></td>
<td><%=rs.getString(8)%></td>
<td><%=rs.getInt(9)%></td>
</tr>
<% }%>
</table>
<br>
<input type="submit" value="BACK">
</form>
</center>
</body>
</html>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<html>
<head>
<title>Deductions Master</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
function check()
{
document.deduct.action="./deduction.jsp";
document.deduct.submit();
}
function checkmonth()
{
var mon=document.deduct.month.value;
if(mon>12)
{
alert("Month Should be <=12");
document.deduct.month.focus();
document.deduct.month.value="";
}
}
function delded()
{
document.deduct.action="./del_deduct.jsp";
document.deduct.submit();
}
</script>
</head>
<body bgcolor="#FFFFCC">
<%!String empname,deptcode,desncode;%>
<form action="" name="deduct" mothod="post">
<center>
<h1>ActiveNet Informatics Pvt Ltd</h1>
<hr>
<br>
<h2>Deductions Master</h2>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:payroll","payroll","payroll");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from employee");
%>
<table>
<tr>
<td>Year</td><td><input type="text" name="year"></td>
<td></td>
<td>Month</td><td><input type="text" name="month"></td>
</tr>
<tr>
<td>Employee Code</td><td><select name="empid">
<option>--</option>
<%while(rs.next())
{%>
<option><%=rs.getString(1)%></option>
<%}%>
</select></td>
<td></td>
<td>Employee Name</td><td><input type="text" name="empname"></td>
</tr>
<tr>
<td>Department Code</td><td><input type="text" name="deptcode"></td>
<td></td>
<td>Designation Code</td><td><input type="text" name="desncode"></td>
</tr>
<tr>
<td>Other Earnings-I</td><td><input type="text" name="oe1"></td>
<td></td>
<td>Other Earnings-II</td><td><input type="text" name="oe2"></td>
</tr>
<tr>
<td>Income Tax</td><td><input type="text" name="it"></td>
<td></td>
<td>Other Deductions-I</td><td><input type="text" name="od1"></td>
</tr>
<tr>
<td>Other Deductions-II</td><td><input type="text" name="od2"></td>
<td></td>
<td>Other Deductions-III</td><td><input type="text" name="od3"></td>
</tr>
</table>
<br>
<table>
<tr></tr>
<tr>
<td>
<input type="submit" value="SAVE">
<input type="reset" value="ADDNEW">
<input type="submit" value="DELETE">
<input type="submit" value="BACK">
</td>
</tr>
</table>
</center>
</form>
</body>
</html>
create table deductions(
year number(5),
month number(2),
empid varchar2(10),
empname varchar2(20),
deptcode varchar2(20),
desncode varchar2(20),
oe1 number(5),
oe2 number(5),
it number(5),
od1 number(5),
od2 number(5),
od3 number(5),
foreign key (empid) references employee(empid))
/
create table employee (empid varchar2(10) primary key,
empname varchar2(20),
jdate date,
dob date,
address varchar2(20),
desncode varchar2(20),
gradecode varchar2(20),
deptcode varchar2(20),
salary number(8,2),
pfindicator varchar2(3),
pfnumber number(8),
casualleaves number(5),
earnedleaves number(5),
sickleaves number(5))
/
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.