Skunks,
Ass 2.
Unit code: Cs012
Time: Due April 3rd 2012, 9:30A.m
-
Write
a complete java program that makes use of class called employee that
will be used to capture employee id, name, salary and allowance and
compute gross salary. Overload the plus operator such that if employee1
and employee2 were objects of the type employee, the employee1 and
employee2 will be legal and would add the basic salary allowances and
gross salary of the 2 employees. Also overloaded the equality operator
such that it can be used in the main method to check if 2 employees
have the same numeration based on the gross salary
- Write
a function called ‘divide’ that accepts two integers and computes and
returns the first integer divided by the second e.g 5/2 gives 2.5. the
program should generate an error if the second integer is zero.
Skunks, I got a college guy who can't understand that I do networks and sys administration not programming. Programmers . Especially Q 1.