Program to create a class 'Manager' to calculate the salary. Import the above package 'useFul' and make use of salary( ) method

In this program we use the package useFul to import the class UseMe in another class Manager. Here we have used the salary( ) method of UseMe class to calculate the gross salary of manager.
import useFul.UseMe;

class Manager
 public static void main(String b[])
  UseMe u2 = new UseMe();
C:\>java Manager
Basic salary = 15000.0
DA = 2500.0
HRA = 1500.0
Gross Salary = 19000.0

No comments:

Post a comment