EELU OOP Week2 Classes
EELU OOP Week2 Classes
javac -d . MyPackageClass.java
java mypack.MyPackageClass
Create a class named “Employee”, that
has the attributes: name, address,
department, id , phone number, and basic
salary.
Create the following methods:
netSal : to calculate net salary which is 80% of
the basic salary.
dispEmp: to display all information of the
employee on console.
Create
the class “TestClass “ to test the
Employee class.
A constructor in Java is a special method that is used
to initialize objects.