You can find all the exception's list in below url:
http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html
Assignment 1: In an organization , an employee's basic details are name, employee id , designation and salary. Increment will be calculated for all the employees using below rules:
1. If the employee is a senior manager 5% of his salary will be given as increment and 2% of his salary will be given as bonus
2. If the employee is a project manager 6% of his salary will be given as increment and 2% of his salary will be given as bonus
3. If the employee is a manager 7% of his salary will be given as increment and 2% of his salary will be given as bonus
4. If the employee is a junior assistant 9% of his salary will be given as increment and 4% of his salary will be given as bonus
Include all the code with try catch block.
Assignment 2:
Find out the exception occurs in below scenarios:
1. Create class and create a string variable with value "AB" and type cast it to Double.
2. Create an array with value {2,4,3,6} and display each value. Use try catch block.
3. Declare a string variable in the class (instance variable, outside all the methods) without any value and display the length of the variable in main method.
http://docs.oracle.com/javase/7/docs/api/java/lang/Exception.html
Assignment 1: In an organization , an employee's basic details are name, employee id , designation and salary. Increment will be calculated for all the employees using below rules:
1. If the employee is a senior manager 5% of his salary will be given as increment and 2% of his salary will be given as bonus
2. If the employee is a project manager 6% of his salary will be given as increment and 2% of his salary will be given as bonus
3. If the employee is a manager 7% of his salary will be given as increment and 2% of his salary will be given as bonus
4. If the employee is a junior assistant 9% of his salary will be given as increment and 4% of his salary will be given as bonus
Include all the code with try catch block.
Assignment 2:
Find out the exception occurs in below scenarios:
1. Create class and create a string variable with value "AB" and type cast it to Double.
2. Create an array with value {2,4,3,6} and display each value. Use try catch block.
3. Declare a string variable in the class (instance variable, outside all the methods) without any value and display the length of the variable in main method.
No comments:
Post a Comment