This work was developed by: Tran Thanh Hai - CTTN-KHMT K65 - Hanoi University of Science and Technology.
If this code make you confused, you are supposed to take a look into description of the code here.
-
First, you have to define
CongTyand one of theNhanVienobject, for example:CongTy soICT = new CongTy("SoICT", 1e12); GiamDoc giangVien1 = new GiamDoc("Tran Thanh Hai", 3e7, 2.5, 3e6);
We define object
GiamDocwith initialized variables:tenNhanVien,luongCoBan,heSoLuongandphuCap,respectively. -
Second you have to regist defined staff with fuction:
soICT.themNV(giangVien1);
-
Finally, you can use any methods or attributes of created
CongTyto get needed information.
SoICT is small example for this repo
Type into the Terminal:
javac SoICT.java
to compile. Then type
java SoICT
to see the result.