|
From: <whe...@us...> - 2003-07-24 17:37:43
|
Update of /cvsroot/ordweb/uop/pos407/wayneh/week4
In directory sc8-pr-cvs1:/tmp/cvs-serv20794
Modified Files:
ThrowException.java
Added Files:
ThrowEmployee.java Employee.java .classpath .project
Log Message:
init - ThrowEmployee program.
--- NEW FILE: ThrowEmployee.java ---
/*
* Created on Jul 24, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
/**
* @author Wayne Hernandez
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class ThrowEmployee {
public static void main(String[] args) {
try
{
Employee firstEmp = new Employee(1234,6.00);
Employee secondEmp = new Employee(2468,10.00);
Employee thirdEmp = new Employee(3690,50.00);
}
catch
{
System.out.println("Employee error: "+ error.getMessage());
}
}
}
--- NEW FILE: Employee.java ---
/*
* Created on Jul 24, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
/**
* @author Wayne Hernandez
*
*/
public class Employee
{
int idNum;
float hourlyWage;
public Employee(int inNum, float inWage) throws EmployeeException
{
idNum = inNum;
hourlyWage = inWage;
if (inWage < 6) throw (new EmployeeException(hourlyWage));
}
}
--- NEW FILE: .classpath ---
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path=""/>
</classpath>
--- NEW FILE: .project ---
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>pos407w4</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Index: ThrowException.java
===================================================================
RCS file: /cvsroot/ordweb/uop/pos407/wayneh/week4/ThrowException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ThrowException.java 24 Jul 2003 17:23:19 -0000 1.1
--- ThrowException.java 24 Jul 2003 17:37:40 -0000 1.2
***************
*** 14,25 ****
}
}
- class Employee
- {
- int idNum;
- float hourlyWage;
- Employee(int inNum, float inWage)
- {
- idNum = inNum;
- hourlyWage = inWage;
- }
- }
--- 14,15 ----
|