From 2cefed4164f0337d776dc37a662a62ea886b6307 Mon Sep 17 00:00:00 2001 From: idiotman-2212 Date: Tue, 24 Oct 2023 18:18:34 +0700 Subject: [PATCH 1/5] Update --- .idea/.gitignore | 8 -- .idea/misc.xml | 6 - .idea/modules.xml | 20 --- .idea/vcs.xml | 6 - Bai1/Bai1/.classpath | 6 + Bai1/Bai1/.project | 28 ++++ .../Bai1/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai1/Bai1/bin/Class/PhanSo.class | Bin 0 -> 2488 bytes Bai1/Bai1/bin/Test/TestClass.class | Bin 0 -> 1187 bytes Bai1/Bai1/src/Class/PhanSo.java | 114 ++++++++++++++++ Bai1/Bai1/src/Test/TestClass.java | 35 +++++ Bai10/Bai10/.classpath | 10 ++ Bai10/Bai10/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai10/Bai10/bin/BuildClass/BienLai.class | Bin 0 -> 1621 bytes Bai10/Bai10/bin/BuildClass/KhachHang.class | Bin 0 -> 1460 bytes Bai10/Bai10/bin/BuildClass/QuanLy.class | Bin 0 -> 1832 bytes Bai10/Bai10/bin/UseClass/Using.class | Bin 0 -> 916 bytes Bai10/Bai10/src/BuildClass/BienLai.java | 50 +++++++ Bai10/Bai10/src/BuildClass/KhachHang.java | 41 ++++++ Bai10/Bai10/src/BuildClass/QuanLy.java | 45 +++++++ Bai10/Bai10/src/UseClass/Using.java | 21 +++ Bai11/Bai11/.classpath | 10 ++ Bai11/Bai11/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai11/Bai11/bin/BuildClass/VanBan.class | Bin 0 -> 1515 bytes Bai11/Bai11/bin/UseClass/TestClass.class | Bin 0 -> 1442 bytes Bai11/Bai11/src/BuildClass/VanBan.java | 74 ++++++++++ Bai11/Bai11/src/UseClass/TestClass.java | 26 ++++ Bai12/Bai12/.classpath | 10 ++ Bai12/Bai12/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai12/Bai12/bin/BuildClass/MaTran.class | Bin 0 -> 2148 bytes Bai12/Bai12/bin/UseClass/TestClass.class | Bin 0 -> 1484 bytes Bai12/Bai12/src/BuildClass/MaTran.java | 77 +++++++++++ Bai12/Bai12/src/UseClass/TestClass.java | 45 +++++++ Bai13/Bai13/.classpath | 10 ++ Bai13/Bai13/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai13/Bai13/bin/BuildClass/OTo.class | Bin 0 -> 1313 bytes Bai13/Bai13/bin/BuildClass/PTGT.class | Bin 0 -> 1734 bytes Bai13/Bai13/bin/BuildClass/QLPTGT.class | Bin 0 -> 2468 bytes Bai13/Bai13/bin/BuildClass/XeMay.class | Bin 0 -> 1090 bytes Bai13/Bai13/bin/BuildClass/XeTai.class | Bin 0 -> 1093 bytes Bai13/Bai13/bin/UseClass/TestClass.class | Bin 0 -> 1028 bytes Bai13/Bai13/src/BuildClass/OTo.java | 34 +++++ Bai13/Bai13/src/BuildClass/PTGT.java | 50 +++++++ Bai13/Bai13/src/BuildClass/QLPTGT.java | 70 ++++++++++ Bai13/Bai13/src/BuildClass/XeMay.java | 32 +++++ Bai13/Bai13/src/BuildClass/XeTai.java | 32 +++++ Bai13/Bai13/src/UseClass/TestClass.java | 24 ++++ Bai14/Bai14/.classpath | 10 ++ Bai14/Bai14/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai14/Bai14/bin/BuildClass/DaGiac.class | Bin 0 -> 1601 bytes Bai14/Bai14/bin/BuildClass/TamGiac.class | Bin 0 -> 1429 bytes Bai14/Bai14/bin/UseClass/TestClass.class | Bin 0 -> 2489 bytes Bai14/Bai14/src/BuildClass/DaGiac.java | 50 +++++++ Bai14/Bai14/src/BuildClass/TamGiac.java | 48 +++++++ Bai14/Bai14/src/UseClass/TestClass.java | 69 ++++++++++ Bai15/Bai15/.classpath | 10 ++ Bai15/Bai15/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai15/Bai15/bin/BuildClass/Diem.class | Bin 0 -> 1406 bytes Bai15/Bai15/bin/BuildClass/TamGiac.class | Bin 0 -> 1040 bytes Bai15/Bai15/bin/UseClass/TestClass.class | Bin 0 -> 1312 bytes Bai15/Bai15/src/BuildClass/Diem.java | 50 +++++++ Bai15/Bai15/src/BuildClass/TamGiac.java | 40 ++++++ Bai15/Bai15/src/UseClass/TestClass.java | 23 ++++ Bai16/Bai16/.classpath | 10 ++ Bai16/Bai16/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai16/Bai16/bin/BuildClass/Diem.class | Bin 0 -> 1406 bytes Bai16/Bai16/bin/BuildClass/HinhTron.class | Bin 0 -> 718 bytes Bai16/Bai16/bin/UseClass/Test.class | Bin 0 -> 1197 bytes Bai16/Bai16/src/BuildClass/Diem.java | 46 +++++++ Bai16/Bai16/src/BuildClass/HinhTron.java | 28 ++++ Bai16/Bai16/src/UseClass/Test.java | 22 +++ Bai2/Bai2/.classpath | 6 + Bai2/Bai2/.project | 28 ++++ .../Bai2/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai2/Bai2/bin/Class/CanBo.class | Bin 0 -> 1619 bytes Bai2/Bai2/bin/Class/CongNhan.class | Bin 0 -> 1329 bytes Bai2/Bai2/bin/Class/KySu.class | Bin 0 -> 1345 bytes Bai2/Bai2/bin/Class/NhanVien.class | Bin 0 -> 1346 bytes Bai2/Bai2/bin/Class/QLCB.class | Bin 0 -> 2235 bytes Bai2/Bai2/bin/Testing/Test.class | Bin 0 -> 974 bytes Bai2/Bai2/src/Class/CanBo.java | 50 +++++++ Bai2/Bai2/src/Class/CongNhan.java | 33 +++++ Bai2/Bai2/src/Class/KySu.java | 33 +++++ Bai2/Bai2/src/Class/NhanVien.java | 33 +++++ Bai2/Bai2/src/Class/QLCB.java | 69 ++++++++++ Bai2/Bai2/src/Testing/Test.java | 25 ++++ Bai3/Bai3/.classpath | 6 + Bai3/Bai3/.project | 28 ++++ .../Bai3/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai3/Bai3/bin/Class/Bao.class | Bin 0 -> 1267 bytes Bai3/Bai3/bin/Class/QuanLySach.class | Bin 0 -> 2492 bytes Bai3/Bai3/bin/Class/Sach.class | Bin 0 -> 1467 bytes Bai3/Bai3/bin/Class/TaiLieu.class | Bin 0 -> 1561 bytes Bai3/Bai3/bin/Class/TapChi.class | Bin 0 -> 1431 bytes Bai3/Bai3/bin/Testing/Test.class | Bin 0 -> 1128 bytes Bai3/Bai3/src/Class/Bao.java | 33 +++++ Bai3/Bai3/src/Class/QuanLySach.java | 82 +++++++++++ Bai3/Bai3/src/Class/Sach.java | 39 ++++++ Bai3/Bai3/src/Class/TaiLieu.java | 46 +++++++ Bai3/Bai3/src/Class/TapChi.java | 39 ++++++ Bai3/Bai3/src/Testing/Test.java | 27 ++++ Bai4/Bai4/.classpath | 6 + Bai4/Bai4/.project | 28 ++++ .../Bai4/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai4/Bai4/bin/Class/KhoiA.class | Bin 0 -> 1334 bytes Bai4/Bai4/bin/Class/KhoiB.class | Bin 0 -> 461 bytes Bai4/Bai4/bin/Class/KhoiC.class | Bin 0 -> 461 bytes Bai4/Bai4/bin/Class/ThiSinh.class | Bin 0 -> 1674 bytes Bai4/Bai4/bin/Class/TuyenSinh.class | Bin 0 -> 2554 bytes Bai4/Bai4/bin/Testing/Test.class | Bin 0 -> 1169 bytes Bai4/Bai4/src/Class/KhoiA.java | 40 ++++++ Bai4/Bai4/src/Class/KhoiB.java | 15 +++ Bai4/Bai4/src/Class/KhoiC.java | 15 +++ Bai4/Bai4/src/Class/ThiSinh.java | 51 +++++++ Bai4/Bai4/src/Class/TuyenSinh.java | 70 ++++++++++ Bai4/Bai4/src/Testing/Test.java | 29 ++++ Bai5/Bai5/.classpath | 6 + Bai5/Bai5/.project | 28 ++++ .../Bai5/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai5/Bai5/bin/Class/HoDan.class | Bin 0 -> 2070 bytes Bai5/Bai5/bin/Class/KhuPho.class | Bin 0 -> 2511 bytes Bai5/Bai5/bin/Class/Nguoi.class | Bin 0 -> 2235 bytes Bai5/Bai5/bin/Testing/Test.class | Bin 0 -> 872 bytes Bai5/Bai5/src/Class/HoDan.java | 61 +++++++++ Bai5/Bai5/src/Class/KhuPho.java | 66 +++++++++ Bai5/Bai5/src/Class/Nguoi.java | 73 ++++++++++ Bai5/Bai5/src/Testing/Test.java | 20 +++ Bai6/Bai6/.classpath | 6 + Bai6/Bai6/.project | 28 ++++ .../Bai6/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai6/Bai6/bin/Class/KhachSan.class | Bin 0 -> 2154 bytes Bai6/Bai6/bin/Class/KhachTro.class | Bin 0 -> 1803 bytes Bai6/Bai6/bin/Class/Nguoi.class | Bin 0 -> 2103 bytes Bai6/Bai6/bin/Testing/Test.class | Bin 0 -> 1150 bytes Bai6/Bai6/src/Class/KhachSan.java | 57 ++++++++ Bai6/Bai6/src/Class/KhachTro.java | 58 ++++++++ Bai6/Bai6/src/Class/Nguoi.java | 62 +++++++++ Bai6/Bai6/src/Testing/Test.java | 24 ++++ Bai7/Bai7/.classpath | 6 + Bai7/Bai7/.project | 28 ++++ .../Bai7/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai7/Bai7/bin/Class/HocSinh.class | Bin 0 -> 1524 bytes Bai7/Bai7/bin/Class/Nguoi.class | Bin 0 -> 2159 bytes Bai7/Bai7/bin/Class/QLHS.class | Bin 0 -> 2517 bytes Bai7/Bai7/bin/Testing/Test.class | Bin 0 -> 1054 bytes Bai7/Bai7/src/Class/HocSinh.java | 52 +++++++ Bai7/Bai7/src/Class/Nguoi.java | 70 ++++++++++ Bai7/Bai7/src/Class/QLHS.java | 64 +++++++++ Bai7/Bai7/src/Testing/Test.java | 25 ++++ Bai8/Bai8/.classpath | 6 + Bai8/Bai8/.project | 28 ++++ .../Bai8/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai8/Bai8/bin/Class/CBGV.class | Bin 0 -> 1419 bytes Bai8/Bai8/bin/Class/Nguoi.class | Bin 0 -> 1368 bytes Bai8/Bai8/bin/Class/QuanLy.class | Bin 0 -> 2041 bytes Bai8/Bai8/bin/Testing/Test.class | Bin 0 -> 916 bytes Bai8/Bai8/src/Class/CBGV.java | 52 +++++++ Bai8/Bai8/src/Class/Nguoi.java | 40 ++++++ Bai8/Bai8/src/Class/QuanLy.java | 53 ++++++++ Bai8/Bai8/src/Testing/Test.java | 22 +++ Bai9/Bai9/.classpath | 6 + Bai9/Bai9/.project | 28 ++++ .../Bai9/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai9/Bai9/bin/Class/QuanLy.class | Bin 0 -> 1988 bytes Bai9/Bai9/bin/Class/SinhVien.class | Bin 0 -> 1526 bytes Bai9/Bai9/bin/Class/TheMuon.class | Bin 0 -> 2328 bytes Bai9/Bai9/bin/Testing/Test.class | Bin 0 -> 915 bytes Bai9/Bai9/src/Class/QuanLy.java | 46 +++++++ Bai9/Bai9/src/Class/SinhVien.java | 48 +++++++ Bai9/Bai9/src/Class/TheMuon.java | 75 +++++++++++ Bai9/Bai9/src/Testing/Test.java | 22 +++ README.md | 3 - exercise_oop_account/Account.java | 41 ------ exercise_oop_account/Main.java | 35 ----- .../exercise_oop_composition_book_author.iml | 11 -- .../src/Author.java | 38 ------ .../src/Book.java | 39 ------ .../src/Main.java | 8 -- ...ercise_oop_composition_student_address.iml | 11 -- .../src/Address.java | 39 ------ .../src/Main.java | 13 -- .../src/Student.java | 58 -------- exercise_oop_date/exercise_oop_date.iml | 11 -- exercise_oop_date/src/Date.java | 56 -------- exercise_oop_date/src/Main.java | 8 -- .../exercise_oop_employee.iml | 11 -- exercise_oop_employee/src/Employee.java | 51 ------- exercise_oop_employee/src/Main.java | 10 -- ...ercise_oop_inheritance_circle_cylinder.iml | 11 -- .../src/Circle.java | 36 ----- .../src/Cylinder.java | 21 --- .../src/Main.java | 8 -- ...e_oop_inheritance_person_student_staff.iml | 11 -- .../src/Main.java | 10 -- .../src/Person.java | 17 --- .../src/Staff.java | 31 ----- .../src/Student.java | 47 ------- ...se_oop_polymorphism_interface_moveable.iml | 11 -- .../src/Main.java | 16 --- .../src/Moveable.java | 6 - .../src/MoveableCircle.java | 35 ----- .../src/MoveablePoint.java | 76 ----------- exercise_polymorphism/Circle.java | 38 ------ exercise_polymorphism/Main.java | 53 -------- exercise_polymorphism/Rectangle.java | 50 ------- exercise_polymorphism/Shape.java | 32 ----- exercise_polymorphism/Square.java | 12 -- .../exerciseoop_class-object_cricle.iml | 11 -- .../src/com/company/Circle.java | 45 ------- .../src/com/company/Main.java | 33 ----- .../exerciseoop_class-object_rectangle.iml | 11 -- .../src/com/company/Main.java | 12 -- .../src/com/company/Rectangle.java | 37 ----- oop-b14/oop-b14.iml | 11 -- oop-b14/src/Main.java | 33 ----- oop-b14/src/entity/GoodStudent.java | 18 --- oop-b14/src/entity/NormalStudent.java | 16 --- oop-b14/src/entity/Student.java | 24 ---- oop-shareprogramming.iml | 12 -- oop_employee_management/.idea/.gitignore | 3 - oop_employee_management/.idea/misc.xml | 6 - oop_employee_management/.idea/modules.xml | 8 -- .../.idea/sonarlint/issuestore/index.pb | 0 oop_employee_management/.idea/uiDesigner.xml | 124 ----------------- oop_employee_management/.idea/vcs.xml | 6 - oop_employee_management/README.md | 11 -- oop_employee_management/oop_b13.iml | 11 -- .../oop_employee_management.iml | 11 -- .../out/production/oop_b13/Main.class | Bin 508 -> 0 bytes .../oop_b13/entity/Certificate.class | Bin 1366 -> 0 bytes .../production/oop_b13/entity/Employee.class | Bin 2387 -> 0 bytes .../oop_b13/entity/Experience.class | Bin 2530 -> 0 bytes .../production/oop_b13/entity/Fresher.class | Bin 2937 -> 0 bytes .../production/oop_b13/entity/Intern.class | Bin 2816 -> 0 bytes .../oop_b13/exception/BirthDayException.class | Bin 363 -> 0 bytes .../oop_b13/exception/EmailException.class | Bin 290 -> 0 bytes .../oop_b13/exception/FullNameException.class | Bin 363 -> 0 bytes .../oop_b13/exception/PhoneException.class | Bin 354 -> 0 bytes .../oop_b13/service/EmployeeManager.class | Bin 3081 -> 0 bytes .../oop_b13/ui/ScannerFactory.class | Bin 575 -> 0 bytes .../out/production/oop_b13/ui/UIManager.class | Bin 1580 -> 0 bytes oop_employee_management/src/Main.java | 29 ---- .../src/entity/Certificate.java | 52 ------- .../src/entity/Employee.java | 75 ----------- .../src/entity/Experience.java | 57 -------- .../src/entity/Fresher.java | 70 ---------- .../src/entity/Intern.java | 69 ---------- .../src/exception/BirthDayException.java | 7 - .../src/exception/EmailException.java | 4 - .../src/exception/FullNameException.java | 8 -- .../src/exception/PhoneException.java | 8 -- .../src/service/EmployeeManager.java | 64 --------- .../src/service/ValidatorService.java | 27 ---- .../src/ui/ScannerFactory.java | 15 --- oop_employee_management/src/ui/UIManager.java | 113 ---------------- synthetic_exercise_oop_java/src/Main.java | 6 - .../src/b1/Engineer.java | 30 ----- synthetic_exercise_oop_java/src/b1/Main.java | 106 --------------- .../src/b1/ManagerOfficer.java | 25 ---- .../src/b1/Officer.java | 49 ------- synthetic_exercise_oop_java/src/b1/Staff.java | 30 ----- .../src/b1/Worker.java | 31 ----- synthetic_exercise_oop_java/src/b2/Book.java | 40 ------ .../src/b2/Document.java | 37 ----- .../src/b2/Journal.java | 40 ------ synthetic_exercise_oop_java/src/b2/Main.java | 127 ------------------ .../src/b2/ManagerDocument.java | 43 ------ .../src/b2/Newspaper.java | 28 ---- .../src/b3/Candidate.java | 47 ------- .../src/b3/CandidateA.java | 20 --- .../src/b3/CandidateB.java | 22 --- .../src/b3/CandidateC.java | 22 --- synthetic_exercise_oop_java/src/b3/Main.java | 88 ------------ .../src/b3/ManagerCandidate.java | 25 ---- .../src/b4/Family.java | 37 ----- synthetic_exercise_oop_java/src/b4/Main.java | 38 ------ .../src/b4/Person.java | 58 -------- synthetic_exercise_oop_java/src/b4/Town.java | 24 ---- synthetic_exercise_oop_java/src/b5/Hotel.java | 38 ------ synthetic_exercise_oop_java/src/b5/Main.java | 73 ---------- .../src/b5/Person.java | 66 --------- synthetic_exercise_oop_java/src/b5/Room.java | 27 ---- synthetic_exercise_oop_java/src/b5/RoomA.java | 16 --- synthetic_exercise_oop_java/src/b5/RoomB.java | 15 --- synthetic_exercise_oop_java/src/b5/RoomC.java | 15 --- synthetic_exercise_oop_java/src/b6/Main.java | 17 --- .../src/b6/School.java | 25 ---- .../src/b6/Student.java | 56 -------- synthetic_exercise_oop_java/src/b7/Main.java | 19 --- .../src/b7/ManagerTeacher.java | 33 ----- .../src/b7/Teacher.java | 88 ------------ synthetic_exercise_oop_java/src/b8/Card.java | 57 -------- synthetic_exercise_oop_java/src/b8/Main.java | 18 --- .../src/b8/ManagerCard.java | 26 ---- .../src/b8/Student.java | 37 ----- .../synthetic_exercise_oop_java.iml | 11 -- 303 files changed, 3629 insertions(+), 3655 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml create mode 100644 Bai1/Bai1/.classpath create mode 100644 Bai1/Bai1/.project create mode 100644 Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai1/Bai1/bin/Class/PhanSo.class create mode 100644 Bai1/Bai1/bin/Test/TestClass.class create mode 100644 Bai1/Bai1/src/Class/PhanSo.java create mode 100644 Bai1/Bai1/src/Test/TestClass.java create mode 100644 Bai10/Bai10/.classpath create mode 100644 Bai10/Bai10/.project create mode 100644 Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai10/Bai10/bin/BuildClass/BienLai.class create mode 100644 Bai10/Bai10/bin/BuildClass/KhachHang.class create mode 100644 Bai10/Bai10/bin/BuildClass/QuanLy.class create mode 100644 Bai10/Bai10/bin/UseClass/Using.class create mode 100644 Bai10/Bai10/src/BuildClass/BienLai.java create mode 100644 Bai10/Bai10/src/BuildClass/KhachHang.java create mode 100644 Bai10/Bai10/src/BuildClass/QuanLy.java create mode 100644 Bai10/Bai10/src/UseClass/Using.java create mode 100644 Bai11/Bai11/.classpath create mode 100644 Bai11/Bai11/.project create mode 100644 Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai11/Bai11/bin/BuildClass/VanBan.class create mode 100644 Bai11/Bai11/bin/UseClass/TestClass.class create mode 100644 Bai11/Bai11/src/BuildClass/VanBan.java create mode 100644 Bai11/Bai11/src/UseClass/TestClass.java create mode 100644 Bai12/Bai12/.classpath create mode 100644 Bai12/Bai12/.project create mode 100644 Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai12/Bai12/bin/BuildClass/MaTran.class create mode 100644 Bai12/Bai12/bin/UseClass/TestClass.class create mode 100644 Bai12/Bai12/src/BuildClass/MaTran.java create mode 100644 Bai12/Bai12/src/UseClass/TestClass.java create mode 100644 Bai13/Bai13/.classpath create mode 100644 Bai13/Bai13/.project create mode 100644 Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai13/Bai13/bin/BuildClass/OTo.class create mode 100644 Bai13/Bai13/bin/BuildClass/PTGT.class create mode 100644 Bai13/Bai13/bin/BuildClass/QLPTGT.class create mode 100644 Bai13/Bai13/bin/BuildClass/XeMay.class create mode 100644 Bai13/Bai13/bin/BuildClass/XeTai.class create mode 100644 Bai13/Bai13/bin/UseClass/TestClass.class create mode 100644 Bai13/Bai13/src/BuildClass/OTo.java create mode 100644 Bai13/Bai13/src/BuildClass/PTGT.java create mode 100644 Bai13/Bai13/src/BuildClass/QLPTGT.java create mode 100644 Bai13/Bai13/src/BuildClass/XeMay.java create mode 100644 Bai13/Bai13/src/BuildClass/XeTai.java create mode 100644 Bai13/Bai13/src/UseClass/TestClass.java create mode 100644 Bai14/Bai14/.classpath create mode 100644 Bai14/Bai14/.project create mode 100644 Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai14/Bai14/bin/BuildClass/DaGiac.class create mode 100644 Bai14/Bai14/bin/BuildClass/TamGiac.class create mode 100644 Bai14/Bai14/bin/UseClass/TestClass.class create mode 100644 Bai14/Bai14/src/BuildClass/DaGiac.java create mode 100644 Bai14/Bai14/src/BuildClass/TamGiac.java create mode 100644 Bai14/Bai14/src/UseClass/TestClass.java create mode 100644 Bai15/Bai15/.classpath create mode 100644 Bai15/Bai15/.project create mode 100644 Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai15/Bai15/bin/BuildClass/Diem.class create mode 100644 Bai15/Bai15/bin/BuildClass/TamGiac.class create mode 100644 Bai15/Bai15/bin/UseClass/TestClass.class create mode 100644 Bai15/Bai15/src/BuildClass/Diem.java create mode 100644 Bai15/Bai15/src/BuildClass/TamGiac.java create mode 100644 Bai15/Bai15/src/UseClass/TestClass.java create mode 100644 Bai16/Bai16/.classpath create mode 100644 Bai16/Bai16/.project create mode 100644 Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai16/Bai16/bin/BuildClass/Diem.class create mode 100644 Bai16/Bai16/bin/BuildClass/HinhTron.class create mode 100644 Bai16/Bai16/bin/UseClass/Test.class create mode 100644 Bai16/Bai16/src/BuildClass/Diem.java create mode 100644 Bai16/Bai16/src/BuildClass/HinhTron.java create mode 100644 Bai16/Bai16/src/UseClass/Test.java create mode 100644 Bai2/Bai2/.classpath create mode 100644 Bai2/Bai2/.project create mode 100644 Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai2/Bai2/bin/Class/CanBo.class create mode 100644 Bai2/Bai2/bin/Class/CongNhan.class create mode 100644 Bai2/Bai2/bin/Class/KySu.class create mode 100644 Bai2/Bai2/bin/Class/NhanVien.class create mode 100644 Bai2/Bai2/bin/Class/QLCB.class create mode 100644 Bai2/Bai2/bin/Testing/Test.class create mode 100644 Bai2/Bai2/src/Class/CanBo.java create mode 100644 Bai2/Bai2/src/Class/CongNhan.java create mode 100644 Bai2/Bai2/src/Class/KySu.java create mode 100644 Bai2/Bai2/src/Class/NhanVien.java create mode 100644 Bai2/Bai2/src/Class/QLCB.java create mode 100644 Bai2/Bai2/src/Testing/Test.java create mode 100644 Bai3/Bai3/.classpath create mode 100644 Bai3/Bai3/.project create mode 100644 Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai3/Bai3/bin/Class/Bao.class create mode 100644 Bai3/Bai3/bin/Class/QuanLySach.class create mode 100644 Bai3/Bai3/bin/Class/Sach.class create mode 100644 Bai3/Bai3/bin/Class/TaiLieu.class create mode 100644 Bai3/Bai3/bin/Class/TapChi.class create mode 100644 Bai3/Bai3/bin/Testing/Test.class create mode 100644 Bai3/Bai3/src/Class/Bao.java create mode 100644 Bai3/Bai3/src/Class/QuanLySach.java create mode 100644 Bai3/Bai3/src/Class/Sach.java create mode 100644 Bai3/Bai3/src/Class/TaiLieu.java create mode 100644 Bai3/Bai3/src/Class/TapChi.java create mode 100644 Bai3/Bai3/src/Testing/Test.java create mode 100644 Bai4/Bai4/.classpath create mode 100644 Bai4/Bai4/.project create mode 100644 Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai4/Bai4/bin/Class/KhoiA.class create mode 100644 Bai4/Bai4/bin/Class/KhoiB.class create mode 100644 Bai4/Bai4/bin/Class/KhoiC.class create mode 100644 Bai4/Bai4/bin/Class/ThiSinh.class create mode 100644 Bai4/Bai4/bin/Class/TuyenSinh.class create mode 100644 Bai4/Bai4/bin/Testing/Test.class create mode 100644 Bai4/Bai4/src/Class/KhoiA.java create mode 100644 Bai4/Bai4/src/Class/KhoiB.java create mode 100644 Bai4/Bai4/src/Class/KhoiC.java create mode 100644 Bai4/Bai4/src/Class/ThiSinh.java create mode 100644 Bai4/Bai4/src/Class/TuyenSinh.java create mode 100644 Bai4/Bai4/src/Testing/Test.java create mode 100644 Bai5/Bai5/.classpath create mode 100644 Bai5/Bai5/.project create mode 100644 Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai5/Bai5/bin/Class/HoDan.class create mode 100644 Bai5/Bai5/bin/Class/KhuPho.class create mode 100644 Bai5/Bai5/bin/Class/Nguoi.class create mode 100644 Bai5/Bai5/bin/Testing/Test.class create mode 100644 Bai5/Bai5/src/Class/HoDan.java create mode 100644 Bai5/Bai5/src/Class/KhuPho.java create mode 100644 Bai5/Bai5/src/Class/Nguoi.java create mode 100644 Bai5/Bai5/src/Testing/Test.java create mode 100644 Bai6/Bai6/.classpath create mode 100644 Bai6/Bai6/.project create mode 100644 Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai6/Bai6/bin/Class/KhachSan.class create mode 100644 Bai6/Bai6/bin/Class/KhachTro.class create mode 100644 Bai6/Bai6/bin/Class/Nguoi.class create mode 100644 Bai6/Bai6/bin/Testing/Test.class create mode 100644 Bai6/Bai6/src/Class/KhachSan.java create mode 100644 Bai6/Bai6/src/Class/KhachTro.java create mode 100644 Bai6/Bai6/src/Class/Nguoi.java create mode 100644 Bai6/Bai6/src/Testing/Test.java create mode 100644 Bai7/Bai7/.classpath create mode 100644 Bai7/Bai7/.project create mode 100644 Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai7/Bai7/bin/Class/HocSinh.class create mode 100644 Bai7/Bai7/bin/Class/Nguoi.class create mode 100644 Bai7/Bai7/bin/Class/QLHS.class create mode 100644 Bai7/Bai7/bin/Testing/Test.class create mode 100644 Bai7/Bai7/src/Class/HocSinh.java create mode 100644 Bai7/Bai7/src/Class/Nguoi.java create mode 100644 Bai7/Bai7/src/Class/QLHS.java create mode 100644 Bai7/Bai7/src/Testing/Test.java create mode 100644 Bai8/Bai8/.classpath create mode 100644 Bai8/Bai8/.project create mode 100644 Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai8/Bai8/bin/Class/CBGV.class create mode 100644 Bai8/Bai8/bin/Class/Nguoi.class create mode 100644 Bai8/Bai8/bin/Class/QuanLy.class create mode 100644 Bai8/Bai8/bin/Testing/Test.class create mode 100644 Bai8/Bai8/src/Class/CBGV.java create mode 100644 Bai8/Bai8/src/Class/Nguoi.java create mode 100644 Bai8/Bai8/src/Class/QuanLy.java create mode 100644 Bai8/Bai8/src/Testing/Test.java create mode 100644 Bai9/Bai9/.classpath create mode 100644 Bai9/Bai9/.project create mode 100644 Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai9/Bai9/bin/Class/QuanLy.class create mode 100644 Bai9/Bai9/bin/Class/SinhVien.class create mode 100644 Bai9/Bai9/bin/Class/TheMuon.class create mode 100644 Bai9/Bai9/bin/Testing/Test.class create mode 100644 Bai9/Bai9/src/Class/QuanLy.java create mode 100644 Bai9/Bai9/src/Class/SinhVien.java create mode 100644 Bai9/Bai9/src/Class/TheMuon.java create mode 100644 Bai9/Bai9/src/Testing/Test.java delete mode 100644 README.md delete mode 100644 exercise_oop_account/Account.java delete mode 100644 exercise_oop_account/Main.java delete mode 100644 exercise_oop_composition_book_author/exercise_oop_composition_book_author.iml delete mode 100644 exercise_oop_composition_book_author/src/Author.java delete mode 100644 exercise_oop_composition_book_author/src/Book.java delete mode 100644 exercise_oop_composition_book_author/src/Main.java delete mode 100644 exercise_oop_composition_student_address/exercise_oop_composition_student_address.iml delete mode 100644 exercise_oop_composition_student_address/src/Address.java delete mode 100644 exercise_oop_composition_student_address/src/Main.java delete mode 100644 exercise_oop_composition_student_address/src/Student.java delete mode 100644 exercise_oop_date/exercise_oop_date.iml delete mode 100644 exercise_oop_date/src/Date.java delete mode 100644 exercise_oop_date/src/Main.java delete mode 100644 exercise_oop_employee/exercise_oop_employee.iml delete mode 100644 exercise_oop_employee/src/Employee.java delete mode 100644 exercise_oop_employee/src/Main.java delete mode 100644 exercise_oop_inheritance_circle_cylinder/exercise_oop_inheritance_circle_cylinder.iml delete mode 100644 exercise_oop_inheritance_circle_cylinder/src/Circle.java delete mode 100644 exercise_oop_inheritance_circle_cylinder/src/Cylinder.java delete mode 100644 exercise_oop_inheritance_circle_cylinder/src/Main.java delete mode 100644 exercise_oop_inheritance_person_student_staff/exercise_oop_inheritance_person_student_staff.iml delete mode 100644 exercise_oop_inheritance_person_student_staff/src/Main.java delete mode 100644 exercise_oop_inheritance_person_student_staff/src/Person.java delete mode 100644 exercise_oop_inheritance_person_student_staff/src/Staff.java delete mode 100644 exercise_oop_inheritance_person_student_staff/src/Student.java delete mode 100644 exercise_oop_polymorphism_interface_moveable/exercise_oop_polymorphism_interface_moveable.iml delete mode 100644 exercise_oop_polymorphism_interface_moveable/src/Main.java delete mode 100644 exercise_oop_polymorphism_interface_moveable/src/Moveable.java delete mode 100644 exercise_oop_polymorphism_interface_moveable/src/MoveableCircle.java delete mode 100644 exercise_oop_polymorphism_interface_moveable/src/MoveablePoint.java delete mode 100644 exercise_polymorphism/Circle.java delete mode 100644 exercise_polymorphism/Main.java delete mode 100644 exercise_polymorphism/Rectangle.java delete mode 100644 exercise_polymorphism/Shape.java delete mode 100644 exercise_polymorphism/Square.java delete mode 100644 exerciseoop_class-object_cricle/exerciseoop_class-object_cricle.iml delete mode 100644 exerciseoop_class-object_cricle/src/com/company/Circle.java delete mode 100644 exerciseoop_class-object_cricle/src/com/company/Main.java delete mode 100644 exerciseoop_class-object_rectangle/exerciseoop_class-object_rectangle.iml delete mode 100644 exerciseoop_class-object_rectangle/src/com/company/Main.java delete mode 100644 exerciseoop_class-object_rectangle/src/com/company/Rectangle.java delete mode 100644 oop-b14/oop-b14.iml delete mode 100644 oop-b14/src/Main.java delete mode 100644 oop-b14/src/entity/GoodStudent.java delete mode 100644 oop-b14/src/entity/NormalStudent.java delete mode 100644 oop-b14/src/entity/Student.java delete mode 100644 oop-shareprogramming.iml delete mode 100644 oop_employee_management/.idea/.gitignore delete mode 100644 oop_employee_management/.idea/misc.xml delete mode 100644 oop_employee_management/.idea/modules.xml delete mode 100644 oop_employee_management/.idea/sonarlint/issuestore/index.pb delete mode 100644 oop_employee_management/.idea/uiDesigner.xml delete mode 100644 oop_employee_management/.idea/vcs.xml delete mode 100644 oop_employee_management/README.md delete mode 100644 oop_employee_management/oop_b13.iml delete mode 100644 oop_employee_management/oop_employee_management.iml delete mode 100644 oop_employee_management/out/production/oop_b13/Main.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Certificate.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Employee.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Experience.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Fresher.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Intern.class delete mode 100644 oop_employee_management/out/production/oop_b13/exception/BirthDayException.class delete mode 100644 oop_employee_management/out/production/oop_b13/exception/EmailException.class delete mode 100644 oop_employee_management/out/production/oop_b13/exception/FullNameException.class delete mode 100644 oop_employee_management/out/production/oop_b13/exception/PhoneException.class delete mode 100644 oop_employee_management/out/production/oop_b13/service/EmployeeManager.class delete mode 100644 oop_employee_management/out/production/oop_b13/ui/ScannerFactory.class delete mode 100644 oop_employee_management/out/production/oop_b13/ui/UIManager.class delete mode 100644 oop_employee_management/src/Main.java delete mode 100644 oop_employee_management/src/entity/Certificate.java delete mode 100644 oop_employee_management/src/entity/Employee.java delete mode 100644 oop_employee_management/src/entity/Experience.java delete mode 100644 oop_employee_management/src/entity/Fresher.java delete mode 100644 oop_employee_management/src/entity/Intern.java delete mode 100644 oop_employee_management/src/exception/BirthDayException.java delete mode 100644 oop_employee_management/src/exception/EmailException.java delete mode 100644 oop_employee_management/src/exception/FullNameException.java delete mode 100644 oop_employee_management/src/exception/PhoneException.java delete mode 100644 oop_employee_management/src/service/EmployeeManager.java delete mode 100644 oop_employee_management/src/service/ValidatorService.java delete mode 100644 oop_employee_management/src/ui/ScannerFactory.java delete mode 100644 oop_employee_management/src/ui/UIManager.java delete mode 100644 synthetic_exercise_oop_java/src/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Engineer.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b1/ManagerOfficer.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Officer.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Staff.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Worker.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Book.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Document.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Journal.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b2/ManagerDocument.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Newspaper.java delete mode 100644 synthetic_exercise_oop_java/src/b3/Candidate.java delete mode 100644 synthetic_exercise_oop_java/src/b3/CandidateA.java delete mode 100644 synthetic_exercise_oop_java/src/b3/CandidateB.java delete mode 100644 synthetic_exercise_oop_java/src/b3/CandidateC.java delete mode 100644 synthetic_exercise_oop_java/src/b3/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b3/ManagerCandidate.java delete mode 100644 synthetic_exercise_oop_java/src/b4/Family.java delete mode 100644 synthetic_exercise_oop_java/src/b4/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b4/Person.java delete mode 100644 synthetic_exercise_oop_java/src/b4/Town.java delete mode 100644 synthetic_exercise_oop_java/src/b5/Hotel.java delete mode 100644 synthetic_exercise_oop_java/src/b5/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b5/Person.java delete mode 100644 synthetic_exercise_oop_java/src/b5/Room.java delete mode 100644 synthetic_exercise_oop_java/src/b5/RoomA.java delete mode 100644 synthetic_exercise_oop_java/src/b5/RoomB.java delete mode 100644 synthetic_exercise_oop_java/src/b5/RoomC.java delete mode 100644 synthetic_exercise_oop_java/src/b6/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b6/School.java delete mode 100644 synthetic_exercise_oop_java/src/b6/Student.java delete mode 100644 synthetic_exercise_oop_java/src/b7/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b7/ManagerTeacher.java delete mode 100644 synthetic_exercise_oop_java/src/b7/Teacher.java delete mode 100644 synthetic_exercise_oop_java/src/b8/Card.java delete mode 100644 synthetic_exercise_oop_java/src/b8/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b8/ManagerCard.java delete mode 100644 synthetic_exercise_oop_java/src/b8/Student.java delete mode 100644 synthetic_exercise_oop_java/synthetic_exercise_oop_java.iml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 639900d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 0e0500a..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Bai1/Bai1/.classpath b/Bai1/Bai1/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai1/Bai1/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai1/Bai1/.project b/Bai1/Bai1/.project new file mode 100644 index 0000000..c0b6442 --- /dev/null +++ b/Bai1/Bai1/.project @@ -0,0 +1,28 @@ + + + Bai1 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272454 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs b/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai1/Bai1/bin/Class/PhanSo.class b/Bai1/Bai1/bin/Class/PhanSo.class new file mode 100644 index 0000000000000000000000000000000000000000..f4ab430de744f5d071adb46963043e69e1f8c136 GIT binary patch literal 2488 zcmbVOU2_v<6n@?$G#}kGP@1ANi3w(OsTejvPrkiLb4l^4Fk9S z3mGrGV}{{E9cUey@dr5mA8%BA&hDC~1B~eG%=O69g$brm9Rr|c-GlESWr;m!M|E!%Qu6vFw@ zWqvX1teFXfp=pRA9*4q!hF$2B*=`L{^eLp~EZbb@G%99m$*9y#g~2(eYSfpFmL=<8 zGvd~)HtpwnsZG&!zEl!leRj=gE|wLB^K%~8j%(G6<*H%ZW@~D6IgU3m62<-3_sg!pj{CxlYaI`8Kfm%vrK!bW-XSZm{i!eT_%2n=Q>t>&1}UmP5AiH1WsW_ zis4WKXK*fxvrOr>&Aj2(G|b{-hH6xp?nu5gS`woR8ZP1z(`+=GroE<+;fc?*N6)|; z)Ab4I7R7K*4CfV&zD)gB0*K`m4U4#{5OWVg}CdV2!^_+kSIHyR@J;bj<>jY0vl39}H?|WSL)BXd_!n6V74C7DU2TFvW=*s_yFcRQ; z;R*RYL8|sGj+62;oLU*2+QMns{|O&$;{0G~6PM)^f4PYTFRJl>zW(&zzupdcn9>48 zX7L#59mgau4U++EXLdaZO~^+Onkn!~n?6;fj z?p20+tA|3m8-ChLyEI1HOS^RX9(>X5CjOoI15p(vlP?M3*W?vC6qBKXBtnXC3r6HS z?20@NZ`1MX&%|!5({;^r@84xZfqSWVA`KF(+HKSdw?aHP*b6>gSfQtpx?FLbrDXQP j)!E>k;PBRJ@>coEb2scG1@4lJagCAjMrR93o2>s0nJt_c literal 0 HcmV?d00001 diff --git a/Bai1/Bai1/bin/Test/TestClass.class b/Bai1/Bai1/bin/Test/TestClass.class new file mode 100644 index 0000000000000000000000000000000000000000..be5aed6b0fd45d221976022f7d59b12d173fe4cd GIT binary patch literal 1187 zcmZuwYflo|XVnjw z)TBS4KdR}Og%(KoGBfuv=bn4!&hI}ze*xIShah|cV_RWQ0>iteWx9I;L#gzMfPddU*CQB0SVI8A0^@np(vO?9GrdugXH{Jwmbc5Y zdLkR9vO7+{YnToTjm_0URJ$WhZWSs~}$4vT}))it^HPWH!J!A!G#- z0|^<@B%e8KXxPLfLX~Z+qM#O2`Cb8X>3%bW$7B{!>h$)OtV$2=sfK52Lc)frTP4FR z6hqh%nC!d2+A2SUT|RR+LIQ1=DE2hGP%wdV)pj^ue%YvSlHvo#g|F_E85$q}U#sqH zaO(S8@Z6hhx$cx$Qy@~bn~k!5V5&*>zKEy5x_Trmf%*JGfR87RKi43wEO)^@uyT#i z4=)_ys={Ex2v@D0z1{wplT z?zFI+S#4oO8S6CGl#y9$;bA*rOC_}MM8&sNymQX+obc0N{_`%)15B`dgfvGu+!_aA z6wCY~8TvO6!#2Hp{8Vp|z!7HgnHi^;$2TlM$09EH8!T$0+T3clf|qzjYXs+bjeRy6 c$5*@|f{%AgIN)iBH9q1UPkzSVGuwy5zZN(L6aWAK literal 0 HcmV?d00001 diff --git a/Bai1/Bai1/src/Class/PhanSo.java b/Bai1/Bai1/src/Class/PhanSo.java new file mode 100644 index 0000000..d68a2c8 --- /dev/null +++ b/Bai1/Bai1/src/Class/PhanSo.java @@ -0,0 +1,114 @@ +package Class; + +import java.util.Scanner; + +public class PhanSo { + // thuoc tinh + private int tuSo; + private int mauSo; + + // phuong thuc + // ham khoi tao khong doi so + public PhanSo() { + tuSo = 0; + mauSo = 1; + } + + // ham khoi tao co doi so + public PhanSo(int tuSo, int mauSo) { + this.tuSo = tuSo; + this.mauSo = mauSo; + } + + // ham nhap phan so + public void nhapPS(Scanner sc) { + int a; + int b; + + do { + System.out.print("\tNhap vao tu so: "); + a = sc.nextInt(); + + System.out.print("\tNhap vao mau so: "); + b = sc.nextInt(); + + // kiem tra + if (b == 0) { + System.out.println("Mau so khong duoc bang 0. Hay nhap lai!"); + } else { + tuSo = a; + mauSo = b; + } + } while (b == 0); + } + + // ham hien thi + public void hienThiPS() { + if (tuSo * mauSo < 0) { + System.out.println("\t-" + Math.abs(tuSo) + "/" + Math.abs(mauSo)); + } else { + System.out.println("\t" + Math.abs(tuSo) + "/" + Math.abs(mauSo)); + } + } + + // ham cong + public PhanSo congPS(PhanSo ps2) { + int a = tuSo * ps2.mauSo + ps2.tuSo * mauSo; + int b = mauSo * ps2.mauSo; + + return new PhanSo(a, b); + } + + // ham tru + public PhanSo truPS(PhanSo ps2) { + int a = tuSo * ps2.mauSo - ps2.tuSo * mauSo; + int b = mauSo * ps2.mauSo; + + return new PhanSo(a, b); + } + + // ham nhan + public PhanSo nhanPS(PhanSo ps2) { + int a = tuSo * ps2.tuSo; + int b = mauSo * ps2.mauSo; + + return new PhanSo(a, b); + } + + // ham chia + public PhanSo chiaPS(PhanSo ps2) { + int a = tuSo * ps2.mauSo; + int b = mauSo * ps2.tuSo; + + return new PhanSo(a, b); + } + + // ham tim uscln + private int timUSCLN(int a, int b) { + int r = a % b; + + while (r != 0) { + a = b; + b = r; + r = a % b; + } + + return b; + } + + // ham kiem tra phan so toi gian hay chua + public boolean kiemTraToiGian() { + if (timUSCLN(tuSo, mauSo) == 1) { + return true; + } + return false; + } + + // ham toi gian + public void toiGianPS() { + int x = timUSCLN(tuSo, mauSo); + + tuSo /= x; + mauSo /= x; + } +} diff --git a/Bai1/Bai1/src/Test/TestClass.java b/Bai1/Bai1/src/Test/TestClass.java new file mode 100644 index 0000000..a38acdf --- /dev/null +++ b/Bai1/Bai1/src/Test/TestClass.java @@ -0,0 +1,35 @@ +package Test; + +import java.util.Scanner; + +import Class.PhanSo; + +public class TestClass { + + public static void main(String[] args) { + Scanner sc=new Scanner(System.in); + PhanSo ps1=new PhanSo(); + PhanSo ps2=new PhanSo(); + PhanSo psTong =new PhanSo(); + + // nhap phan so + System.out.println("Nhap vao phan so thu nhat:"); + ps1.nhapPS(sc); + System.out.println("Nhap vao phan so thu hai:"); + ps2.nhapPS(sc); + + // tinh tong 2 phan so + psTong=ps1.congPS(ps2); + + // hien thi phan so + System.out.println("\nPhan so thu nhat la:"); + ps1.hienThiPS(); + System.out.println("\nPhan so thu hai la:"); + ps2.hienThiPS(); + System.out.println("\nPhan so tong la:"); + psTong.hienThiPS(); + + sc.close(); + } + +} diff --git a/Bai10/Bai10/.classpath b/Bai10/Bai10/.classpath new file mode 100644 index 0000000..4f2c72b --- /dev/null +++ b/Bai10/Bai10/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Bai10/Bai10/.project b/Bai10/Bai10/.project new file mode 100644 index 0000000..cc55708 --- /dev/null +++ b/Bai10/Bai10/.project @@ -0,0 +1,28 @@ + + + Bai10 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272482 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs b/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai10/Bai10/bin/BuildClass/BienLai.class b/Bai10/Bai10/bin/BuildClass/BienLai.class new file mode 100644 index 0000000000000000000000000000000000000000..f78d91586f76cfba284557e5b56087c0bfbc6192 GIT binary patch literal 1621 zcmZ{k+j84f6o&upIQ5}Q(>ShiorF3)q_#ril!gLvDXknzOx-la#-(tjI+{p~BV}xv zfjjP);Q@FLn8ulb86JR#;Sm`AwXLK!X>YWTYyICkZ2kT3AAbSZz_$s+6f)Mp>+aRM zcE4Y-JjZX?UIKB2?AZQe*Y3F6w!g2C?6_VtcoKLDs;-dG%i2I89@3bbTMFmydA=9k zSC}f5+dQcSdrlftxL_cS^9r*K&v$kP2QQso%YNB)2+;^ScDHT!JXuGZ@zC}91Zj+s zM1)m}l+@s$K?#^Jds1WOS$UHI_S7a4uU3N{&^-hv2Ieci~Q=Ctr#(IvW zPuEVjg40XlGliK{Z6Z4sK9>etPs2jpz!!MTF0l^}9e+<@u~a{c9C@pX#S;TNI?6B@ zwTYyA*T6H$YC>nV>nG7@}#%57!WZ}7Je=U+*Z@@ z0T@wZuSvjIW-CwejZPsZoy}QH`dW|dYL3&q!MDV(!POm(N_Nd-%>1UW&GMV388Cx5 zW^s`-V{{2~$Z#bN=J^!|T}n-J%!&hZ;fRyPBjn8T5%RD7<@B8l{mm01iwn5KSx);l zxl8-Vx6A}wpt2fWNV4)IsU*sUNcktOC9r~4UOmEsC}+(jkMwG&q!~6eU*VLYAg^096f})66f}(_x1ed_Jm-szXnxfx2P|{-7|XxoTBbb2s<}GE zZ9;MQ@VRVOUvK90rfI$+^DE@`=3@W2KTlAv=z=Yi;3{izjXAqc?HgRJz~tYcf)XC0 ztRu+jidm--Soj3@$)@B*M2x>Me#z@DGxmTqf5Li^**eA}VHje2h{h04PY%8u9pug& mv_=Q{A=)F0|JV5zb=H`{3hrVZPjP#!hjveU=mkk)_~t(n|1Z-3 literal 0 HcmV?d00001 diff --git a/Bai10/Bai10/bin/BuildClass/KhachHang.class b/Bai10/Bai10/bin/BuildClass/KhachHang.class new file mode 100644 index 0000000000000000000000000000000000000000..726f6dbffdbc6a7caffd99df2de2d0c40c130882 GIT binary patch literal 1460 zcmZuw+foxj5IqBdP2vKIA)=xzcuRs9MMWieBVLF^yd;I?;}W*mrIOuLva$5l2meP) zVwG0;0e+O_>D`bJ!^=$1O!w*2r+fbV{rMZfEtEA3DJ0ffPIV_=HJi=shHX~tb<^F| z5K%b3XMQlVRUWgiw)d=xuMqVuH*dGrJ%!0)@44hR9CtUTFw*okZBs!N=vy=Mp1WJ7 z@93)II{pKN;Z%A{A(HoYtT=`-t|N|P3KK=gwKiL|ZL3i>x2u+*dlj>~Wi}i+cP=Bo z?KBmV#iJ-Qdnz@^sW5nz-ikqCO2-IB#X6-!LsYEOI${`A&|TZCmu+G1xJ=l=ZTU_$ zTdJ6@Yc+C$at^Z^&i5%*`qcETnhpbVEZ1vMw5gDS<7Hn{CZA$iW-S-R1(q43Ty=x0 z8Wp=`*xrf}$0c0Ra9QDGAaH+}jug_=xh_bAKBD6ERvZgh)NobdL;!J^w~lMbvN^8x z(HGS@0IBq#Mp4{Q7!TPsJ%f4(vjyDLIXJf!G>I<=1-7&h#hq>~HPfh2IKyWx3Pa5b z3kmTL(_ptIY{zoTwsWAfhE?|B|Dg(6Z8f6c^o+&IeM05%NCqe!M-FQ`@_52gGwXHB z-BDOPN}7Q}JMcMyc&6idppEZ^11+s6=y)NDYk}fbH;SS{ELQ4jlEbE?ex)#zDhw)l zkRXaTQozeTb>bzj)u>p{92xoX?(e%MB4CaKIn0kbjEGDst%%HNuyaa-UCIBUpU%@w z?uz?J<_E^U(ip-7*En}zjKLE)PD>A+Z~~J&3BXCN0#K!AgnL2&G7I}OX7-WHEbe2v zhnFN7FgC)t7!nxA6s=@{oeASR*hC753#mjvU6>@~i?Jw$GdSDH{Dqn2ZTTB!Cg@VP*Wtr-H=?Ja b=m+vTjmucV6>RWd_qtQ;cIPdhAh-G-E;5hbI!fpdin34e*u_8RYypmZ?0ii zit`m&uV)@Kq?0?;p$YWv$;UENkxnUde|OI+xB{VKU7$bbe`vUNC3Ck{lZQFG?q&r# z@^;CQZlh)ij9wHolWW^(&bFMKw6n9!yfkAwwmT~jPNp^mwE1e$G7v_Wi4GV#dIaJZ z>}jAIeJUizoaAz9vjYNenTX($Ku^wgtkuT;u2tKRyA^VZ<*Ef)*_1U~&4WeFE!)%- zZ>QGufV?{0vb7%&6}X&i4?5+a+Eg@#O^o0g1;}EN4kerN+q}!Bb_Dd@rf9Of2ui?o z%JN`AI_119lm!L?9N+4EK{}3A%PN`g;(ZCO$xtG^!0&D=3s*&8*dI z$IZJnOYUc*NDB$rL9`dI)I8B7R74ix4a zTDgVolt|IQN0`)ci_O(4T%f?j$C#oSj`g#JPR;&Vk*_lZ^<9d}v7R!=v<{EoD0QOpZ;shTPa5^lLc7w%wD zb=QP?`@+PRSZ1rrg9FQ9jfdHA=col}^!OfIl2FqscSYr{3fydOi&Lxq7ei&PnRwtk z;#QmSI`VAf^T)`*I=a-bX<`f4gHGBgv#=YsWAI#To4ATW9^raHwfniMu-%2jA2kY_ zUgTX_c(fu9f^*VSrZ*d9`?NV#)9;!nfL4S{mfr|x3~62&S;grm6D1ftk^x4G));J6 zB}1V-GEq@|q1EkQSa~B~ZPW_ZlC6$zXY)voE7o|2YQns}s6`!hK6TDQh(hB#FAR>I zTv_nvKrDR(GkuKi?Ox*uy?-G7n;+lLvD-&78QFzC&IY(P_fZC#kpT*G@HP^}5#)b8zsdbS0hBywB(+Fm94NK&AkKER{wv8LUhRG(o*BW-PgKx=w zi3mzfh|d*#hwr(^2xjmD-!%Nl-QozHFd(8s=sej%K#h3#x;VcwP+7Sco_U7b?fQn^ zl&8!d@*w}lx(AD)9?DOI7*gvV_MV=+XsH}zKY({&1WCG_!UWQo;(UP@f~sw^DvN=l Y5axW&!spEY!haAEx5#s!p&>Z`0fD29L;wH) literal 0 HcmV?d00001 diff --git a/Bai10/Bai10/bin/UseClass/Using.class b/Bai10/Bai10/bin/UseClass/Using.class new file mode 100644 index 0000000000000000000000000000000000000000..9c5c7ee243c2121d1cdcece28c63fbd3a710c900 GIT binary patch literal 916 zcmZuwT~8B16g^W~mM#mFRj#X?(>fCG8FB= z;eMNkLd9o~+1L{i5!jbmn}pcsLNcsYzt|J@RveP1X05GZnPE9iB(dtN7U&BI0FqlV9*AN z!B>8qsY@sP&tuh&W#C~tPLCM(J#pTV^6IgHCn}e7{2-zMXL;D8S(c^@jC_wAN=-3= zQeS}gg~JmRM=0B;SUViy=KIFx5S0_$F5VlW+8APs z;ztvLN(!J8fk7i(K$$>I@@NA^ROv+#n`3bL(w ds; + + // Phuong thuc + // Ham khoi tao + public QuanLy() { + ds = new ArrayList(10); + } + + // Ham them bien lai vao danh sach + public void themBienLai(BienLai bienLai) { + ds.add(bienLai); + } + + // Ham nhap danh sach + public void nhapDanhSach(Scanner sc) { + BienLai bienLai; + System.out.print("Nhap vao so luong bien lai: "); + int n = sc.nextInt(); + sc.nextLine(); + System.out.println("Nhap vao danh sach bien lai:"); + for (int i = 0; i < n; i++) { + System.out.println("Bien lai thu " + (i + 1) + " la:"); + bienLai = new BienLai(); + bienLai.nhapThongTin(sc); + + themBienLai(bienLai); + } + } + + // Ham hien thi danh sach + public void hienThiDanhSach() { + for (int i = 0; i < ds.size(); i++) { + System.out.println("Bien lai thu " + (i + 1) + " la:"); + ds.get(i).hienThiThongTin(); + System.out.println(); + } + } +} diff --git a/Bai10/Bai10/src/UseClass/Using.java b/Bai10/Bai10/src/UseClass/Using.java new file mode 100644 index 0000000..943dd83 --- /dev/null +++ b/Bai10/Bai10/src/UseClass/Using.java @@ -0,0 +1,21 @@ +package UseClass; + +import java.util.Scanner; + +import BuildClass.QuanLy; + +public class Using { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QuanLy ql = new QuanLy(); + ql.nhapDanhSach(sc); + + System.out.println("Danh sach bien lai cua cac ho gia dinh la:"); + ql.hienThiDanhSach(); + + sc.close(); + } + +} diff --git a/Bai11/Bai11/.classpath b/Bai11/Bai11/.classpath new file mode 100644 index 0000000..4f2c72b --- /dev/null +++ b/Bai11/Bai11/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Bai11/Bai11/.project b/Bai11/Bai11/.project new file mode 100644 index 0000000..2d865e8 --- /dev/null +++ b/Bai11/Bai11/.project @@ -0,0 +1,28 @@ + + + Bai11 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272495 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs b/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai11/Bai11/bin/BuildClass/VanBan.class b/Bai11/Bai11/bin/BuildClass/VanBan.class new file mode 100644 index 0000000000000000000000000000000000000000..30bc71cde2681a9d8a0f82f2b3c2979cd0819ccd GIT binary patch literal 1515 zcmZ`&+fEx-6kTU79@`9HF5`vXesSkaPl)va7^aCpBIx{XPGO;u>`<%1ST5GSp{qFS7zW~hPp#eo; zsNC`Vdc}A4_h)vTpzH(&G=bD}=O<^zcY?i{&E4m2tu0^#P47`B*b^9DyExryx4dBQ zo+Yu3 zZg~3wBWpdn$YJGrne#gd5X*#)7|W?OJ3;$#vsK@G7D@ZSt(7FwxMJX=_iBx9#y ztjKqRy>=t4C`=zWk--EHY7M7Vq9s~xC12tBE2kr%Z+%^=EC~p?vt23+B+K6}l~#XP zTiM{Y9xCJU3ZH<7L9<LO{u8_@=OMqo&%G{&`C=`Fk&;`ms zNIgK5LFT4Hq;!U|OtTHu zjvryZXvI%(HI+TY&2E@D#CSJM9%9Hce!<{@E>zn%g1mPS7gpSgy*Ybp>Bl5d!-AJF z#CVh|i*nMGb%hegD0-a2GK?k|W$_6et?*sNr&z^xY#@(sP{20No?<#I@ku29yhI0+ zVTmd;vb?Ww^?it>lIJmzuF;|qVqM1+?HD8a4Ms6CF5xC}w0jZ{$TY>i6{vF(`YBRE zh%?Gg7!U^1T*)6Wttj-dh+C1H_?bn?5y;TG&(@D%-Wr}AzI}o(*BPAPE9LdsKgD0q zok&xGoC_T`+3t|Q##P)6E6YYe=apr;mFaZrKJ_Z0x&)Me5vL?MWDEay6~{c5(6j1- zY~rG7Ye$$YTAFNN;}8Sgu=*OY14SHY!qPHt&i)?1=+Xq80G&`!VpOK43f+4|x61sp uRzr<*5y`p6*{()~8PZ>cHw&S^(*3E>RV~!r2kjL7^w0_&TqKo(2mb+;^!P#m literal 0 HcmV?d00001 diff --git a/Bai11/Bai11/bin/UseClass/TestClass.class b/Bai11/Bai11/bin/UseClass/TestClass.class new file mode 100644 index 0000000000000000000000000000000000000000..dabf93c02c916252a75f1310fc0cc167cdf7fa89 GIT binary patch literal 1442 zcma)6TT|0O7(EMxlo}KY2r6pug1rFof}+$bpn{eH7OQxjCB!z6ZaQhgz>`lt=)cj2 zG9xqo0Dq8=j^8HbW^u;p%%;2F?)lC+-+ue^_xB$FM)6)j6GQxY)tt0>wW=?gRWJCb zAi~hG%GbGWb5YdimRC)~V`#l?3Cp|7(40sX7$TF-iWx&Q+ElclmEl;{5@yaXFPrWn zU$#vG&pHOT3*5EjyuKLmN>-JjJKLB!L#SnL35Mf|*V#P=dC#>(F_SDP=w#>&0={S2 zdfwndm~I=o(4(OH0PXx{)icW~j-!{MNrLu-kd~v*h>GtKs>#cl7&>r5N;t{TmpF7w zvLG|`t2m7_B;WDLjXkh=BDVt;g+|hHC0^0ixub1xUt8PMJbzq^;T$d~IM2`(@Fy1g z4yw3_L57x!#3JxIkHG(3^^$2qMG`57s4zD?X*i`zBpba_FhovG_?EpAmbbvg1Q#)+ zF(SndD!9zh`?trz0n?4*DxH2w?ALv+2`R_sQiF~WIb2t917mb0c%@>B6^7x%2sf~* zqm$)2ZmAd#gm_LUP#Sbw#U1H`68K|1O-l4i^2I-Sk3gxBoSj9AENW9_r!h7MkD{~)0e*dV-j1==!`jKVmPs}vd zVn=lpIl`c{w(p2ycrUc+-OTeU7G&nuAoH{=c3#Dz?5q~UcB)kA2zQIrI$ekK23_&0 zL7~v|{mns5)l3RyH~w913Ms;|rhHM9M;mSn#bbHLcMbEACHwj4?i(>8p)df#rpE+m zqJQ)V(5TQ%r!S*#OKJvN1kX{R g*%5ri3%n$qeQ>daS7h4&EWE}WvXS8}?P + + + + + + + + + diff --git a/Bai12/Bai12/.project b/Bai12/Bai12/.project new file mode 100644 index 0000000..86b69a4 --- /dev/null +++ b/Bai12/Bai12/.project @@ -0,0 +1,28 @@ + + + Bai12 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272503 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs b/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai12/Bai12/bin/BuildClass/MaTran.class b/Bai12/Bai12/bin/BuildClass/MaTran.class new file mode 100644 index 0000000000000000000000000000000000000000..1cd50492d14cec58081be51a6223ed56f711b5f4 GIT binary patch literal 2148 zcmaJ>-%}e^7(F+;Nk~|J6Z(Syk=l}kmM8_PhSFLJZ7dL!*h*=YC9Gs=*kqDTN8kBJ z`oxScYHg__GwO>kebX16@jqcuJa=~qAn0Ur_ujkre&;*qeBZwQ`-dL^j9?`QpFrEK znps?(Eb7&2YF5uxbSnr|pmkk;s;7#&wU)}RtQ&b-AW$vcN zC`(J+4vd?YX-{w&Puv$!CrhhF7z&y-gwYrR18eXjAZP6wf(Qf=l8cCj280A!W=zYN zt8J_pm7Km(G zb0`zHO>51`$EY;ml0egZLAPRdEoK*Lv86CBATDJ{Frt@`qpy3B`N$K48ZP4sbJxpd z!&()H#xn^Q|HxqvCEb9OfbX#r`)zr1Sm4TOvHvH+2yJ>CyB?G1V;ZjE9f1bB>T2>SeD;LIu;Xas_iX7sedsgUB9t+A&PS zhxmv&Jk^UeBm24Z<`luHH0wx&8o;^|VfvFVS!=Sk;_*{zFmcLWm{tBz`hT80H*7kk z<`}~*Q%ill-S!H4iH=d(s2NxFGFTTP+R9)UivVCY9Z}qs-tDJ6Q zbQ|xIdS`UFXK))6Sq`@!Y$~Eh>hWyN7Wt6t09UdcY4s}cBvBYxXw*WWsh%+Cv9(TAYJTvHUQyp$?Q2#ryP^ nQ%{OVbt&$7Qp8yhpYf*O5#=lbM?~2}i=gj~t~SfW@In6vWFL}b literal 0 HcmV?d00001 diff --git a/Bai12/Bai12/bin/UseClass/TestClass.class b/Bai12/Bai12/bin/UseClass/TestClass.class new file mode 100644 index 0000000000000000000000000000000000000000..621ccabfd2d874b7aba82f699768382514bdc62b GIT binary patch literal 1484 zcmah}OLNm!7(F+UEyXB_lMtHlR0;(-0o(v>!6ua0Esa|{(At=W_l?lRqOz2+WTsto zI@4u$?WVi3>7rf2!kK}Y{s4Ydr{~HcF_X-6q5JsG_nq%~_2%DK{{Xmz$2x`tCT~Y> z*_Tn2Z@5vMoOEac*{AZE%=N>GN`l=Ur@il>AJJ%G@%Hb0?gJF!ANFgmS zUiAWZwcB2II}N$+yCkoMj`W+dWk$Byh00*K?7qZRrI9hwOXR-3aP&#|t)! zxu%W@fr$j@#-5+AJ2D8|&IqP3t>fT3Vb_0%Vz+JL5Z)6QQl!&;N-xY;g3WGBR#&!* z8Duf5QaCIyWACeyYbp;%O&r5g_0!>hI*P;9Q9Ug`72U4(A07 zg{Vfb!gg+N4GnzA3JwP7gmJ;rae?Ae*YltBr=cbr9T{Y>h)b$AA2B++Qpq(9d?GNn zV;{G|V8e>Nz;arl)s|LFD{Hx+^1WiBpwiNlwETqZs);3Vgwg>^RBNb4_hTGvCmU_x z`v1Er(aj=CCd&AXlnz5tl(t>nlSnbQkIcXgfzjIApe=J~yc#{sfm6dj05HT8UoKajw>)>j zJvF}t<3$2zxGES_IKb8HD{vp>Z3JT&r-a7hJ7@{X->;Efdx^;{%v4|E$mEG0<`#N5 zv&3cLj*{fJCD#(kYb>rEJ+_651xS4K%RvMot zragS2E??4#+N+7#ws2Kl(!7x7)^399m|-#*CTQ}JkMcIgcRtQ1nZ-ONSeGfz@ia>O zldKS}<1p^w2qccf#|d;f>ObNne#R;MLaX0!8o%QVp2NnUWcUjUN%2KI+ga + + + + + + + + + diff --git a/Bai13/Bai13/.project b/Bai13/Bai13/.project new file mode 100644 index 0000000..a5b705b --- /dev/null +++ b/Bai13/Bai13/.project @@ -0,0 +1,28 @@ + + + Bai13 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272515 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs b/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai13/Bai13/bin/BuildClass/OTo.class b/Bai13/Bai13/bin/BuildClass/OTo.class new file mode 100644 index 0000000000000000000000000000000000000000..1780a464dbfd83640747a668cb53b2abdc9dd620 GIT binary patch literal 1313 zcmZuwe^U}s6g^MT1zJTh@VBm&2Ka+Y%L20!(@0Vq7-sx)g&o;~T?Uq>K2}ZQOwIHG z`cO^h?V^!5JM;G4_uf6{-1F}H{pZIo02_F(pif|Ur)5^lnX2AwCXWiX0-r#rYwftO zUl15*+L?+iAhH6%kEYSuwXL%Z7s9y@`X@bE)vdE+-f5WDSz2Il%d|{qTcAG{FADfF zcG(D`A44hv2ogVMTE=0kc4{;V`f1gWFm_3=7WIZHq#bUdYCX1(Cul6+6hVh4gyeu*w26v23rd4pLfXyjHR2mg3l6 z14_5wsK`oF71z|N<;MZ_1`e(nk-|I4cPOxWlj}WxT=Mb}g|-8|D~f8hF5mA%r+ny+atmC?g3F z<|qM9cv2FDBtT;N9Ak-6h#h4q$?mm6=rjYu0gZ{xZZbA+3x V2#rJwt_aWF%`110SZE)P{{p5r1eO2* literal 0 HcmV?d00001 diff --git a/Bai13/Bai13/bin/BuildClass/PTGT.class b/Bai13/Bai13/bin/BuildClass/PTGT.class new file mode 100644 index 0000000000000000000000000000000000000000..732b7ba9aa1d7b3545b93706d61c9087876a880f GIT binary patch literal 1734 zcmaJ>e{&L76g@9OcA?uQ<_9Jem1?y>8rRnJS7L2zz=(-4Ei`I>zrYTx14{;W9s6Iu ziC>}Z7@V;){Q&(?ou0c(AOxqw413?Z@7{afIrqMQ{(bc~fHl+&OexIV4%}9Kv!#1I zd#}1xH4syneWIUgyQRH`{ovq^>1;R%kL}1Ham4Ei8GkBVBt+7*l|5)H)tO?-KsulIZ~oi)2)5ob!9!+ zjQLHsr*L-X6kt}*=O!_gi<5i#{R9-wS%_m=tYr%ZOtId!kU&zb^A_H~w1VX|^dzTPIp7{y@SgJE{#!E`L*XeZ42+>3NPIW$lhWE#_ia9WXvaT zj&5(5c#j|wyR4LbsykVsINQ@+_F16)^=uM(tQaUL%!ibZM_YIwt7QIA60*W;ILPlO zVdDb>*U4L$;v{?vAL53B={e7Qkw9S~m!Blf#77ECBal>j45N)tEPRU36b#8!7BE!0 zY=X+njN;f8awQv|TeyWU6q0hh*aW!v zKT6O~5>))ZpkE~Dz7B-c>4xLeq!N`*(5*RlTp7NEyaLyRKlV1I}IPx1>Mh+!6Uw5;e5=CQz)Bv|CXB>0VG zC2d*~6jqLqDrAnZRLCE3YdL;|%qVL*JUP#-3!LFa#;2I^9G0;ZR#_uBW*SrxORggD z(lY%arnF3dc-6E_e|Vh>xHv%boE|~G{U@?>SNq5nR{FR`P_kYdtUo3`*?uUS>x0dk z#5>&lauj(2{#BL+G6Zs-v|J$Qi@1U;R>}T4F5xyV;~t+9AuJWa7+z(Y-c5p3C=R)Q zP9o%T4sra2(&M?UmnaurAl1iq9}oKY=GgIV?X(LKzb6AlR`lS z0dFuq;*5+lj!%rd>1aCI(ec@T;k&=Vy7tLQlNNkPvM=9W-}=^f$zT8e_6LANc%&g9 z&^A`IGs)u_Sttygk50u;$29~6HeQtrav&p})WEs9t5(7l2qX&v;iz{}bnVQ*v3y=G zM(u(d5!ev3Q;u|tc}t+{MK;6H8b``aWQ5NehHb}oM+EA+x~Bz#$FoUGM;)3CY=Ewz zRiOO^4t2DkO__xFrfa-=dIJPD8K_5tKx@=?tjXg1oRyEuxeN(~qS=JZOv}8j_Wohe zP1_8py_Q#50P<>d)7HFVN!YGh3y*pCv?9=HU^{k@x=bc1j30H4WRdQRR4qs8+Ma_D zFr2i^osdpCCKG9aj#|}X3F$aiKB5A98Lw#AyCx&C#e!?i8+a96be}EKgP#{WJ1~{E z9XICYEjb@)M32DENjfqYWY#QX%}g=tq|98}`*Cf{88UVBqF+N_Me4N}1_m%FP@hw< z>%ycL+ewk7jsrNP;UFWeX3G!4z-u@xpgGn}cU(a*)#K{H5d%jtM6K10%9+x-yIeb- ziavZJhDmKTh$JO53)E~#5g#$|rsAi0{4$P)V*;D2#aqVkO3%tS;y87jss?Ym=_2DF z#Yt66gKBl!z*`t+Wy)O6a+ugo*4J~Sd_W3(mKA7bB*~0oLcN_7=&P-Tib(&9pgwI~R|L~>5zRU--t%drv1)5{7OkA6gIlo0)(=5<<+OBko>N=La zgDk7YcCEa0vw77zeuBKIH13~Ans6Nj4KxT<{a0=cxG0i@s=f7fR~~o~74;1RH=#3b zpGhS~g?-DwZG6bmOUuHf2gAx{#|Lw6ikO;f&!4rec?EOVz$Yrb4Jpf=kVPH$@u`Lf zYn$3@CIg?TnbKfgFUkzZQ^UM0azLmVw!WyTp&rW?^9k#et)^U4d3yCLJM3Z->Nw_^ z0yP!+t8o`VBX^wEP)Tay$q59x0zy4YFnX5JGP_Yncnj=+V_>PZKjH(dp9BaZ}(6-%9cI~-(V+9;t2BJUB(l? z({BUup8bS9q3#m)5p)0HAirOqQAd#y-l#iV{}d0nTgK>YXlw~5!u7!`C7cSKDIr?I zIoc@OxBcfM-s|np2#W|mN&%(TR(|&KGq{ZS>=LFYo?_QBX1JW?vSS$+xxB<>Q^lZ{ zNbmLZmN56AUWDtz!S7dYt9a|6l$&Inpf-&}Zbv7!@gHLsc5r0v#A!x)o>68v;az&Y z!Et^EUATuHJj6bHg?>E7emucJe8+b`aE>bFFHt?Jv8vfKBw;ZEmp+wx0isk^4_8-@ znY;3B6w~+sDc-c;Tco)PlF=jBT-D<$vCl$VAa_6j@QB91wO_gzg5wHO_3C6zt3axDLVTq zJSLdTJLGcj8)#fE@WP|?ca>5Hg#xE`7{};xj0qe?A5MC-OfSOz)%5h^b9_O+VYGS# Y10KOmWr9IZ;`?QeTWIwqaRYexA6YOCp8x;= literal 0 HcmV?d00001 diff --git a/Bai13/Bai13/bin/BuildClass/XeMay.class b/Bai13/Bai13/bin/BuildClass/XeMay.class new file mode 100644 index 0000000000000000000000000000000000000000..9f53d78f90ff939ea60792d2fb9f9aee6055aa0f GIT binary patch literal 1090 zcmZuv?M@Rx6g^W4+b*ln0!1v8qKIu#s)An>QK@2@AR%c}HU1jPhOQ~Q&2~%Vu{2r| zO?&_!%6MkFLJ4M)`Mh(^x#!;Be}4P|u!d~|5rOfouG2aww`8YNd~d&%CkCPdV*|H) zwKp|^Si^GF0-hT}THrod1xUl)j$y#w3C5JoK+h!J4NaqZpi(Z221x z4V+f7+K{em`=xwcsYqFvz+@cPaNWQRlhlDN=^hrVC!N4PvXI6s#d}@mGu6j&yyBkk zxIs1WZFy9RA;YKmE;+Nu(#w{~o9)nm^{k03ZWve)n9#r%e_FVSMSLe9W#fyAXGEaXuTFkJg{P*D){xME@ncP!k+3TvTWl)(a%xqM&!AiO}N)1bKj z_`}LH9owxnoqt9uzg8{WN6f%Of$0IOv{+pk+mGQfD-gfn!Wy2caxa?frjmsXJY!?X zcH4Fj1ZG*jOVUEHlKS!7!V8^E;L&p0qHNu=P*(04+PxObY*xLl->|nG)kLOljuoX5 z3v7)cb~3Y7{lQ(7dv+h^I8Uow1=r!iDa_vB}<85GlrNSL(Ftx`4m%MF`b<2VZN~3 z!!6=-S$=m;k|aEkBFr=i*vyz2AWEMRrBTE^O~fjOM0?r|AVcvF$nz6xACiww@uct# hi5}K_*zDouIafcSIsVFE4)X)nWX`O4MKuw;{tGz$&a40c literal 0 HcmV?d00001 diff --git a/Bai13/Bai13/bin/BuildClass/XeTai.class b/Bai13/Bai13/bin/BuildClass/XeTai.class new file mode 100644 index 0000000000000000000000000000000000000000..4277a1bf5ca95916656984b628815b3350afa687 GIT binary patch literal 1093 zcmZuv>rN9<7@SiI+b%260!1v8q6lqKs)9F)H>miB5Rz`H#$QX>&|{X}X1gW&SQ;&f zCO&`#0AC&b`R_~ zwm>2Z1OJ%k0-`D~vL$^PJr@`%6zc-?%WD0v9ol~dWiKJJq zH5}h}!%DHPRAeknVk(L2xM5(HMe2*5;~$r6pWBgpVj+t;iVr%Gz;q8s2IYfL`cW+k zUFW2dK#oVreRAecoglC4&qt2j%$vyLrh!F)Ne%q(OAEKKBrx1kV1($)?6F7OJk~0g zQ82I~kh)TYg(6AQH$sFjXk_3K(P%h_xHk_aBSc zoThYryD87TRFTgat00^kv4N+m<4Yz3Rk5&zXUvAv zYPtTAz#KbxMOq)MqF%hP@KRS31$3RxC}+1V>?i{bZJ@_ao3)@5Hr!pQa%Ad!tSOCH zWIBczW>%{r!daYi29W5IwiFEL|2T6c7Y;QN*^Ct^$5hM5U-PR>ZWD5P#h+H}sPIsNG$H&*D?a zk2aCS2k@bcb6dVl`E&2iotZOd&dmP#`|CG=RlLy$cUh?;ajy@y}B+$<=QkI_Bj@+7PR(Z`41YY)S z?(FiWRQB0pJgm!rVZ7X1xk#ukmmb4p=4<(qK_zTT@1U67)iBC1+HpjobgYWaJx?@~ zNMl07_Ucr%jD zepju}<(=xgs*V{X)p5swi8%(ttMkSd_v#gH*Hs%`ysKoX4V7`vz)?w9eETqEHR`za#7P) zvJF^x$dG6#K&o&?vor1sv6V2(23D}jFyM*fP|cSHm&x{yMs@VWz*B{)5rGduS|{)`dZ@_)*gqZ>3ts z;fny*6%r%rCZZJKw_H6Wkxmwy;R{qwV}s3yZx2><{9 literal 0 HcmV?d00001 diff --git a/Bai13/Bai13/src/BuildClass/OTo.java b/Bai13/Bai13/src/BuildClass/OTo.java new file mode 100644 index 0000000..cd597e3 --- /dev/null +++ b/Bai13/Bai13/src/BuildClass/OTo.java @@ -0,0 +1,34 @@ +package BuildClass; + +import java.util.Scanner; + +public class OTo extends PTGT { + // Thuoc tinh + private int soCho; + private String kieuDongCo; + + // Phuong thuc + public OTo() { + + } + + public OTo(int soCho, String kieuDongCo) { + this.soCho=soCho; + this.kieuDongCo=kieuDongCo; + } + + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap so cho: "); + soCho=sc.nextInt(); + System.out.print("\tNhap kieu dong co: "); + kieuDongCo=sc.nextLine(); + } + + // Ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tSo cho: "+soCho); + System.out.println("\tKieu dong co: "+kieuDongCo); + } +} diff --git a/Bai13/Bai13/src/BuildClass/PTGT.java b/Bai13/Bai13/src/BuildClass/PTGT.java new file mode 100644 index 0000000..a99393d --- /dev/null +++ b/Bai13/Bai13/src/BuildClass/PTGT.java @@ -0,0 +1,50 @@ +package BuildClass; + +import java.util.Scanner; + +public class PTGT { + // Thuoc tinh + protected String hangSX; + protected int namSX; + protected double gia; + protected String mau; + + // Phuong thuc + // Ham khoi tao khong doi so + public PTGT() { + + } + + // Ham khoi tao co doi so + public PTGT(String hangSX, int namSX, double gia, String mau) { + this.hangSX=hangSX; + this.namSX=namSX; + this.gia=gia; + this.mau=mau; + } + + // Ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap vao hang san xuat: "); + hangSX=sc.nextLine(); + System.out.print("\tNhap vao nam san xuat: "); + namSX=sc.nextInt(); sc.nextLine(); + System.out.print("\tNhap vao gia: "); + gia=sc.nextDouble(); sc.nextLine(); + System.out.print("\tNhap vao mau sac: "); + mau=sc.nextLine(); + } + + // Ham hien thi thong tin + public void hienThiThongTin() { + System.out.println("\tHang san xuat: "+hangSX); + System.out.println("\tNam san xuat: "+namSX); + System.out.println("\tGia: "+gia); + System.out.println("\tMau: "+mau); + } + + // Ham lay mau xe + public String getMau() { + return mau; + } +} diff --git a/Bai13/Bai13/src/BuildClass/QLPTGT.java b/Bai13/Bai13/src/BuildClass/QLPTGT.java new file mode 100644 index 0000000..6c23621 --- /dev/null +++ b/Bai13/Bai13/src/BuildClass/QLPTGT.java @@ -0,0 +1,70 @@ +package BuildClass; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QLPTGT { + // Thuoc tinh + private ArrayList ds; + + // Phuong thuc + // Ham khoi tao + public QLPTGT() { + ds=new ArrayList(10); + } + + // Ham them 1 pt vao ds + public void themPTGT(PTGT pt) { + ds.add(pt); + } + + // Ham nhap vao danh sach + public void nhapDanhSach(Scanner sc) { + PTGT pt; + int chon; + System.out.print("Nhap vao so luong phuong tien: "); + int n=sc.nextInt(); sc.nextLine(); + + System.out.println("Nhap vao danh sach:"); + for(int i=0;i + + + + + + + + + diff --git a/Bai14/Bai14/.project b/Bai14/Bai14/.project new file mode 100644 index 0000000..779a42b --- /dev/null +++ b/Bai14/Bai14/.project @@ -0,0 +1,28 @@ + + + Bai14 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272524 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs b/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai14/Bai14/bin/BuildClass/DaGiac.class b/Bai14/Bai14/bin/BuildClass/DaGiac.class new file mode 100644 index 0000000000000000000000000000000000000000..a310e24034e1ff688ecab88561519c9aa68ee549 GIT binary patch literal 1601 zcmZ{k-*VGN6vn@m9m{r<#Bo9>u}uYq;F#Ek0R5Agq~H{4FiEIAndxwYB5NXnBV}xv zDfc`;U!hmr^rjtfX4+04pm+2|`T{NOw~~lql3sYVyVCj2?|ggKf4u$WcL3MXR-p(? z-yS&KPQ7dN`_&EOu49-g;sTi`#xtYZHQc@G*6tI_^aT=quWq=ufM^J$o;s%8wg;Xm zpgiJ6qUN}cza|hXF761#>t4r7BZdhLDWp>nn9?wYgq%%lP?6+L({ZiM!Tzq*Ya6>= zOCa0yOryJF^c=a4HsikS^aW;`$52<9sMwJCG}kr`+P3HJwH;SruGkC;82C=N+A0cF%GBmfy3C{naFN5^ge){>pQ<8CFpP?iHbnsh^6D{9mCPhfk7rS0H`yK1pk=Jf$S(!T zC)NMI3NrGxhB`I`lD-$>3d|OdCnc5AXE)BAaPsU~M_{7m8|Kpo?31wBrfkP@+qUzr zZIZap@QujI$VR1}-7;4Y0<@HI90|MxcvVv#QzN8W$WBBV#_68fHmuD!(4JLo2% zb0PF5p(Spv!V&`d>I)%qA@iRj<~ceATp;sB9@GM^@wvw9K5}(E;!N{TS<;CS-GnG| zxs4@`vNN8uFlliiR+DB<$#j`~<#BCf*I&6G`9bJcn0tu@m04|to|Wm^mG?Xkal2HDED#SPezM-yy)_=;bH4Fd% literal 0 HcmV?d00001 diff --git a/Bai14/Bai14/bin/BuildClass/TamGiac.class b/Bai14/Bai14/bin/BuildClass/TamGiac.class new file mode 100644 index 0000000000000000000000000000000000000000..7237bacafcbb6f7e8be1eca35524265509339600 GIT binary patch literal 1429 zcmZuwU2hXd6g{(Rd*jW<HIeA$ZB_9YX08*k%yU3(pg zcclIWUXdd4f>eQuK@{}|@N@cJ+B3VWB#5juGk5OXIp^Fvci+By{WpM1s2k7(Ca(|N zcC*};{eH17cUN86Fc1@%IO4BJYz7238a3Nd$QP;o$cbf^jj7_#RaC^|E=e9$yRa|GITk(#&-PrYJm9@ z9g<^Sy7eO3mo1lD0bnX3ZP)8qN(@^_vy-k*#jxEL%bk zIw4MrP0iWheia%mU?Tq#Bl*M&nEAvT^954R=+rRDc@idc>`wCZHVtMk~5Z6Q5 lL)gsb}`v=+|QtAFC!%gTzl9}_Jv(GvE?DOT%hrj&}pdYst_yoe| zY<(oJ*>-PAw;lIMK|rA4vUW}D&1+`1_sq;?J?#kiGPXc-+&w5cM!xr?Woh$q!**f< z)k!03YEH@01v)qL8H^8?jC{t+r4_~uEgc(TS>Vd|5m!i;XEw3$3>3df6SEkC7MhJ5#o z0Vij$r>6Ku5@cacPA{a!1hz#ttG#_nme8uA4ZB#pmdTKvXr=Wvyv5otkUA$T(`>>3 z)0jDJb~Gu_;sv|hCexZ}>Q+ql^#q<&uy5T=lJmBs7gX#=l(~x~j>nsfQS3cy8K#qT zEL|(ag6I%von(s0HLV!2i;;Y(Xl5ghR)}Odf`Lc~UFcEJy-f3Z02RGBAW$_cF&}A= zDGW2q5<}=izk)*oTURILb)e!fjtD5GKIcqG2#$F|!BeDlRbmw+mmb{;VnCoaam zhKw9jF^&m=pi`{)bE46WX=9SlXH~={ZHh}<-c&G232q#J2np26ujf=ek39ma6hkV< z38f5E9;8&9gItR%j+7$FyAZ?+0=tGaGa{WMwq``EqR|r>*XAphytX^UWw@YX2OgvN z>@;V)W+#`mB_K?G*po2Gc+%0*R}xHL*_fbX6cXB8YD~&Jts(=ikw2@uDp<#N<$_@2 z31n5|K(H;2Vdh3tZo#7x;EIa8)Iq>Du5-QXV5%r$mUJ49ZfQ=@k_+I`>2AP;XOGpu zf}?(PO%scTNfJVG2u#;|Ae+PuVkUBw%cS|z91lWw@bpv{qt zQQEj4@`fUEK{LowOZ4Ifb$HA9o{F1zpFB&y)h(PbXG_alC>P{Iso#$TwtLFso~?C} zTf`yAuTNF%#-1QP7uXwG*@JX3k}-5M;uz^%Bwuu=?^I+h@TCe3A(`fD72n8CtJ3+R z&4~pxD@*DcHz}VbU(E}IlEsph)=wMqo~&E>8|aZ_vk=aZ{}=R?S1W%NzWEU38*hEc zdTVGIMSxF0xMKlo$0F*c8$t_c_yvtWyZ+7mu5*!U>B*}b^=P3@twdoPw)0I$#d?Ut z%;KXh)bRj~on`Dizls!cPa2uO$wg_YczP&|!Q+S!M@S+oc%qegtB9ArkG_(OC5~XN3!$l>3R8IKF=b2U{bkJjfkYXvjt7SBA-Z20+g6OXf8xm3S;lYr zMVmC0ary4jUzMlA0BPR2Bk(J(3J`8`e>V|t-GRd2*QEWrz@4RkR+;NyIY1|6(#0Wn zlb0SG;qxe)x`;!(j{14k^l^`mx{P(OXu$RutLOQfc#92frLSbi&!}45Aa{P3ryZ#J z7fpV#+qcB{0O|5m+7<{>-d(^4@kI#g;bT`1pGYBmRuRG% z)W=t=BHiV#$^h46kOO&|0zb~|C-`?hj3`Fjs%13<$G7;7zco}wWzLN}{hkp%mhl5m He7N-=2~ry+ literal 0 HcmV?d00001 diff --git a/Bai14/Bai14/src/BuildClass/DaGiac.java b/Bai14/Bai14/src/BuildClass/DaGiac.java new file mode 100644 index 0000000..3885978 --- /dev/null +++ b/Bai14/Bai14/src/BuildClass/DaGiac.java @@ -0,0 +1,50 @@ +package BuildClass; + +import java.util.Scanner; + +public class DaGiac { + // Thuoc tinh + protected int soCanh; + protected int[] kichThuoc; + + // Phuong thuc + // Ham khoi tao khong doi so + public DaGiac() { + soCanh=0; + kichThuoc=new int[soCanh]; + } + + // Ham khoi tao co doi so + public DaGiac(int soCanh) { + this.soCanh=soCanh; + kichThuoc=new int[soCanh]; + } + + // Ham nhap thong tin + public void nhapThongTin(Scanner sc) { + System.out.print("Nhap vao so canh: "); + soCanh=sc.nextInt(); + System.out.println("Nhap vao do dai cua cac canh:"); + for(int i=0;ic) && (a+c>b) && (b+c>a)) { + return true; + } + + return false; + } + + // Hien thi + public void display() { + System.out.println(kichThuoc[0]+", "+kichThuoc[1]+", "+kichThuoc[2]); + } +} diff --git a/Bai14/Bai14/src/UseClass/TestClass.java b/Bai14/Bai14/src/UseClass/TestClass.java new file mode 100644 index 0000000..e590615 --- /dev/null +++ b/Bai14/Bai14/src/UseClass/TestClass.java @@ -0,0 +1,69 @@ +package UseClass; + +import java.util.ArrayList; +import java.util.Scanner; + +import BuildClass.TamGiac; + +public class TestClass { + // Thuoc tinh + private ArrayList ds; + + // Phuong thuc + public TestClass() { + ds=new ArrayList(10); + } + + // Them tg + public void themTG(TamGiac tg) { + ds.add(tg); + } + + // Nhap danh sach + public void nhapDS(Scanner sc) { + TamGiac tg; + System.out.print("Nhap vao so luong tam giac: "); + int n=sc.nextInt(); + for(int i=0;i + + + + + + + + + diff --git a/Bai15/Bai15/.project b/Bai15/Bai15/.project new file mode 100644 index 0000000..539edf9 --- /dev/null +++ b/Bai15/Bai15/.project @@ -0,0 +1,28 @@ + + + Bai15 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272534 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs b/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai15/Bai15/bin/BuildClass/Diem.class b/Bai15/Bai15/bin/BuildClass/Diem.class new file mode 100644 index 0000000000000000000000000000000000000000..4d312504b9f44c2dd2b9464ea0c96a6777ac49e9 GIT binary patch literal 1406 zcmaJ=YflqV5IwiF-L@-rU1+!1ZjJmZqtRkC z@dx;$jAypBMW|-8cjwN%bLPyM*`L3@{Q$6vry4v8;f;n>E~Lvwy`IciW<`TnVQAlY zXC%vpT}-~*+c)!$f_l$4!}mzRzh>E%v#!t=jqNIU)763*LLYP;0R)3k7}Vi|U#uY= z8vM+YwQTc6qq1k#c8tBUsSwFl^G12ss9CaaJH1ZHsw)g&}B{U8X zO}n5lMdoKNw~hz(i%265?%S88%{|_2Ak5Vw>8Qx z{bM&h1r`|Et~P3UbIXz;2}<*pC6rxalQ_8^J{&IB;%M<3;0XthYlyo|-ctOA=3_ z$6Ux+mvOiaNdT95D~)g$rsJ4sr%AFhIrGIoW8eb~4}`DZbxxk(=<9Gihsk#EI>AI9 ze_Z%=s|^tam}cS`7h&Ap`#Y5UZAuE~dlCtsCNkHP$c5fSPRQOOvcPnU{~#iYa9T0d z>1B?JiXw?mnEsCWT;$3z7Db&V;*sShR%nOCzCpW*n@!w3U3mg={y5$KCOX=!<3U@y vH|({jlo03y-(tr&kPLK%#nmzn@?Y`rv??nnYWkCcfY{-BRWjGyWY`C$QEHlOd8AhjGxNu)svvuo0dGXq>E2w>i`NJ#uwZOmFW4ywrst|u1w1fT=1wHRJ6pU);*tei# z#zq2`!t7zt_FoMyntu1lYlc3XA9h+^*zmf6yhlN!e;V`@oU5H8GB$gZzZxGA{5#+_ z5}=}u7~r&SKYQEC?MV#P$36Z|o}jU4Vp*)O;O z=WjT-M#+8I(8ytuR*_vvgW6I2DSw4r7K+$3v7wNhF8-z0KebW9LoT!TuFGFwl5=eb_e?lb()i9crW8VJ4|Vc5si&3R{2da$H4=7Iv*2jv@u5W6Pl0Y zOHi>M5&RF01GlqlW_YiioM%i|OeS`6{tfF>(DCZB1YIFSj*VBbMHGSE8LhQGf!&+H VmL{;d2zCo8)(O1AHfuGMe*=$WpIZO` literal 0 HcmV?d00001 diff --git a/Bai15/Bai15/bin/UseClass/TestClass.class b/Bai15/Bai15/bin/UseClass/TestClass.class new file mode 100644 index 0000000000000000000000000000000000000000..5b8b3e00e04da149fdacf89ae3a0cc139c7af67e GIT binary patch literal 1312 zcmah|Yi|-k6g@+MrRz#5k5<%}mHL3T6rWY0)>^RDN*@YE(N9y@!Zz&Ez|yooOFuv& ziSe`l#y?=Zv)cy^B$BXmXYOOpJ@?G-zdwEgc!JLoTnxe8ww7)1b~{zn+Lmoea5DrB z_z_PvxLHeW?;U6ri^033o4U2kFcwdg7~I)rRg*D>aRnZD87A_&scm(PJ*`#bdku|> z=bIJYDDjpq_NRw#tFE^h!ujEwGgQ^!y2&sV|C+x*P_SCMS<56!5+)g@ZHJ{DTdAB@ z(GA{MYqkt-`4A#(3o|n^0*DAuQw)*#=sMR3?`lVHRGsE?x@O3j#&wZ)gTWKe>=h&lEhz3v%q+lnZ`yiD8CCp^Snh zyrfWmc&M3GhUBPG4CS68&4?1O6s+JigU@O@ZIEo@Bd^Qijf5OS$kxVXN))UKB}j*Y zrH1LlTZWr74O6xBN_`{^F>EM!f6hRzNW$c;8p$>^LYEA#>OS%6^fD|=k~O0)CWnSk z=d1M3QUR+bp2UD$PW42&a-rF2RkSr-JSqSAGhGm^;x=eFwj^C-(L1ECMEex2j8@NV z558|?xFFM4xB(xo&{uH+XuV3iariMoCnEU|#d&Ex=_61M27838kLj}C-$Qg$SYh0p zAbZQPZ-t@KF756kR-R8r-96k%d%oj-AIWks)x*QNsHclZT`YEy?qa!%)idw + + + + + + + + + diff --git a/Bai16/Bai16/.project b/Bai16/Bai16/.project new file mode 100644 index 0000000..821fc3f --- /dev/null +++ b/Bai16/Bai16/.project @@ -0,0 +1,28 @@ + + + Bai16 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272546 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs b/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai16/Bai16/bin/BuildClass/Diem.class b/Bai16/Bai16/bin/BuildClass/Diem.class new file mode 100644 index 0000000000000000000000000000000000000000..65dc1184993cdc3b619bbd98b71ca3c1789ab25c GIT binary patch literal 1406 zcmaJ=YflqV5Iwi_%|fBPR1gtV`T*(!pG8z!P-A^05Mn=>rQNg(?H1dukzZvrT8t+C z0DqM6%yuocRI}N;bLZYUbLPzK&tKnu09eJ-06Yqjjiy;CW-5B4k;Yh>G(f2BbLNr$^=#^c)Zpz+udhN2=P#Dei&`K-#V%e;du4LG+o!q43 zZ8#fmtaFraJNX$bn})ShHl?f(W-%AQg}-XsK5E!TRl`Nh6R*}}nG-pubhDOvRW~hr z+pZgWH66eug{c!!=r*mAL(!-QafPzP!dO5|1c(zQ)`oEuY+p{tcjZP>!xEM$p?-L1 zSVe^yGCy_MMNS8iQt+hbB=VX>URPM|hy5RfRg#Mfz%328aYrF&*V>d6#$%^*r^C31 zwE(F2SRXAk+?NUihaykKVkNd|m7iq<>{Qd@*)Sd<6Tk*X;zYjZx?R?g#iq3CZJn}9 z|JY4Wkp+ggYt4GW*fM2ELejhy31yeqBu=h}4~NUKI9mJ$dBVZt8s=`3w-mpT#4!dF z!(T8YOXQ;yFv>LwFV{h?8iR%~%qL2Z)(*oM#<>&72^TU?NFRM|$VGvS_kkQC9Cw#XJ3oM0$zL_9ZgipGcSNZ6fnbx9|@lq6nuI zGo4=Msi+j6{Dkx0v5=2mKE|S`(?TM;(!y2R5wUO3ZsBGNcY7;eL;|rc%E^v)>v-U5 w_lCU|m68ITn4l5VjyRQ%WUIG$>@nApN z71#FeDmSeMr|mPueY?kyszoFgcX~$*u~wIXT{6hW+~fWUy)Bj+3{thuX4K`RF>-1aqZfhwOW{=Zsrf1$$hak+t`vUi*4}cMx9aj~a*|PQ`=deI zIp@N{;sm`f#)Sg;jni~v^pXAGMCNIi=!Pah>jFhr)DojTSAK_D{)E=lw09V9SSrWg zV7>&x9Ia^*f`k%DQzXqo#WH2ou^cN{rAVOHLUfZ#3k!OH-WAC88Ay$gI>`(%{Q#LC z%R(dpf)0dBUHkyTGOS}GEOQWa1SlD7mS15$b)V^F48pWbZvZo5RGAvhPYH)1!N{O6 RCd}rnMmWZlvlUd^{sV&RZHNE> literal 0 HcmV?d00001 diff --git a/Bai16/Bai16/bin/UseClass/Test.class b/Bai16/Bai16/bin/UseClass/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..1d77946b94b88e65a88f06278eeb72d1c37897df GIT binary patch literal 1197 zcmZuwYf}y>?UR=n`z;tAR4AG9buJqmR)CAocdYy0cK*R zA5j0P={<`i2F$SM^4^~JdEWEu&ySw~R#A}PVHp3=&~gTEG%`i4;Yjc@1W)-n&luc1 z$s8P=Y88iJbX_-fXMQ8F@k^sA4VA_^17+*H|s~5UF1iG#t_O|6>gNc zt&8);rPrzH4dH#IXqFPzxo$GVQlIjd#S4zDnDD zjvrxywK6v+BZ#QL6Jv;`hUb~4;#*DKsCHXcb*(E@6< zM~abdsvzj0LdriP!?8=AfUl+pxe|${g3g4h4LSBo@W z+&-bX3lEtt22b^vA>Qp{aJ*)wj@w{~K*QG?Q@6fFEPDSGo?gj?*cCYnZqQ{!M;9 zy5k)L%b`#kk$eYJ<%tO5ZCu|A${QUd%1bkCB-gy(G1o!599nE+c`@#7VWou!Ej(^v zt%Z%AHP^Gg>bG73OSq`V2;?|o1SL-MHIERf6~<>oT)?YcP}spPfs^qOZ}65N$LO2K a9<>-J+dl0_DE2uHa0oBi-;uWm@Bacd3Jo9t literal 0 HcmV?d00001 diff --git a/Bai16/Bai16/src/BuildClass/Diem.java b/Bai16/Bai16/src/BuildClass/Diem.java new file mode 100644 index 0000000..c224a65 --- /dev/null +++ b/Bai16/Bai16/src/BuildClass/Diem.java @@ -0,0 +1,46 @@ +package BuildClass; + +import java.lang.Math; + +public class Diem { + // Thuoc tinh + private double x; + private double y; + + // Phuong thuc + public Diem() { + this.x = 0; + this.y = 0; + } + + public Diem(double x, double y) { + this.x = x; + this.y = y; + } + + public double getX() { + return x; + } + + public void setX(double x) { + this.x = x; + } + + public double getY() { + return y; + } + + public void setY(double y) { + this.y = y; + } + + // Hien thi thong tin cua diem + public void hienThiDiem() { + System.out.println("(" + x + "; " + y + ")"); + } + + // Tinh khoang cach giua 2 diem + public double tinhKC(Diem d2) { + return Math.sqrt((x - d2.x) * (x - d2.x) + (y - d2.y) * (y - d2.y)); + } +} diff --git a/Bai16/Bai16/src/BuildClass/HinhTron.java b/Bai16/Bai16/src/BuildClass/HinhTron.java new file mode 100644 index 0000000..9ce4ee9 --- /dev/null +++ b/Bai16/Bai16/src/BuildClass/HinhTron.java @@ -0,0 +1,28 @@ +package BuildClass; + +public class HinhTron { + // Thuoc tinh + private Diem tam; + private int bk; + + // Phuong thuc + public HinhTron() { + tam = new Diem(0, 0); + bk = 0; + } + + public HinhTron(Diem tam, int bk) { + this.tam = tam; + this.bk = bk; + } + + // Tinh Chu vi + public double tinhCV() { + return 2 * Math.PI * bk; + } + + // Tinh Dien tich + public double tinhDT() { + return Math.PI * bk * bk; + } +} diff --git a/Bai16/Bai16/src/UseClass/Test.java b/Bai16/Bai16/src/UseClass/Test.java new file mode 100644 index 0000000..fa722f7 --- /dev/null +++ b/Bai16/Bai16/src/UseClass/Test.java @@ -0,0 +1,22 @@ +package UseClass; + +import java.text.DecimalFormat; + +import BuildClass.Diem; +import BuildClass.HinhTron; + +public class Test { + + public static void main(String[] args) { + DecimalFormat df=new DecimalFormat(".##"); + + Diem I=new Diem(1, 2); + int r=10; + + HinhTron O=new HinhTron(I, r); + + System.out.println("Chu vi hinh tron la: "+df.format(O.tinhCV())); + System.out.println("Dien tich hinh tron la: "+df.format(O.tinhDT())); + } + +} diff --git a/Bai2/Bai2/.classpath b/Bai2/Bai2/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai2/Bai2/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai2/Bai2/.project b/Bai2/Bai2/.project new file mode 100644 index 0000000..08f6d3c --- /dev/null +++ b/Bai2/Bai2/.project @@ -0,0 +1,28 @@ + + + Bai2 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272553 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs b/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai2/Bai2/bin/Class/CanBo.class b/Bai2/Bai2/bin/Class/CanBo.class new file mode 100644 index 0000000000000000000000000000000000000000..80152b82315858554687ac3a985c8639300b0d33 GIT binary patch literal 1619 zcmbVL+j0{}5IrNy)@oU7W6MGo7q1ByX>C{s%*`?vTLcW)hD3_1^0=0!v_r|eE@_p* zZ~2Kl^9w*>QI%BX1M*Q6-LtYJBAy~u?M%<~oIZWJ``<5r{R3bXzow87I8|qW?|08_dO^c|wf{!eB7t!~tja)OW_xf~iCQXXlmv{R;T=^};M2CDLRHn< ziMsO2z7m*NSAmKi3XBzsdjiRFSeGWoFloWWDS@eN70BJr!MrS$(!ihF4Y%vl)61ntpYRwi%v}=@79BG&k6?)27GN}6MMC}wFP>ufEj+-6Ttjm^xM*`{e zR$s1lY;e0Rn^;HL!V~;Njp-d8%AhWA{d)q9q}zioF~l9nCT}2357WSCQ)2T!M(=fNW^feX0UWAi7mVXuvkSeUue#WiQC3!;)?`_{nD zvVD7C=h(hGu!l%rr7$2O28EfXKshYX@Y+<}MXcZw?$NwH#$}yAHV)oTU<3EDM$`mK zeZ}8t%7CPhe`Ec(nTMb8*!hG^7n@x??c({##dds=9l6+zFLEOnuj7k+|6-thR%=@z xt&6w`hx&2}bu156SN5y>3wgxVbv1cz4hNB#RCQ&0-{w+7m|-f| zk8Q}GfZv?DZFjU$rl<7;i}uR;+Vjc4h>O;#Ga7W ze*fsu>el(8V<{N7$(;u83bhV4!=5dA494DBE>z${{(RZX+9@;?)uf`DVt99Hl?sg* z80K|EFv$?HUC)vXQQ79lH6d*Z+rkxfKb&j{UbO{-E^Xea+vEcMU`PjS`krt~wI-L+ z>Xt`@mvmgg)fkqsq9I4Bjrnri^Q^fj04apBy3^Hx-CvbQszC@X^x{Bo-izo$>5J?r7xV8)s144<}_9r zb-95p<##cT4Q%V!!E^e_I~_~57}hT8>m17fx2zy4I;wtSo;$h|O2=0^c9mS3FPB4Z z#%pfB+q8Ctx&hNCS8ZJ}#tO~K1l>pKT@4IHVT$SY&^tz}2lQq1jhI8kzfcf@PVYE< zfhkI!rU$g=Ct(H&S}6d7-U`4AU=6dlx|RtKF>7Wb-!b}o$~RveJVzP z2SQ8Jj;di`fg)Aiz#>J8ynzfwVLwt$L@1MnG+@x6Y?Yrji$h%difr=c0JqKJ0IO$s zBz=ShI=x67GMFa})mwUW`jkr=_XAnT{Gi5xFB_00nI2JzpV)Yxd^$wg{D!#!o(=F~ afS3RGoTXFCSVC@0!|bVsuc>wjZ~g*-*cQD2 literal 0 HcmV?d00001 diff --git a/Bai2/Bai2/bin/Class/KySu.class b/Bai2/Bai2/bin/Class/KySu.class new file mode 100644 index 0000000000000000000000000000000000000000..e32d650a141f2127ab886930825583c93bf4062f GIT binary patch literal 1345 zcmb_bZBG+H5Pr6_Tzi~w6ev`s6kppbP~TCCs4b!fLP**)@q-_h_R?E(>^1Gx$j{Pf zn`q(>@JAVEuO}4YBe`U6W_R|PXP%k;{pZIo0FUraLxe%ExV+mf?jBcr8lnsnL%+gh z*&|Q3xOBF;SL5U*_dfDZyy$Y-DpviDkgXEK_@IufcoWA*KB@NisLpN zCH5(2Ht2A+$-S)4y^XAnyU1(EG0X(OXKxy?P@tmP3XC8w5KXaMMNz{V!*l>KT7-dn zxUbZ(Kl^Gh7-n<%^BrY~bQ?rrcrpq=LowwDTh<)$PcGHQCk9P)T*Fg_`4K^aAuacW z+q64zY>--seKpae^{!)6%|JoNI<^eFz)Kox-fr8n$*_7+h3EK&8A=MGY@ia9=zGIA zq7;2?U`Gk31;V-1VZG}0It_bAs27n?&u>lf#xl*$7`;zYKn)OCQL^bJ(V8IdA^jQs zW7Yur7cwF+Xw~TtOi=I@`apX@5GFB2o&qpwRRDenYg&bs)pT@#X)7K3j@eVJ$$-E# zMJMU@On|o)P%%S15L$|MR1OpKWU1^X7RXZMO{B?+29_!!Mv*kMA%i+atN4^v7~uL> zWRkb~xMLOiSUJNZ86eEl?FHhH#vEa&+ET;YCtOl^5XwR$5au`tWCJoJ(_>2U6YKAj l&ju)2-!R+9^FChnvHgF|8M?KEMPx@b%$#WWhH^*n_Akd;9H#&P literal 0 HcmV?d00001 diff --git a/Bai2/Bai2/bin/Class/NhanVien.class b/Bai2/Bai2/bin/Class/NhanVien.class new file mode 100644 index 0000000000000000000000000000000000000000..b73ba0a1197c6407b5cb18a387eef3b637ec7dca GIT binary patch literal 1346 zcmb_bYflqF6g^W~wk->k77A4<#b+NteWMgnsiHS5s8uifTgO z{iQ|9)glm>(-FeBK*(}j)25Vm(>Sh3+oIW&j;wm-ctaXxOA6?=Wwfgn<>rMz(r43i zWvf`J8@6qBN<+enI1iEav#PDVmfDJKiu~Vy-JdsM3@UhO84r_QKFh3%O*QDD$ z*=m@bFgB=hq&%AIIyP193sJ0NOUHA(U_%@2wrMv6Rxir#99JK`q#(9+l)dy^XE+~9 z&DT11lxUhKT8ov9R-9g^Zth4m4U;Fcx2AYwnSC?H0i^<}d1wV`bCS45xO>3A;6Icf zAo_(y06Nzw|G)&DC;5SAo)e}p&7A^>aa91W4;#xDR#sEN0cP^4(09!K!|HGuuC_aT5Ppm z>a8<=(a{;5aYh|ynDLW!G>kIi_}PEq9}%B-v*A+fhuwWI=RD_}=Un!$e}4Z1z)9R! z5D`$bC8JzUPvo*g3ZeqruNgOubjfh$(-&v2nMGe9I#({v3UuUxtBP-z(&s$SSjyRD zKO@kbx91(huXv`wp-0J_&ed#W4QI&B3{s`>wC&jbpg=<+IY|Rqcg|GNfL0C7P!((w zXn%w;6>ZodMdH*+j3y_WA+S?J42=TYa<*fRR~BYXuVBoU=uAB47LC%R;n{K@9!7o3 zE(>U(Pcm*9gKwD&fq!HmvBlryq%_;5p&R??urW7BDiXCgH_?t%dTFkxX!#zczxC#&{Z5kpMq4K*RARr(l{y*Ta<_oMMnd+ zGfxLq9LGroCj@qEq$c!V!&B%NP#p7?KPn-Z*HNkPjD}Mf5NMJ&GC|B&BDsmY5WWeg z1$GDi`<8Uvw;jD`+5DRRfb@P)!x`zM5;$3M6r2;-wNb1!prMLgnlrs7WMv*0yyRZ@ ztqK`9i|1tR9F?o*HJryN3(;6yG#zHNi{O7woXpWLr5JTr9FaY~S<@ z-}PjFgoy~?N5k_>3q1G=*t+qJ@~hu!sNg28$|`%f!fI12Bcr>eVJS$#yy>5J3nnAG zjkgrs+1hkL#cOz5_IsmwqhgfGQu`eZ??UCEv6z>FW!LGEp1rT(9zI}oT1I(1aDpAc zfe^E#899m`u2c>kHSbouqB&yAVbv@rQJ<8;e)8SG5lyz`XyaGmE`laRx#oc6yM-si z!5)bBtU&8oMcedtbp_jhMf-z5zJu?!07;`{D|T?#$uo`m)WR<8=2ytXhKNJ765*NJ z^9$O0t9Wc`14#{T;|ezUm#=Wyxr!@XzQ$!sUEl~2ul5|NqIfSVI-=d* zt(9fi4Uh!R1i|hm`Flv=UeeaZcQ-@bhe3us!c~qTPv9V?aTq>_^&KQ|7d`k0y||AQ zK0_bAz%hJ-etge?xJ><@kO`0nYXq&+_y8teCwXI50jwd9#@b#%LC7OjRVl{5LJ--*7|VPZY*_NzfZry!jOruI}>UJ%O*+{@$RflkR|1x`WeB$2n%<41*sI!qkJ@ o^sR^4hYv{)|25bahA9KtiO3pDI~sU+n`Q5TH7f8i?;`l*Us0IkDgXcg literal 0 HcmV?d00001 diff --git a/Bai2/Bai2/bin/Testing/Test.class b/Bai2/Bai2/bin/Testing/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..ad1fb412cd193890d6f9b4ab52487e74afdfdf57 GIT binary patch literal 974 zcmZuv+fEZv6kVsZv>irn<)$DGDB70Gc)w5tZHL`?|^@#%D&(7~BA*qIXj4!=Ym zAd$om@S}|Dv}iH#a`w6Gv-a9+uV24^`~+|x)htp1=9U*HzS^~Q%pxr?yeAK&9Z252 zZR~k&BGA9)D?eEm=qr}C1=6+Xqi3KGc@r7*3k*5F@;2LH!)tBHM&JpII*}`bZQ1hm z`SdcKH2qj$&^cSPLcCD=N?@Y+!RghmCoR&dl(w@N5g6$_v=cwD>#kJFYvobEcot*- z5w3rY6E8F|fk}as1|9E0`jP!g?Y9%6dNQmS7{+By{))g<@xl~cct*ge1u~B9_fD;9 zU>bS7Tr*)|j@qfF+^o~9L<&?uMf!R$$ zS_d++nvs=w%3`xt;)m8J-wRhQ10^hGQ5Gn41YuieAWSS_Ss=5oQCa4cPiK_>nP#+4FuZe!(PKnj^vcX5$L|Kqm~_G*rl_5T5iIajrc+li*`ZMG kmce5@Vg3LOvx*8y6flD|JY`P{L|MlM2?;!7P72Te0Gln;&Hw-a literal 0 HcmV?d00001 diff --git a/Bai2/Bai2/src/Class/CanBo.java b/Bai2/Bai2/src/Class/CanBo.java new file mode 100644 index 0000000..9bf9f1c --- /dev/null +++ b/Bai2/Bai2/src/Class/CanBo.java @@ -0,0 +1,50 @@ +package Class; + +import java.util.Scanner; + +public class CanBo { + // thuoc tinh + private String hoTen; + private String ngaySinh; + private String gioiTinh; + private String diaChi; + + // phuong thuc + // ham khoi tao khong doi so + public CanBo() { + + } + + // ham khoi tao co doi so + public CanBo(String hoten, String ngaySinh, String gioiTinh, String diaChi) { + this.hoTen = hoten; + this.ngaySinh = ngaySinh; + this.gioiTinh = gioiTinh; + this.diaChi = diaChi; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + System.out.print("\tNhap ngay sinh (dd/MM/yyyy): "); + ngaySinh = sc.nextLine(); + System.out.print("\tNhap gioi tinh: "); + gioiTinh = sc.nextLine(); + System.out.print("\tNhap dia chi: "); + diaChi = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + ngaySinh); + System.out.println("\tGioi tinh: " + gioiTinh); + System.out.println("\tDia chi: " + diaChi); + } + + // ham lay thong tin ho ten + public String getHoTen() { + return this.hoTen; + } +} diff --git a/Bai2/Bai2/src/Class/CongNhan.java b/Bai2/Bai2/src/Class/CongNhan.java new file mode 100644 index 0000000..cf97deb --- /dev/null +++ b/Bai2/Bai2/src/Class/CongNhan.java @@ -0,0 +1,33 @@ +package Class; + +import java.util.Scanner; + +public class CongNhan extends CanBo { + // thuoc tinh + private String bac; + + // phuong thuc + // ham khoi tao khong doi so + public CongNhan() { + + } + + // ham khoi tao co doi so + public CongNhan(String hoten, String ngaySinh, String gioiTinh, String diaChi, String bac) { + super(hoten, ngaySinh, gioiTinh, diaChi); + this.bac = bac; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap bac: "); + bac = sc.nextLine(); + } + + // ham hien thi thong tin + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tBac: " + bac); + } +} diff --git a/Bai2/Bai2/src/Class/KySu.java b/Bai2/Bai2/src/Class/KySu.java new file mode 100644 index 0000000..1831b4a --- /dev/null +++ b/Bai2/Bai2/src/Class/KySu.java @@ -0,0 +1,33 @@ +package Class; + +import java.util.Scanner; + +public class KySu extends CanBo { + // thuoc tinh + private String nganhDaoTao; + + // phuong thuc + // ham khoi tao khong doi so + public KySu() { + + } + + // ham khoi tao co doi so + public KySu(String hoten, String ngaySinh, String gioiTinh, String diaChi, String nganhDaoTao) { + super(hoten, ngaySinh, gioiTinh, diaChi); + this.nganhDaoTao = nganhDaoTao; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap nganh dao tao: "); + nganhDaoTao = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tNganh dao tao: " + nganhDaoTao); + } +} diff --git a/Bai2/Bai2/src/Class/NhanVien.java b/Bai2/Bai2/src/Class/NhanVien.java new file mode 100644 index 0000000..1ea85dc --- /dev/null +++ b/Bai2/Bai2/src/Class/NhanVien.java @@ -0,0 +1,33 @@ +package Class; + +import java.util.Scanner; + +public class NhanVien extends CanBo { + // thuoc tinh + private String congViec; + + // phuong thuc + // ham khoi tao khong doi so + public NhanVien() { + + } + + // ham khoi tao co doi so + public NhanVien(String hoten, String ngaySinh, String gioiTinh, String diaChi, String congViec) { + super(hoten, ngaySinh, gioiTinh, diaChi); + this.congViec = congViec; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap cong viec: "); + congViec = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tCong viec: " + congViec); + } +} diff --git a/Bai2/Bai2/src/Class/QLCB.java b/Bai2/Bai2/src/Class/QLCB.java new file mode 100644 index 0000000..cf3fbb4 --- /dev/null +++ b/Bai2/Bai2/src/Class/QLCB.java @@ -0,0 +1,69 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QLCB { + // thuoc tinh + private ArrayList dscb; + + // phuong thuc + // ham khoi tao + public QLCB() { + dscb = new ArrayList(10); + } + + // ham them can bo + public void themCanBo(CanBo cb) { + dscb.add(cb); + } + + // ham nhap danh sach + public void nhapDanhSach(Scanner sc) { + CanBo cb; + System.out.print("Nhap vao so luong can bo: "); + int n = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap thong tin chi tiet:"); + for (int i = 0; i < n; i++) { + System.out.println("Lan nhap thu " + (i + 1) + ":"); + System.out.print("Chon can bo (1-KySu; 2-NhanVien;3-CongNhan): "); + int chon = sc.nextInt(); + sc.nextLine(); + + cb = new CanBo(); + + switch (chon) { + case 1: + cb = new KySu(); + break; + case 2: + cb = new NhanVien(); + break; + case 3: + cb = new CongNhan(); + break; + + default: + cb = new KySu(); + break; + } + + // sau khi chon loai can bo thi nhap thong tin cho can bo do + cb.nhapThongTin(sc); + + // nhap xong roi thi them can bo vao danh sach + themCanBo(cb); + } + } + + // ham tim kiem theo ten + public void timKiemCanBo(String hoTen) { + for (CanBo cb : dscb) { + if (hoTen.equals(cb.getHoTen())) { + cb.hienThiThongTin(); + } + } + } +} diff --git a/Bai2/Bai2/src/Testing/Test.java b/Bai2/Bai2/src/Testing/Test.java new file mode 100644 index 0000000..2d16a6a --- /dev/null +++ b/Bai2/Bai2/src/Testing/Test.java @@ -0,0 +1,25 @@ +package Testing; + +import java.util.Scanner; + +import Class.QLCB; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QLCB qlcb = new QLCB(); + + qlcb.nhapDanhSach(sc); + + System.out.print("Nhap vao ho ten can tim kiem: "); + String name = sc.nextLine(); + + qlcb.timKiemCanBo(name); + + // huy sc + sc.close(); + } + +} diff --git a/Bai3/Bai3/.classpath b/Bai3/Bai3/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai3/Bai3/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai3/Bai3/.project b/Bai3/Bai3/.project new file mode 100644 index 0000000..93fd09e --- /dev/null +++ b/Bai3/Bai3/.project @@ -0,0 +1,28 @@ + + + Bai3 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272563 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs b/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai3/Bai3/bin/Class/Bao.class b/Bai3/Bai3/bin/Class/Bao.class new file mode 100644 index 0000000000000000000000000000000000000000..7af85b7b4ad3bd6259f5e0dba49d472581b83fb1 GIT binary patch literal 1267 zcma)5YflqF6g^W~wk=D60!36x@!1DZA1F!@v?xN-G$b^QejLiAJ7zoEv|A%TOQUU~ zi9f&}WxTVyLa}@>o6KwHo^$TGcYgi;{u96k4h@7DVtY34c8g{17zi^=`r8_p6)AcQ zrfTxDBa6ESTv-gs$_M_D7j3SZ#bdW4RkOq}zAcq>cNoU9xjI95&p8!wjA6orfhfaN zMJiG4wN6B*#!qaaVVnlH>%1fNJ~#}!mh3W2RL&I<_EvV3arESH^e9)?5|UcNEJODH zU~=^s80JkxFizIA__+_`u29u?WiqJil)1WagdJ*=EZ(kJj%wDVVn_vKJy+Vr;|5ns zbV|OSB@@?iBZg(H7|1Y857~Lvbw$g>E!-w2ot{fV{IsM~JR+-IGFCN(7nNZyn;Z3>A=GV<1pm)409AC#l0wxi`PVO9rl%(LW7NPihJ_(Vyap@xqFBT7vk8&j)`5oq>kk6wos=GYgeT>A~>KZX^66kJugSs@f%!Q`o_e* zcFypev#G}MW2e_?h<&NsIZCf*UF*gQwa*y6E^T<5ui~lQY1|?B(Oj$&7HtCEPAmCPq>y%of@##>5jgY$`=N>`333Zoj&g63w^9! zVo#Df5N3qXCJAqzFmygCKl)rj3XcLSsO$m9k!KZdskK3??k cs*l(IW}2p`Wh^1%@%X-_10IIA#2v!HA2=@p_5c6? literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/bin/Class/QuanLySach.class b/Bai3/Bai3/bin/Class/QuanLySach.class new file mode 100644 index 0000000000000000000000000000000000000000..8ffe30ab73ffe3d220484f62df962b0e767df9fe GIT binary patch literal 2492 zcmZ`)Yf~Fl7=AW{ZdjIExU?wh+7_AsA<}zEZ(M9ko1`sCL#dbc5LU7!+0bNzMXjxu z-{4I92bl4LGdh}%GUMo1|Aim@4=O%qHy2>)hfU6&^Pcy8F7G+}$G^Y)3g9HZQsGn3 zJ)0Nha`bjZ*zwJj$mUe|Ir~s-h-hBetI?aw56!Hjz`s&<@(TLn?o!3E^3my1No>Zg zvJ+F#macW+ir!n+}|}Y|FW*pd}Q}u*7U}#njM(4jpaK zRCFomeMLD9o#>GvLGB67hcj(Z(5Isn2NZP0E!#|13d?3GEtd0y6O0$LBA*c@OTO18 z{Z7s*%eDRd39H@7nS~lohJ^MZ4`(ERAsuhvO+ptdE0iVVao#0aEPPLaPioe+FM$Hx zvgd@IlX|D)GTRXyM=`7*U^!+L_x6X;_@3GxVh#Cpxd zPCF;on?g#>c1f1X3fneIv2Z4USp^fbxuR|4i^4LP(8#k1jnHI7dJr>?N77<_HfP0* z6OkEF3{M%7*1I~c;HrXF7yUl$q;J`)%&uV`H&k3#(9?9JR$NCM2~v=T%-htEl;-7z zn>udcHVv06vSs(%RZFiTr9kuSl2A1)phE>ui(dCo;?{6SPA~BwdebDK;VwEfjN^SB zA7Gk0q+DsLu$s1Pjc4Y*j<=!7kIzEQRqnEQxJDs!YteLvNy_AVr z;_QWVJb+I*E42;a36Xk@5WrKKMHRUwdxj>Yij`8iPDqT@k>R{o$xz-y z{8#zrL%<#LHsee?XXfDN2nde8gg&~B&ZTbcCAxn?@AqzeKYu&jOgbYw(8IR@>GR z9K<2MDblT4#u--eaZVfk5xrwoyuR4Xq`50WUX{IWmH{uamW6xp77XT5WFOS>JzCYnvNKOyMbFt~d+KM1BoJo?#7na_T@C1=!@jL1T(oC&yEKq+NbisgDwk(GpR3 zt5Vn@w%yr4p^w>=CYd8si(*kj72a>`rcBC{njOF*aUBi6T6Q z%29<2uI+y|6&Y|Hxw`m#+H7F_r-o59G2YyTG5Cp#uxI>tEIfxMfo`!)gP%2~?=+?ljs-t=r#l&acOR|q znzTlEW`JviI!}wQBa9pTI>kvcffSNhu^DO+b*Z0uek#>5# W>5O{<26lK>_XJUjFNnp5FaHCa4)t;X literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/bin/Class/Sach.class b/Bai3/Bai3/bin/Class/Sach.class new file mode 100644 index 0000000000000000000000000000000000000000..aa28cbb531f88e8ea98972da6c1cd418aa732196 GIT binary patch literal 1467 zcma)*YflqF6o%h{mTk*&D+Rez1hE&OCNzUHA~SP zLxdP&NFefmI?Yg?K}MQQI#vq

QC6}= z%PeG-DKOj&S+`Xwk;zNbG^$CLDy(A?Q-0jUoQ7F}{uYxz*KDJ#;}+)0QLAnX47s;c zR^o^fU{e|lSx)*8A#eSM6f;cO3Kx{z2nP_uf`+)jpdyvIgd)*)?|oRKJGp2zD{OPEFxxWj>v(_-svuT4UW=Sm)H|c3qWDjj9hjRObE`XHs~| z#jq4W3VS;C!L=(Z6~jCgSiH`QwwpDzlPvLEN7^yNw%o>G?+Jr}-GgOzI)XN?8P?*5j&oFYO7o=UFGa3fbgAl!k9NjJVY*Uw1Fh(mJD}-?xF+~Uy1kRTUIagt&5O*BS z1h+_&(+=#ggA>1mjU$Oo3NETcMLbM+rYC1UR?Y* ia(|38@Y?-x1>`z5OLB7##v0~ZGO>P{i8qAZf!tr^sVipy literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/bin/Class/TaiLieu.class b/Bai3/Bai3/bin/Class/TaiLieu.class new file mode 100644 index 0000000000000000000000000000000000000000..173c07b24f5f076f1496e38e0f4aca3a816ce5c9 GIT binary patch literal 1561 zcmZuw+j1L45IrMHSxKxfab)3ulWamRlI%nw7Xwy8z=jYJ*)d3%T7dYeX;-AZHEfEu1;PkEH)% zo?mUYwJ~nLCMcJ1#lq!NN;Q8Tgl^Y{gRA^!Fr;WpF$XWG?oy?YTDiJg%i<%23%MO; za=O|HwdeR$e#6P*25wonNpB?Z={OrDloc{Pfg<)9UoP+Ev5MOk))dZ15GRS-xPz)f z*0^s%(OaQVDo?AF#m5TEF+JAQp(4(kp$?sWZ8n@N?vK5LK<=C#OYL-6Yx%({9@<#P zCkmG2sS8yWojs5mwE3|(-$`05-+ae&O{?P_3vb~Oi}U{`+Z=lSf!oi5eKeQbKCN60 zUq~;N^Qd9d#umO}*Xdr*H3tf}&(dn@=LvpIAfDRzCK4+Q;trSE)NOn#C9t9r_$G^n z6tZ=ONIT+ao}o_-yTa}}g_Tl$TK!`V?8HMi+@8!_z8MVrZTG1s!(k_*ct<3{Rd(_W z2YLo6X>3|4Y3pcbQ*+Po1?P;b&C`AEN^UD}G5dS;Y@TbLVZbcXn8yMwJAQ=oSma3n zE^rk9pD)wg3j$DCJ)*I8gkt5=5tb)-MWzK~(~QfZfH^GDDn{6qI6lE9Qbb%x6(Z`w zq#zT?PbqwW50lKlGPC&B|G>)PwGpmYR!69ifSm76&P6%jOU@5SOP>8W;dYJKAa0h( z3s}K22in19PS_RPrS*`aiU!3v+nDD%KE-F`qOdWR^B4X_m^Ya7Z`58bK7NZQl|NA! z;mZ-e9^u)s<9X~TPC2$?$MOg-;)n@T(GTpsi@1quUh{B#&SFY literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/bin/Class/TapChi.class b/Bai3/Bai3/bin/Class/TapChi.class new file mode 100644 index 0000000000000000000000000000000000000000..e223e7c38f14d2fb1a1728b7ce09a9a85d34c089 GIT binary patch literal 1431 zcma)5Yg5xe6g^worYYgoQ1HQ{$ip^8ih`gN5kZk^MYJ8%j|*f-oHpq+sgLnj=}4K; z8GnF3%JJ@|&?0!W*D^P%Map$PL7hSa-+h1eoN@w;M!kg})8Alg14Kb(;eMQ?bcN*1w zvtH)=6_X)RbPsrCkJoLnZf%Br%k~(0i>LfTQJ%p_7vJ*_JXayoT*9dO4n>-j)xO2a6|RNTOnf=Pz{j(dLge6y-y8Z+dp+wd8Z zfePEr?UDyRIbrf@K87^Ipt?hxDbG#S=%rHhJl0Ao4g<3avJAS!J)fxI7UmctHGxIo zm$)TF&f|`P+YAE|qVomIOZq6ARy@V3o$G)3n$5Rd4pc0SrTFrD08Aj5Di|Sfyf zS5)+BS@cb(Bh*|aw^2VZw`|cC-9Z=53H_L$V(g+u4bexnDQ8rf^bgYsH5QF=S}o9@ z(LZ9Gp!=%~>!C4DX@Ew-z4VEh3_>6JX(a##XcPcnC`Q2QMs{}e1PNpG7)c`;ImU1s zErQ(Et(N^h0cC&l#$GPX;U?<_4a-g-&}+5l%rjm^I-bCA`lHp#T?nhBmCx*H7!Vj}0JYF@bA^)hJiD4e3PTzO z{~=sB4MMwOU>Mg0A}Z)mGo<6^w!Pz8$f&lgnuZD3jnW;kBULsfFuz&)fX zuwSFzEz<8P!XMIc%m_^B`Y!XCC(<`vUpi*U$93$QNmIl&?nL9a*$g?o|WNl}@pe>jz96mDNK|PO8Izu+Kq>PzTK^=VzC0 zN$dY6s-aWrDeTI~H3m{OQZM+mYRTSo)I=xL(9SDkOoEa54FM6p@eAOp@s#5(xW{JB z5&znNb*>5q4SKj5O#|-NcuJrbeY{c5KNvE`ed_}K`)5d=W5l|^*#0?g?qp}{n8?;K zb%s01OdYd4KiJLA)$vH(Jh{ACj%G)rbu1Ho)=Iy?WPr}}1_!MdBTP9?ji)hy43e0~ zAeJ!1CJbYZ=q5%RR2Q3c@B%OC-$Q&2>m-}vzheWhSbGK&wB91|72>b?7A3w->j>Wb E26{sG`~Uy| literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/src/Class/Bao.java b/Bai3/Bai3/src/Class/Bao.java new file mode 100644 index 0000000..5da5969 --- /dev/null +++ b/Bai3/Bai3/src/Class/Bao.java @@ -0,0 +1,33 @@ +package Class; + +import java.util.Scanner; + +public class Bao extends TaiLieu { + // thuoc tinh + private String ngayPhatHanh; + + // phuong thuc + // ham khoi tao khong doi so + public Bao() { + + } + + // ham khoi tao co doi so + public Bao(String maTaiLieu, String tenNXB, int soBanPhatHanh, String ngayPhatHanh) { + super(maTaiLieu, tenNXB, soBanPhatHanh); + this.ngayPhatHanh = ngayPhatHanh; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap ngay phat hanh: "); + ngayPhatHanh = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tNgay phat hanh: " + ngayPhatHanh); + } +} diff --git a/Bai3/Bai3/src/Class/QuanLySach.java b/Bai3/Bai3/src/Class/QuanLySach.java new file mode 100644 index 0000000..51863a5 --- /dev/null +++ b/Bai3/Bai3/src/Class/QuanLySach.java @@ -0,0 +1,82 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QuanLySach { + // thuoc tinh + private ArrayList dstl; + + // phuong thuc + // ham khoi tao + public QuanLySach() { + dstl = new ArrayList(10); + } + + // them moi 1 tai lieu + public void themTaiLieu(TaiLieu tl) { + dstl.add(tl); + } + + public void inDanhSachTL() { + for (TaiLieu taiLieu : dstl) { + System.out.println(taiLieu); + } + } + // nhap danh sach tai lieu + public void nhapDanhSachTL(Scanner sc) { + int chon; + String stop; + TaiLieu tl; + + do { + System.out.print("Chon loai tai lieu (1-Sach; 2-TapChi; 3-Bao): "); + chon = sc.nextInt(); + sc.nextLine(); + + switch (chon) { + case 1: + tl = new Sach(); + break; + case 2: + tl = new TapChi(); + break; + case 3: + tl = new Bao(); + break; + + default: + tl = new Sach(); + break; + } + + tl.nhapThongTin(sc); + inDanhSachTL(); + themTaiLieu(tl); + System.out.print("\nBan co muon nhap vao nua hay khong (c/k): "); + stop = sc.nextLine(); + } while (stop.equals("c")); + } + + // tim kiem theo ma tai lieu + public void timMaTL(String maTL) { + for (TaiLieu tl : dstl) { + if (maTL.equals(tl.getMaTaiLieu())) { + tl.hienThiThongTin(); + } + } + } + + // tim kiem theo loai tai lieu + public void timLoaiTL(String loai) { + for (TaiLieu tl : dstl) { + if (loai.equals("Sach") && (tl instanceof Sach)) { + tl.hienThiThongTin(); + } else if (loai.equals("TapChi") && (tl instanceof TapChi)) { + tl.hienThiThongTin(); + } else if (loai.equals("Bao") && (tl instanceof Bao)) { + tl.hienThiThongTin(); + } + } + } +} diff --git a/Bai3/Bai3/src/Class/Sach.java b/Bai3/Bai3/src/Class/Sach.java new file mode 100644 index 0000000..3756f0a --- /dev/null +++ b/Bai3/Bai3/src/Class/Sach.java @@ -0,0 +1,39 @@ +package Class; + +import java.util.Scanner; + +public class Sach extends TaiLieu { + // thuoc tinh + private String tacGia; + private int soTrang; + + // phuong thuc + // ham khoi tao khong doi so + public Sach() { + + } + + // ham khoi tao co doi so + public Sach(String maTaiLieu, String tenNXB, int soBanPhatHanh, String tacGia, int soTrang) { + super(maTaiLieu, tenNXB, soBanPhatHanh); + this.tacGia = tacGia; + this.soTrang = soTrang; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap tac gia: "); + tacGia = sc.nextLine(); + System.out.print("\tNhap so trang: "); + soTrang = sc.nextInt(); + sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\ttac gia: " + tacGia); + System.out.println("\tSo trang: " + soTrang); + } +} diff --git a/Bai3/Bai3/src/Class/TaiLieu.java b/Bai3/Bai3/src/Class/TaiLieu.java new file mode 100644 index 0000000..032f499 --- /dev/null +++ b/Bai3/Bai3/src/Class/TaiLieu.java @@ -0,0 +1,46 @@ +package Class; + +import java.util.Scanner; + +public class TaiLieu { + // thuoc tinh + private String maTaiLieu; + private String tenNXB; + private int soBanPhatHanh; + + // phuong thuc + // ham khoi tao khong doi so + public TaiLieu() { + + } + + // ham khoi tao co doi so + public TaiLieu(String maTaiLieu, String tenNXB, int soBanPhatHanh) { + this.maTaiLieu = maTaiLieu; + this.tenNXB = tenNXB; + this.soBanPhatHanh = soBanPhatHanh; + } + + // nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ma tai lieu: "); + maTaiLieu = sc.nextLine(); + System.out.print("\tNhap ten nha xuat ban: "); + tenNXB = sc.nextLine(); + System.out.print("\tNhap so ban phat hanh: "); + soBanPhatHanh = sc.nextInt(); + sc.nextLine(); + } + + // hien thi + public void hienThiThongTin() { + System.out.println("\tMa tai lieu: " + maTaiLieu); + System.out.println("\tTen nha xuat ban: " + tenNXB); + System.out.println("\tSo ban phat hanh: " + soBanPhatHanh); + } + + // ham lay ra ma tai lieu + public String getMaTaiLieu() { + return maTaiLieu; + } +} diff --git a/Bai3/Bai3/src/Class/TapChi.java b/Bai3/Bai3/src/Class/TapChi.java new file mode 100644 index 0000000..2730c54 --- /dev/null +++ b/Bai3/Bai3/src/Class/TapChi.java @@ -0,0 +1,39 @@ +package Class; + +import java.util.Scanner; + +public class TapChi extends TaiLieu { + // thuoc tinh + private int soPhatHanh; + private int thangPhatHanh; + + // phuong thuc + // ham khoi tao khong doi so + public TapChi() { + + } + + // ham khoi tao co doi so + public TapChi(String maTaiLieu, String tenNXB, int soBanPhatHanh, int soPhatHanh, int thangPhatHanh) { + super(maTaiLieu, tenNXB, soBanPhatHanh); + this.soPhatHanh = soBanPhatHanh; + this.thangPhatHanh = thangPhatHanh; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap so phat hanh: "); + soPhatHanh = sc.nextInt(); + System.out.print("\tNhap thang phat hanh: "); + thangPhatHanh = sc.nextInt(); + sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tSo phat hanh: " + soPhatHanh); + System.out.println("\tThang phat hanh: " + thangPhatHanh); + } +} diff --git a/Bai3/Bai3/src/Testing/Test.java b/Bai3/Bai3/src/Testing/Test.java new file mode 100644 index 0000000..18e6628 --- /dev/null +++ b/Bai3/Bai3/src/Testing/Test.java @@ -0,0 +1,27 @@ +package Testing; + +import java.util.Scanner; + +import Class.QuanLySach; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QuanLySach qls = new QuanLySach(); + + qls.nhapDanhSachTL(sc); + qls.inDanhSachTL(); + System.out.print("\n\nNhap vao loai tai lieu can tim: "); + String loai = sc.nextLine(); + qls.timLoaiTL(loai); + + System.out.print("\n\nNhap vao ma tai lieu can tim: "); + String maTL = sc.nextLine(); + qls.timMaTL(maTL); + + sc.close(); + } + +} diff --git a/Bai4/Bai4/.classpath b/Bai4/Bai4/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai4/Bai4/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai4/Bai4/.project b/Bai4/Bai4/.project new file mode 100644 index 0000000..13c1756 --- /dev/null +++ b/Bai4/Bai4/.project @@ -0,0 +1,28 @@ + + + Bai4 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272574 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs b/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai4/Bai4/bin/Class/KhoiA.class b/Bai4/Bai4/bin/Class/KhoiA.class new file mode 100644 index 0000000000000000000000000000000000000000..70a793d84837c153d71c2ce0b498188dc37ef9c9 GIT binary patch literal 1334 zcma)5+fEZv6kVsZ^ull}EvVc^6le!ZqPz8B=DOc53to{2z^! zL=!*2k20<^Q|SN1;S^Jy(*9_eb7JZ`MPeO=F4u=vQM}Cy)}PY7wF%%Y|Gsd=*wiQT-|q0j0E~H zs34Anz;Ma3jidJ2vC*vP$8|%3IyJps)ti>gyNhAhv|8j*3NT}>&CGQM|Fe><#vzbW z5JA6;#uY^U=$3*Q`UMo*)EgDku}>?O%>&&+ZP%*j%QfA$jpkOiDqk|C;5P2WF#|P< zS%Hy&CZAibai-ud<|u&Eb_LQtJOlm_E6C%4K+HBixv~XRBa^)@T?}kxfY@45 zjbY=;(t1%92(@Y?>faBRVULDQ%dqL3e_~3_HWfTVA_{I#1myB8wAZ%kCq^@dC*&Qk zII8LRqR;|TmLi@??`SgGRj`MBx=e304EsbNcasp;p4BZu*}XhbBt-r=SXY0 zb4>K`#z_Xe6UG?trZ9vwqj3*g^Y3@DiR2NNq*5Mr$s{HJ2R=$jmv<|FVP&~j(3UPR z`3=*_dmYScOC3lSGGFcGX_>G0@&LCvVuPp=O!CE3WH!xj2J@Ij4k{i}RH?zZU+t1- zfjb3q5z<9nPA19#_k0luhI`js&_vI+JlIGo|ZI(<~M$7jT1b(}n_9z2I5CNI#az z+#eU2O6J4=bo!y*VO#Ie=2FWvIoE^#u&TFHdNZTvOVlExwm45*I#z4`n>J zW#P}p&CHp(r{B!<d7y=DHmU%vWSf_3Dj>?qKaDqv)c;=EI)mU zT$tEtqK3LaJ5WjVxL(boY$|7QB+v=cxr{@ZDP3=yRtHpx4e0vKf(!kA^!?s zQ1LQGo7IR}FxUDUIIrci%jnVuIIyT1RL#o7?6J~-7NZ7C>9Mr8e|mPlLHjquqpMXi c`jv0X(DXfYO0I)_s%qi^mC5cQnFfx&06le4p#T5? literal 0 HcmV?d00001 diff --git a/Bai4/Bai4/bin/Class/ThiSinh.class b/Bai4/Bai4/bin/Class/ThiSinh.class new file mode 100644 index 0000000000000000000000000000000000000000..3c9a17a5924b9b958dd116076113760267e27186 GIT binary patch literal 1674 zcma)6U31e$6g}%Wk*taklGwpc0P)q@BEdjX+S)+VB%~P9Kx-39%Zp;~L}Hv(#+I4( zt-qxG1H8~_%nY6B58y{Jy?3R=am_kuiGs* z{Gc8v-#}Vm>ZSL}E4MwhSAM+vQZ^%jbT?ev5D+ziaX)NGB{01;xK@ukf!eDIOtb=T z-46t;Rv^{WUW2}5y%VS)x+gGJEbS23df1W{#&FukC$I%hZv{$j_x5*Xr{V3kC4+}e zuf5}S0zN0kbmRwJzCA>lqE?EvQ8NF>QrgKtAZKG76TCZX!+^=Vf{jePTd-ll6tI== z9W?wDZCu6`(je@SpxO9!5SE{i zbP)+Cz5S|*PX%T&+Z4&^hR&`RIxSE66~{smu7MJHwd%v~Y+S=4Rpx-92s@#sE0~m~ zv}55qZWt&FoY4>`iQBk|TLOlXzeF{LphDI7!HSK~aa+J-4_8TGwpbdK*2I?rlQD5W zbRwxLj)@8tE4EQvI88rb;~j!HGD_w2dQL=5QgH-Q-6rMt5m^bwr#sZ6NBSH1Mquv0 z4Y<||+AY~JvCd@b!ve12KDXPVg;jiO;{m9bC%l6LsagUH#oB0A30#$5JhHK+g^0pf zQLf0gjmIp!p@nZN6W!log6VNJ$jlaVi|Spp#)v1)f-)YJn$~umsNG ze8T2;V#BvK|HOsqt9^XtUh9LXWNBG`#>Oua<1&%t^H+m&p3l|6`2=&9VgU;j?;I&| zp15D2or9|+{1PtF_*}+aT)};^uwJ>C#c?K^ei(K#eiWN_ECYd_Q(`d3|n)05M`)V zQHh{}T7ibgqzj@3_3}uFKJBBCsY(bup`siWtS4re`b2JVR?kdovnj#}#jJ#un$j|c zeD{ogJ87_-`XZ`g`9xJ^C-uci7bd;ii$^@*ktvzKRmC=JCvt6Wj;yr1C2wLZ8krIB zNy=&;3Lv1GNi991naQ}8ND4H0-VUkpgl3w0CMv6X8f^-mDUl<-l(qFm70;rb$*mlf z@gy;IF+-^`7rAaXDL8`IEdZYqoAuua%lh+ z-PkKoo|Z8ms*ouRbDj``*oXZJdP(GlPF@8n4xmp!G4(6~(a zrWC|VG7beW!Hlx~gBZi8g0m(2!vVyZe@X&+k$~d40M5}cVi3?7kh~e3SMahxb;&HL zcm+GXu9{3zi?F1}2qwYv0%DXu`EM|G+}08c<67FAl-i`B zn^d9Lud@3M6_=#A{;Y9TSCA6evTq zXz8?Wa+X>-(T}j{MPpZAX4Y^@>zBS)r0hYWf{#ZBB|w;Q&e(QGRt=iLM6 zh%xHfqgA+#j}+YDowG4a#a$I2;}e!HXXfE~*#zw~6?dJfV+nCRLdBQ3$3aMH z*$Ky;lgP`dGHVTKmXuW>7`Jkngnq)17iP`+$6${Hf~VL^W&C8YljI%Ce}!*81o*}< zkiAw#%Lx2j0iljns2yvlnXU`2qV5+o{OFu-QRj*+EmvITks^`glt+b z;t;d=XbX1yjE2rUTFz}m3OYOW@-yH>X>w0`QRssm2s4f#{+(_-@x6l|xc?J&g(7)$ zGG1^bh#*a5SzhVO*ozzJ!5#YCL$AZl zd9uW+*SWcmi_pl)1oKIje2h|DrPo)>)W_XzLy|cX+^NAW%yH#s+-uOeD#vS#JqD#f zh!qNi!aE*ss^6Rj-|3V&^|yOli*93;Dk zh~_YP>*wkaSsifL3cCqCwgNmME9Q`(&#BnwR2+csA5;s`#hvTa%bkI{*oUB7XID<)yXDcteiR9XP%TROh;cos?68 eY9xEENK%FndG(F#P_R?zC5Ekg$mxnTKOP+0) z_sxng(6wYamY)&mNTx~x;jCLVW9UFsM<==jdh?cJZZ+#=vr&{~+Z2fB-HNnJvSF$C z>@e)tEKi^(f0c8Qcy(zx0z=8K`AhDC-=M6;R7pd>K!1>E`j(w8RHWmWjVKZr)G%;O zaN)@F&AN^u+!hEa(7`sO<)(AaLDMIyDeH?d^x=*YKO!)kyzz=6zRS|Gw)DJov3X=V z1Cj|s?w<$o~+aiHp1|TwqV5Y z7*91k5l93jQs@-~9Z94Fv;zfdt8&i72IIMCkrFkjV+zkWP=|D@WGawIHML#c)z-18 z5u~Y1UAr#Gs5S#}wp>u4FLcZV1Fl)7Q>j0A;wu2DX(jgv8atKP2am5$d+ zd}knDb$njO0yuBYF~9jahi#*uaw@Z|BZIdB5tUJ95*SFP{&$1Y^j^mbva}JIHY~GF zS!yt}Q8Je*DYOqd)|BebitT!Y3d_bGeV4ewUUZ39Vd{n^33OMzi@DQ+`G2gyN}`^- zB3;!L0g)4k72IZ{Vy;>04MdgAr`1$34%W(72ZZ>=H^Wt9l;$qDcTSuj@;yk$xT-XG zp_{ATzQFw!qbPdN%MV5O)3oir)pb literal 0 HcmV?d00001 diff --git a/Bai4/Bai4/src/Class/KhoiA.java b/Bai4/Bai4/src/Class/KhoiA.java new file mode 100644 index 0000000..a5e9a3e --- /dev/null +++ b/Bai4/Bai4/src/Class/KhoiA.java @@ -0,0 +1,40 @@ +package Class; + +import java.util.Scanner; + +public class KhoiA extends ThiSinh { + // thuoc tinh + private String mon1; + private String mon2; + private String mon3; + + // phuong thuc + // ham khoi tao khong doi so + public KhoiA() { + + } + + // ham khoi tao co doi so + public KhoiA(String mon1, String mon2, String mon3) { + this.mon1 = mon1; + this.mon2 = mon2; + this.mon3 = mon3; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap mon 1: "); + mon1 = sc.nextLine(); + System.out.print("\tNhap mon 2: "); + mon2 = sc.nextLine(); + System.out.print("\tNhap mon 3: "); + mon3 = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tTo hop mon thi: " + mon1 + " - " + mon2 + " - " + mon3); + } +} diff --git a/Bai4/Bai4/src/Class/KhoiB.java b/Bai4/Bai4/src/Class/KhoiB.java new file mode 100644 index 0000000..d470247 --- /dev/null +++ b/Bai4/Bai4/src/Class/KhoiB.java @@ -0,0 +1,15 @@ +package Class; + +public class KhoiB extends KhoiA { + // thuoc tinh + + // phuong thuc + // ham khoi tao + public KhoiB() { + + } + + public KhoiB(String mon1, String mon2, String mon3) { + super(mon1, mon2, mon3); + } +} diff --git a/Bai4/Bai4/src/Class/KhoiC.java b/Bai4/Bai4/src/Class/KhoiC.java new file mode 100644 index 0000000..79628f6 --- /dev/null +++ b/Bai4/Bai4/src/Class/KhoiC.java @@ -0,0 +1,15 @@ +package Class; + +public class KhoiC extends KhoiA { + // thuoc tinh + + // phuong thuc + // ham khoi tao + public KhoiC() { + + } + + public KhoiC(String mon1, String mon2, String mon3) { + super(mon1, mon2, mon3); + } +} diff --git a/Bai4/Bai4/src/Class/ThiSinh.java b/Bai4/Bai4/src/Class/ThiSinh.java new file mode 100644 index 0000000..ae4ab09 --- /dev/null +++ b/Bai4/Bai4/src/Class/ThiSinh.java @@ -0,0 +1,51 @@ +package Class; + +import java.util.Scanner; + +public class ThiSinh { + // thuoc tinh + private int soBD; + private String hoTen; + private String diaChi; + private String dienUuTien; + + // phuong thuc + // ham khoi tao khong doi so + public ThiSinh() { + + } + + // ham khoi tao co doi so + public ThiSinh(int soBD, String hoTen, String diaChi, String dienUuTien) { + this.soBD = soBD; + this.hoTen = hoTen; + this.diaChi = diaChi; + this.dienUuTien = dienUuTien; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap so bao danh: "); + soBD = sc.nextInt(); + sc.nextLine(); + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + System.out.print("\tNhap dia chi: "); + diaChi = sc.nextLine(); + System.out.print("\tNhap dien uu tien: "); + dienUuTien = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tSo bao danh: " + soBD); + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tDia chi: " + diaChi); + System.out.println("\tDien uu tien: " + dienUuTien); + } + + // ham lay ra thong tin ve so bao danh + public int getSoBD() { + return soBD; + } +} diff --git a/Bai4/Bai4/src/Class/TuyenSinh.java b/Bai4/Bai4/src/Class/TuyenSinh.java new file mode 100644 index 0000000..24c723b --- /dev/null +++ b/Bai4/Bai4/src/Class/TuyenSinh.java @@ -0,0 +1,70 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class TuyenSinh { + // thuoc tinh + private ArrayList dsts; + + // phuong thuc + public TuyenSinh() { + dsts = new ArrayList(10); + } + + // ham them 1 thi sinh + public void themThiSinh(ThiSinh ts) { + dsts.add(ts); + } + + // nhap danh sach + public void nhapDanhSach(Scanner sc) { + ThiSinh ts; + int chon; + + System.out.print("Nhap vao so luong thi sinh: "); + int n = sc.nextInt(); + sc.nextLine(); + + for (int i = 0; i < n; i++) { + System.out.println("Thi sinh thuoc khoi nao (1-KhoiA; 2-KhoiB; 3-KhoiC): "); + chon = sc.nextInt(); + + switch (chon) { + case 1: + ts = new KhoiA("Toan", "Ly", "Hoa"); + break; + case 2: + ts = new KhoiB("Toan", "Hoa", "Sinh"); + break; + case 3: + ts = new KhoiC("Van", "Su", "Dia"); + break; + default: + ts = new KhoiA("Toan", "Ly", "Hoa"); + break; + } + + ts.nhapThongTin(sc); + themThiSinh(ts); + } + } + + // ham hien thi + public void hienThiDanhSach() { + int n = dsts.size(); + for (int i = 0; i < n; i++) { + System.out.println("Thi sinh thu " + (i + 1) + " la:"); + dsts.get(i).hienThiThongTin(); + } + } + + // tim kiem thi sinh theo so bao danh + public void timKiemThiSinh(int soBaoDanh) { + for (ThiSinh ts : dsts) { + if (ts.getSoBD() == soBaoDanh) { + ts.hienThiThongTin(); + } + } + } +} diff --git a/Bai4/Bai4/src/Testing/Test.java b/Bai4/Bai4/src/Testing/Test.java new file mode 100644 index 0000000..c9f740d --- /dev/null +++ b/Bai4/Bai4/src/Testing/Test.java @@ -0,0 +1,29 @@ +package Testing; + +import java.util.Scanner; + +import Class.TuyenSinh; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + TuyenSinh dsTuyenSinh = new TuyenSinh(); + + System.out.println("Nhap vao danh sach thi sinh: "); + dsTuyenSinh.nhapDanhSach(sc); + + System.out.println("Danh sach thi sinh du thi la:"); + dsTuyenSinh.hienThiDanhSach(); + + System.out.print("Nhap so bao danh can tim: "); + int soBaoDanh = sc.nextInt(); + sc.nextLine(); + + dsTuyenSinh.timKiemThiSinh(soBaoDanh); + + sc.close(); + } + +} diff --git a/Bai5/Bai5/.classpath b/Bai5/Bai5/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai5/Bai5/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai5/Bai5/.project b/Bai5/Bai5/.project new file mode 100644 index 0000000..d344083 --- /dev/null +++ b/Bai5/Bai5/.project @@ -0,0 +1,28 @@ + + + Bai5 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272586 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs b/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai5/Bai5/bin/Class/HoDan.class b/Bai5/Bai5/bin/Class/HoDan.class new file mode 100644 index 0000000000000000000000000000000000000000..674cc313650e435beede3cf0049b9ccbad0d1931 GIT binary patch literal 2070 zcmbVN%W@l45It9tt%t{tD1Kn%B$E(`BtJxqv5D>2CN?1g#{?uCOu}O<51JwJjF3hN zsbZNQVU-PwKw-Ix6s%aWV8N%brhwBkk}WK+*l2F|?e5#>+;dyM{r%G~0Onvv5mM+| zuNd`u?v}e@I8j8799!jvYb!+SZfm9T3O%$eLm^VJ>z=~Ez0Dxo4_Q*^UA7(DTTuw7 zGusSXclXQ$!WhtyKwlgRLmFa;D-3Shj=9y?-!*GRW4B@|BsblXQQ0NjEPjEc~x3 znQg)GqJ|#y%4$MG6usoea*L)TIJ#O>h&g5Balv*hGH|j{g@jYK%&oFzn^gtPv5acb za-DL~X1UQ;lRmIQ$#5LAwj@2gj4M&R!g?LYJ+6D^zJ@e1yaKnuD;fz-v)$YsvgDB~ z)7W2%VUme)-epy>eKOO~s94H`Z&-K)ulm(z`gUD-2hG2GDKTZ4H<3l0v9n;`Mb%tSuP@#pm2#@Ql)f+Z0&v=mx1dr)b%2y~Xee zCqTS#q=^_lQ;7SHfNsA2OxzC-m~I%|OqXp#-=o+GG>npld*~zIWs{dHV`C_tIXO5I z+$^*wO`_m7Y9;fgEn^|!zxf%tA6(>f3v+gb5t7%(RY=~R|K(KSx0ex|H2l?Qt#M!R zJCHp@e|9MGGr|WL{N9g0BYwZy03sMfKZcN`PYW_|7Q?ip+DNO~H;j|BhO?7X(}x(% zjzkVHo*n5qKRaYX;;kr84~sA2V72Oo0!T@HZjX)_<7^5IG2x|sUzn~6Kmn?PqD~|=UCrKzIBMV zCnBFWkx$-k;=Lw5U_|yu3{E^pc!!)7d}EdsK70~V6ST&^{pVK!8-@@#Pl!N@BYlGO zog?J){Jp^0q$5i(vut{SZ5MGF2E7kxKg1QE5Iul!M93rD#YY4<$LG02vO@TnwfP_Q z7pKNNH>jc({@;mT`1-01|gBv`{Y{k})%FGK0yamU>sb z-|OYUCwbyoKMkMd`}}&r0b%-MUdwe~tY-23W-QGq=5>Li4?8oEC|4P?M>H!w$dKTGX_?NTfWIv^#{w7av>t{ZwJNF+R!}d{ z^pIj<)S*!xi7=*ZJT_Mifjug!5EQ6Sn3g_O%q{BqS#2>(Fp-3v(z0_}-jr)^GvF9z zL7>jVRAw$&IEJ2c5mJM;U5I0IvT&=4gE&OUT3U+HR%W_GsCaBapvsUW1!{L?pwO0~ zE%A$y)KZ4PUN77gGnvvXOV7t8pQCtO!LeO!NG=x~J*VOcw6VHfWJkPKn0EJc-n5*g zlh?IeJcM@2F~vgBo0=Uh*ipldrZuZS8b&9ME9lyib$6hOZk!$V6P%9sEDlX%&=bu@r%dBaIY5RE3`Uyp(m&RlJN0o0`#GckB|V zJR{-~s;S~S!n}xH(k-+s%?nZQn7Ij4&u#50;AUOLN+X)XYB|X|hgVeOT}QFxysqUX z3`a!~H|ZtQ(es*P=jAQ(dgT%y_x9s8xP{vamN@|``M18RcnzZwf8Hp%&2tSESIyL0ZgiudsWw-`5-(Uy~@#p@o~1yoXX75hlV z$C754hm*D&F0p^A;xl~C+J;t`a$)j5akls^`&HuD(Q7vo<1H;WCOfII$DGy2*fOWMVJN*^`lbgU_lzT;9NJVr+f;1>@A=4vM>gZBFa31_z!#e{$|}O=3Dp~MztrLZXCAJhOqB`E|@rb~5t0_RbQntOP`J;Na@! zJ&Df`$@I9Z$$qMI0JUgE1c%5=Vv1srm_~_e0!J{-y?GpSIrNm#ZF5+_0u!Fcd(T*;h>2em?U@k@3KuIOW|beXw<9JRI+lzORA$zD4zrpgQo{Z(riZmIeW z^gSW=2U-FpyfNkP4Xz>D+SMF9Rl+-7RJvjMM}*`7VgYxae)y=_Nf%BZuaZ>1mfgzXbpeu#BO;y7e_>zPgaRpzIw2xWl z@HOs`RtHYI%?$7#t#((4pew{Esy6u{=(aG&Hhx0|ZULLjs#G==%y66iZDGf&A3V;g K-%>aqzWWcO?;FJc literal 0 HcmV?d00001 diff --git a/Bai5/Bai5/bin/Class/Nguoi.class b/Bai5/Bai5/bin/Class/Nguoi.class new file mode 100644 index 0000000000000000000000000000000000000000..230518877bce9ae8faefff21f00ef4aee4814b66 GIT binary patch literal 2235 zcmZ`)?N%FA6x}xjCP@d{rhHr4Kx>6Sh_@*_wR`{{O5Nv9NT49BbwB2wd(J-l?0fR}KY#uO;5L3V5K%a{Qny;IY@xR6 zy9S~P7q+dRtZd!#YT0L-+jb>T=ym*(?I|SJx@X0p>3X%CLd>gKdqvlCcr`rV4cvP6 zp%vIXO?WlOF4P>?ZYcEKcRe?FpwKftQ&xzs_*FZB9t@aB;GDwwHP^EXyE~h9vt(`7 zZHeetta{mMy0UM7j0TR|Qs`eh2A!c6rcc9r6VPdknQ|NoLneCBC#w+?24b=rGZ9Ch zg6TO{qvZHrt>lt~;dU6EWwBy;p54remkC@oaODJn#l2Qw@0dtol1cl!v4;QHBh z5*Uz1+uF&+a7|$#USOn@6z2~#PA+(hsdPTsTNBu;1q6|RMGni@mA0*`BHF& z>u2G3vkEaRFsUP-j-8@ND3HaJLZnsU(Xk6h3@aE6BS8$@R~Xm%1jL>#x;u@!Ehnpf zbH@r|pu!T>Y9^o0?C~#w9F|03GqPGXu_B;*8&LXg!MD(<(TMC!MOwPnf$tp57e$3>g zFB!}q(q>(;Aw zGlmV8G5(~ZyfT&&DB~Lw-{LzyT&vNry{bay|I2&YYffDJV8YTm3;Zx-46LvjFPzkp zZDI>G9teA-wrN*R-Ij8uL|y%O*l9XSl2Si6Q5TPq)X=&m>~q+ybR?_uBUK}1>wR}pCxdS;v8Y|w&jjHAijEzXK_Z~74ZziYGe z922|-TtE~_j-aVF!bR@Ebpn?-ii0{WqnroDL3(zdi@ALar!)H)?fM%g7+{E&!|YZg z7{Dk!jA`HL@P6AjJ!#+)Z%{)QB!kl9m=tx0x7v|^;a*Z*c!kT!sRLY3&mJI60J49V zd)emG>A6GPBqI5Gr)zZ#+?3{Lg5wnex=Ls%cF9THz!aO$HQd2<4Kx*o>i}KAUECv> z34&TAya@lhSDJwD^Q+M0jfmYsk~z2=@g%BggCXJch`> zQU;2^z^4X^1_j9FQ~4$NyrYVrX)Xm=C&G*FnEBk5AZ!vA02GU0Z)bx zQ9X6>taJ2VFrVbG8qwCvcqP6j%;ohGB5cx zqKO-z4e)^ST%xyS?J<;BvO`uo^e7g|Ef#VrJqHq_-_2;!v(2{q74i6T`zZCoqfVy}ZQAU=ye zBodYQ06q#a>l6~Cyv%raX3v~CGye7a$4>xH@Ipg|!RR_sEabpaUPG3laK^uI%j0x+ z)IW3Vm|^LakRpD~uuyOG7_tY!siR{7IRlGWVpwep>3m51z7uwN-*XsB?ZD<zy1XF`+u#Z|NxDx*}g?sMP1CsKPf$p97Cak#*=M$8Mlw z136`G8!)j+QR(vG8!p`rw_Vl21ZtKib)cx;F>n_(QZPtJ&?&29>hdqEW!z_|DL6AC zJkt%#Q!Y(AFy$Z#gt@#vArH%%6G;A}JQ)Q^X86*QuJYdj<3fxmFToOyC`cGNa ziDh6f9bqi|L*e*cH;{v_QZCEG0ZpqsXDFm?WK(EPxAg9__i3o6JgXc{S?>f%XghC( z+K-%Cfn7x%n;=zaBY_Nk(LRyY=wy*+-ubA;U~c$MG*oxly6SsoSI6B9)m iT`4VSPC)Sxk0@^iRXnCYiIkxDQ#?yMcutWF_WuAFJ;3h( literal 0 HcmV?d00001 diff --git a/Bai5/Bai5/src/Class/HoDan.java b/Bai5/Bai5/src/Class/HoDan.java new file mode 100644 index 0000000..e0efa82 --- /dev/null +++ b/Bai5/Bai5/src/Class/HoDan.java @@ -0,0 +1,61 @@ +package Class; + +import java.util.Date; +import java.util.Scanner; + +public class HoDan extends Nguoi { + // thuoc tinh + private int soNguoi; + private int soNha; + private Nguoi[] list; // list la mang danh sach chua cac thanh vien trong ho + + // phuong thuc + // ham khoi tao khong doi so + public HoDan() { + list = new Nguoi[10]; + } + + // ham khoi tao co doi so + public HoDan(String hoTen, Date ngaySinh, String ngheNghiep, int soNguoi, int soNha) { + super(hoTen, ngaySinh, ngheNghiep); + this.soNguoi = soNguoi; + this.soNha = soNha; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap so nguoi: "); + soNguoi = sc.nextInt(); + sc.nextLine(); + System.out.print("\tNhap so nha: "); + soNha = sc.nextInt(); + sc.nextLine(); + System.out.println("\tNhap thong tin cho tung nguoi trong ho:"); + for (int i = 0; i < soNguoi; i++) { + System.out.println("Nguoi thu " + (i + 1) + " la:"); + list[i] = new Nguoi(); + list[i].nhapThongTin(sc); + } + } + + // hien thi + public void hienThiThongTin() { + System.out.println("\tSo nguoi: " + soNguoi); + System.out.println("\tSo nha: " + soNha); + System.out.println("\tThong tin cua tung nguoi trong gia dinh:"); + for (int i = 0; i < soNguoi; i++) { + System.out.println("Nguoi thu " + (i + 1) + " la:"); + list[i].hienThiThongTin(); + } + } + + // ham lay ra thanh vien trong ho dan + public Nguoi[] getList() { + return list; + } + + // ham lay ra so thanh vien trong ho gia dinh + public int getSoNguoi() { + return soNguoi; + } +} diff --git a/Bai5/Bai5/src/Class/KhuPho.java b/Bai5/Bai5/src/Class/KhuPho.java new file mode 100644 index 0000000..8cadfa8 --- /dev/null +++ b/Bai5/Bai5/src/Class/KhuPho.java @@ -0,0 +1,66 @@ +package Class; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Scanner; + +public class KhuPho { + // thuoc tinh + private ArrayList dshd; + + // phuong thuc + // ham khoi tao + public KhuPho() { + dshd = new ArrayList(10); + } + + // ham them 1 ho dan + public void themHoDan(HoDan hoDan) { + dshd.add(hoDan); + } + + // ham nhap vao danh sach ho dan + public void nhapDanhSach(Scanner sc) { + HoDan hoDan; + + System.out.print("Nhap vao so ho dan: "); + int soHoDan = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap vao thong tin cho tung ho dan:"); + for (int i = 0; i < soHoDan; i++) { + System.out.println("Ho dan thu " + (i + 1) + " la:"); + hoDan = new HoDan(); + hoDan.nhapThongTin(sc); + themHoDan(hoDan); + } + } + + // ham hien thi danh sach + public void hienThiDanhSach() { + int n = dshd.size(); + + for (int i = 0; i < n; i++) { + System.out.println("Ho dan thu " + (i + 1) + " la:"); + dshd.get(i).hienThiThongTin(); + } + } + + // ham tim kiem thong tin + public void timKiemThongTin() { + // lay ra duoc nam hien tai + Date now = new Date(); + int namHienTai = now.getYear() + 1900; + + Nguoi[] dstv = null; + + for (HoDan hoDan : dshd) { + dstv = hoDan.getList(); + for (int i = 0; i < hoDan.getSoNguoi(); i++) { + if (namHienTai - (dstv[i].getNgaySinh().getYear() + 1900) == 80) { + hoDan.hienThiThongTin(); + } + } + } + } +} diff --git a/Bai5/Bai5/src/Class/Nguoi.java b/Bai5/Bai5/src/Class/Nguoi.java new file mode 100644 index 0000000..cf27dae --- /dev/null +++ b/Bai5/Bai5/src/Class/Nguoi.java @@ -0,0 +1,73 @@ +package Class; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class Nguoi { + // thuoc tinh + private String hoTen; + private Date ngaySinh; + private String ngheNghiep; + + // phuong thuc + // ham khoi tao khong doi so + public Nguoi() { + + } + + // ham khoi tao co doi so + public Nguoi(String hoTen, Date ngaySinh, String ngheNghiep) { + this.hoTen = hoTen; + this.ngaySinh = ngaySinh; + this.ngheNghiep = ngheNghiep; + } + + // nhap cac thong tung nguoi trong ho gia dinh + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + System.out.print("\tNhap ngay sinh: "); + String strDate = sc.nextLine(); + ngaySinh = strToDate(strDate); + System.out.print("\tNhap nghe nghiep: "); + ngheNghiep = sc.nextLine(); + } + + // ham thuc hien chuyen string sang date + private Date strToDate(String strDate) { + Date date = null; + + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + try { + date = sdf.parse(strDate); + } catch (ParseException e) { + System.out.println("Loi dinh dang ngay thang!"); + } + + return date; + } + + // hien thi ra tung nguoi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + dateToString(ngaySinh)); + System.out.println("\tNghe nghiep: " + ngheNghiep); + } + + // ham chuyen dinh dang tu date sang String + private String dateToString(Date date) { + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + String strDate = sdf.format(date); + + return strDate; + } + + // ham lay thong tin ve ngay sinh + public Date getNgaySinh() { + return ngaySinh; + } +} diff --git a/Bai5/Bai5/src/Testing/Test.java b/Bai5/Bai5/src/Testing/Test.java new file mode 100644 index 0000000..d765353 --- /dev/null +++ b/Bai5/Bai5/src/Testing/Test.java @@ -0,0 +1,20 @@ +package Testing; + +import java.util.Scanner; + +import Class.KhuPho; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + KhuPho qlkp = new KhuPho(); + + qlkp.nhapDanhSach(sc); + + System.out.println("Danh sach ho dan co nguoi 80 tuoi la:"); + qlkp.timKiemThongTin(); + } + +} diff --git a/Bai6/Bai6/.classpath b/Bai6/Bai6/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai6/Bai6/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai6/Bai6/.project b/Bai6/Bai6/.project new file mode 100644 index 0000000..c3c00cd --- /dev/null +++ b/Bai6/Bai6/.project @@ -0,0 +1,28 @@ + + + Bai6 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272597 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs b/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai6/Bai6/bin/Class/KhachSan.class b/Bai6/Bai6/bin/Class/KhachSan.class new file mode 100644 index 0000000000000000000000000000000000000000..246c68af5ae725767aa33238c68dbf2544c3e579 GIT binary patch literal 2154 zcmZ`)ZC4vb7`>AOHiU&jkXC4EW3e^?+Vss zswV68^!2JNSBugy5E1CREjMMlCY?(9#>#E0>jHxX{h{I8we%IwlUoJ5?q>zM zigv}3e#5f_PCjiSTg`*Th+nl?PhUGN z7Ee;9U$xe?7^F!8$@VRZd1^rsIAUT1M@e0-u2Pp|tLQexvZ-Z?wnpXlB~b`W;#B3v zv~(zVxhill2-mt6%hGWyk9oTAJYFzxVqZUsTXo-BH*pe4W_KG*5Ol?M)AOF~_(k8d zh|=O{8%~pkqS;K2aa>ZKtAj zIEM=c&I|PKwJD%);ze8(FdXZSpH~p)j}zU{R5Cw$M%s1hbkysDTQnrV&py&`aE&%Q0Rs|~xhYI#vi(eJvs3LxQE8`R-4 zUQ=#5qu#EWcpZ6KQ*LZn4m*2<2Kx`W0FDx0rv(!=Nh+5yt77K_PPLn1N38$FP?7T{ z-qf1-Zfn1R;{Jn4+r)4aJ!)7mv54b=iAqYBlI_HJ29`_=VVJI~m)X@;#(kDzLv{BB zgu@@}6t+N5(U;}5S-BCMjRRHNa!OTu$DhjXWfQAltD?4VdD3@1W!gX(ogyEsXS-2> zZGf(h@0nuftBKoKqhzZ0Pxifa(PUMHw6}v84|Bj|r$~jpVd5h&y-}6*ISoT+@u)@V zjcSR^TbIJL!r3(Ov36m_@~39!^xBq*yK2qkTG5@W$gM!zPfdJ=&jq^q;hHVym9W~j z(?nF!eE1q)@HJL+8(!I(vDFpRqb|-G&EX45ri`4ym-vd$VeV7p+hpw3 RGKz4EzHqO|B8fq|&PSYKAEbplTz(GE&A=LMAts=#|AaJ-#*;MWvV#qXUToNUAKYuR$x^88v( zAzt&GfnMbmM(=sP7v5JG$t>?GM7M%{H;EBUnizwrFj@3`x70bui=WB-eTFQ%H z!9)zBa#}KBATB4%L;^_#)2}Tdq33@3wNwyOQ8F6R+b+0&gH= z;7vjw;_5{^bPr4{!zM35Csdf}1NMUK4tWg8rt2K!;<%wOl_)W$)ebD5g|Na_uwf-} z6K@&FQmfsbwlncI)|g^bT+#PA3<<{DxMScQg^Sw7a0({g#kzvwyFZ2nalzsh#9+fj z4)<7O(MaVKrZdZD$&P~+PxXOI!&ptBY{QCUlkxg;_Q{c0Tt76i1vX4lT<3$1?ghrB zDAKMn(SDR+n5_O}-E;j)-8(9YFkdk77^Z!_f^d3cx<6CxQ;_)z%+t?FdBy1s*|9`-=tGQwMWVXk6rK7>* zCd)ymRdpYEGLYj(-@{E|lU>bz;2$!Ah|CF35t$Obb4Iw2@&$*R>o{+>xGU~4`w$bq z>t`3ZCTRvfh++~Kd6MURgcPQ@i-T#d;^1e7GPqmfz+UNM#$M=R&R*=|vOOQ|V$q(9 zb&)>ty`QBM31G&)NsD9Ktn#i%|> zk}N+Iv((U5%y*^-p%7|Ht_)-5uK7z7@+)#d`Nyf_2h2hn*fOJqS>(_`I)J?BUDPif{UgbPrBnae{i5ctLzo+`uAMafcJ| z4B4Uj?i|;5AL|2LS?+=>COCfOAp&U-=_2VKN$=I>aFIVYjvO1Oe|yDv{aoYk^sCx` D3oBo0 literal 0 HcmV?d00001 diff --git a/Bai6/Bai6/bin/Class/Nguoi.class b/Bai6/Bai6/bin/Class/Nguoi.class new file mode 100644 index 0000000000000000000000000000000000000000..b25d26a6c5518599f89000070ba13df16130a801 GIT binary patch literal 2103 zcmZ`)ZBrXn6n-uQHl#~wDK7;}8z@o;fz*~lC0J{DvDhR<6H&ysCD|rR!){DAPWkFT z@K^Z7ajYX@#?JTy{88$2?uM5Dg_*tga?X9ubIy70;h%s1`WwI;d;@I?mzK*`t(M3X z>z-pEq;O@|`q4_1Ew`9>zO!rReT9yam$O}k-qeXL>sKAOm{bV6MQcCnxFuc<>~-HM zCsr)qrZu#j&a5b?b%o9)$94Qi3hk3qn_}?_b_DI{F>wi|LQl$Z?M!`d$FAnAow6MUG;z`*em8?2Vk zn%UM~GK_JB%Uu~pik7^nZ@Y`p2qrLT;EuvIUE|g(CZ-T$A1Z=E*b8!<+KeEMSpzc) zS2e_G&L$GLE4{K``BG+uzR9Wc1qB`6w*T6^Ymrl{=Mp{;Wq?l^;O=k_>M=(gbKPg?X|)Sg&RR87xJWN z6^l50%B2;H4&7Pb%D+rglJWu!e9@{n{RRzeQBEf<4|>y6a%?wOa*niY;A@3J?WNy# z@P41vopQmhhVd;s+x7HVjN4d^U>lZ+9k3ytR;6OQ1%;WnclKS@9+Aul zhVdcm+QwfFnsX8*Fd&eshTLVt=B)f$tkAkoA$F7#Ic{ za9R!Jz%bN+8yHT+(5oB%fMn)z4-0sPho?lAYNn;|1D2Y#OmNi#B!{72Ni0yQNEvjx KNTF5jRr?=g3A8-` literal 0 HcmV?d00001 diff --git a/Bai6/Bai6/bin/Testing/Test.class b/Bai6/Bai6/bin/Testing/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..69991530baf0b373be1a9fcf3fdf783e52fca7a5 GIT binary patch literal 1150 zcmZuwYflqF6g^W4+m;ndc`7IiinhEeh!0*xX+0TrpN3^a7q`2$-4gvrew7bx zB8fl1A7wn#qJWT1X7wYC};=>=mo3l+wM_P?HYmt(PMcclaA!s z&cU%|`T`v*wrl$-fwp*JPav4~4y_2<5Z2L-4uS5R?ONNl(t%Ye$OFd`h~+#}I(xEW zEBpK~=ojs(Kv(W^&1L2*N!t||h=0so)Xw`A!dg!3Y3LE?X*z1Y?IiQ2bX}_wMlbp` z^j!g*|628}l8ylk3ItTr{#HucOJ?12&1Y6imX;%k;*!; z=|5T(1xX!`F(;t8))zmkVmaWfh9?4p|4(AQW;=&gC4{G(?&@mFD0uEs6OQ3Xg=ikn z6{9nXokbl>;ABGzbAgaK ds; + + // phuong thuc + // ham khoi tao + public KhachSan() { + ds = new ArrayList(10); + } + + // ham them khach tro vao khach san + public void themKhachTro(KhachTro kt) { + ds.add(kt); + } + + // ham nhap danh sach + public void nhapDanhSach(Scanner sc) { + KhachTro khach; + + System.out.print("Nhap vao so luong khach: "); + int n = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap vao thong tin khach tro:"); + for (int i = 0; i < n; i++) { + System.out.println("Khach tro thu " + (i + 1) + " la:"); + khach = new KhachTro(); + khach.nhapThongTin(sc); + themKhachTro(khach); + } + } + + // ham hien thi + public void hienThiDanhSach() { + for (KhachTro khach : ds) { + khach.hienThiThongTin(); + } + } + + // ham tinh tien + public double tinhTien(int CMND) { + double tien = 0; + + for (KhachTro khach : ds) { + if (khach.getCMND() == CMND) { + tien = khach.getSoNgayTro() * khach.getGiaPhong(); + } + } + + return tien; + } +} diff --git a/Bai6/Bai6/src/Class/KhachTro.java b/Bai6/Bai6/src/Class/KhachTro.java new file mode 100644 index 0000000..d49a4a0 --- /dev/null +++ b/Bai6/Bai6/src/Class/KhachTro.java @@ -0,0 +1,58 @@ +package Class; + +import java.util.Scanner; + +public class KhachTro extends Nguoi { + // thuoc tinh + private int soNgayTro; + private String loaiPhong; + private double giaPhong; + + // phuong thuc + // ham khoi tao khong doi so + public KhachTro() { + + } + + // ham khoi tao co doi so + public KhachTro(String hoTen, int CMND, int soNgayTro, String loaiPhong, double giaPhong) { + this.hoTen = hoTen; + this.CMND = CMND; + this.soNgayTro = soNgayTro; + this.loaiPhong = loaiPhong; + this.giaPhong = giaPhong; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + + System.out.print("\tNhap so ngay tro: "); + soNgayTro = sc.nextInt(); + sc.nextLine(); + System.out.print("\tNhap loai phong: "); + loaiPhong = sc.nextLine(); + System.out.print("\tNhap gia phong: "); + giaPhong = sc.nextDouble(); + sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + + System.out.println("\tSo ngay tro: " + soNgayTro); + System.out.println("\tLoai phong: " + loaiPhong); + System.out.println("\tGia phong: " + giaPhong); + } + + // ham lay ra thong tin so ngay tro + public int getSoNgayTro() { + return soNgayTro; + } + + // ham lay thong tin gia phong + public double getGiaPhong() { + return giaPhong; + } +} diff --git a/Bai6/Bai6/src/Class/Nguoi.java b/Bai6/Bai6/src/Class/Nguoi.java new file mode 100644 index 0000000..ce4cf62 --- /dev/null +++ b/Bai6/Bai6/src/Class/Nguoi.java @@ -0,0 +1,62 @@ +package Class; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class Nguoi { + // thuoc tinh + protected String hoTen; + protected Date ngaySinh; + protected int CMND; + + // phuong thuc + // ham khoi tao khong doi so + public Nguoi() { + + } + + // ham khoi tao co doi so + public Nguoi(String hoTen, Date ngaySinh, int CMND) { + this.hoTen = hoTen; + this.ngaySinh = ngaySinh; + this.CMND = CMND; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + System.out.print("\tNhap ngay sinh: "); + String strDate = sc.nextLine(); + ngaySinh = strToDate(strDate); + System.out.print("\tNhap CMND: "); + CMND = sc.nextInt(); + } + + private Date strToDate(String strDate) { + Date date = null; + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + try { + date = sdf.parse(strDate); + } catch (ParseException e) { + System.out.println("Loi dinh dang ngay thang!"); + } + + return date; + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + ngaySinh); + System.out.println("\tCMND: " + CMND); + } + + // ham lay ra thong tin CMND + public int getCMND() { + return CMND; + } +} diff --git a/Bai6/Bai6/src/Testing/Test.java b/Bai6/Bai6/src/Testing/Test.java new file mode 100644 index 0000000..e9d494d --- /dev/null +++ b/Bai6/Bai6/src/Testing/Test.java @@ -0,0 +1,24 @@ +package Testing; + +import java.util.Scanner; + +import Class.KhachSan; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + KhachSan ql = new KhachSan(); + + ql.nhapDanhSach(sc); + + System.out.print("Nhap vao khach tro can tinh tien: "); + int cmnd = sc.nextInt(); + + System.out.println("==> Tong tien la: " + ql.tinhTien(cmnd)); + + sc.close(); + } + +} diff --git a/Bai7/Bai7/.classpath b/Bai7/Bai7/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai7/Bai7/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai7/Bai7/.project b/Bai7/Bai7/.project new file mode 100644 index 0000000..35ffd2f --- /dev/null +++ b/Bai7/Bai7/.project @@ -0,0 +1,28 @@ + + + Bai7 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272605 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs b/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai7/Bai7/bin/Class/HocSinh.class b/Bai7/Bai7/bin/Class/HocSinh.class new file mode 100644 index 0000000000000000000000000000000000000000..5f2738ff4796676658cfba07824b3d3130b6d767 GIT binary patch literal 1524 zcmbVMU2hXd6g}fOUfWC(u)!pzPzNZ)>m+U=q-_kLC44p^1Z*PlxHv2Cg0pMc>#BL{ zQy=t!h2$`a!Fvkb3Kde5f$__Q0&E+kW6j z>wL6O-c?9$gnMol6PVJ-AgeI5zF)s;5nU!7Y40{ zA1D-twEB_XuGX7Q5V+l1c~>$oX6Y| zt2>l9qR_6hUrS?wMagV4W{JgED`jD0(LzNbZ{R-l*I2?bbLt2LF+Zc3aQhlJEPSJI z#z2fy*SLulg>>Nl5=p_R(?a>A%xSDLpO}^?Q}V**S}Be16sCvPgV?5!=&?)kF~)c( z)^x`6-Js$5ALSI)?r7AIwQ!dO857L(-Mzlw-gCQY{Ky8(Y{h!4V?$bOIg52X(0GVP zymUGpH`r5H`kVqM@)_dR1mcOtPey_$jGJ8)-_m$0!dgbyc96z1Da+dzH2naxqw zsg@g&phC7D_Pb5@p)W13*+MdF%aR%9*=iG<#|b2)^SDb$- zk&Sq*+La@G`4{GM*9R!ul>w?GCFfhm=UF*_dwd>adYRb31xCF{6)urSiMx3Y*AB-{{CX--6Fckd8 N*yG93 z$5Id!IKOZFWTfkcT}?mR+c(RuK&a*vO;P`&Sz9`d?QJxtEfS>&1g12EFe-P`8We=(ZdOACqXL>; zGaAL3V^@n7i->j8cqJCfhHab8jEpjmD+(?Tu~#^3x#oce9dQ=zv`OTY55aQM+horr zho*6m3FBRXiAbKA^qQl)roFDKxQh1_TobtHaX###VF?NLr6Hp*>>0%;N-CC-Qm`U$ z!3!~nS;H#QvUlc7SMn|}xs*7~PZ;mh+eaqbthd-_2~OaqMhSf&5NWy1q9eO4uy_`Z zx4RI=8fo%lQXKjVs$*Rj2(-#9cEI|CUW$l0WCjKI1m?VATmnxQtb<0~ls8*W^T2S! zpuE&dC6&vi4*5?-1`njX5_0!Y!-hm0Y8cIy8O9@aIqO(@g*E9F>RtCrbZgwkCI6pj zcr0mFJeuo#FP{p`^wV$4IFDYI&4z0^6i2Y)u`trA{3vkAujEXe)TgUwD?KuD!;k=t2jJ$>k1`1R&4Xd6vgqGP!b$ z8$=|3z1_DO0Jq@rGtcj30@4XB&Y8G?Ygpu{xr*D|NfLBFT@UCQ?%*!L%oEf);RX1g zbEOOKH(JZ0<0AJ4nce7z$GD$Q5!1)HUopNOlz28f*jjnzIYi0M6S_$D=e$NG7;c#y zuafgLIlGQ4Y?lOb%MaWG68F+`4AJ5#%LveG3R&bBZ<^;ko{{5idd?#7uWSQFpkPNq zLE&)W_KEzv@p(@bKhs<`AWM*MP}+@td5o`;e_*nMuRHjjs825T{EJuzmEnu3e=*bZ z=!+rhHT(|2+{Fz-e@YB}k!5=#vskt-GPz1TA!3+$#f`7hQSZn51J0qI^FE%R;T(J0 MdGk!?x|ibMKd^?qYXATM literal 0 HcmV?d00001 diff --git a/Bai7/Bai7/bin/Class/QLHS.class b/Bai7/Bai7/bin/Class/QLHS.class new file mode 100644 index 0000000000000000000000000000000000000000..3e2954f68e4ba07855170b9a16000f60150b3109 GIT binary patch literal 2517 zcmZ`*TUQfT6#h;Um=Fe#Ab26#RI3f)<`tDh1f`bL5TrpY_T~_#%xIXw$;67i+S>cQ z4_&K$s!u-m7FO$8U48bcf1zvjZ?yJ1lYs=Z4>>t!pL6#9_P4)%lKcPu_B((h_*y|g zAabUtl}dxt*@?V@kieEJ+I4NPs9B4HQ}b8!f-4YOC>bSz&aAgpcFp48nB!;*l7AX-#3A)=s7 zpyLtYB4|asJQC%dM5br92?ASHG@wzSEo)kOuDmp_J2TpRk#M3}yPy?kHOG`|-xzWY zlj*2FDw(+iqJ&9ZbSC9`<~`xWflP=@?U$<>!sJc$Iu+htb7FNJ9jo_9>k z&AX1SEv3Rp3dC{@6~C_8@sb@cmThY>ZrFu*iNp`bBk03`g8nsfH#$%;hywx*%hKnj z92vs276~zeLpY+~ut0mQK7Ix&j$%kavGf~mM!H~eGhrMT=<`syhJ@pqR=i-?>#*Xk zBh3q>Cte~y!xH7Nij)MScwmZ_f|CNL!MxejG=4*WXuMc@Mt6~y4 zfv{^=&r_?3hr^~6oEK=>&?FH|p+ydP6*JgFxk?GmNCIa}D?-)Js@Q>@lw7I6a@O_T znw$iL#ZQJGlkW4bR=7GzAJx`qGfdr@G0ZhpN{zp);<7AYsAS$`H@0G4MFC_hxTt%A z*uYu!c}Pi+uc%l=gv$4wuHmG`HJ8qr`clo(mB>6qny0H)TvbuT68SP+-O*gzk&WW> z<#kHNx2Kw6p=52<@YE9E@=>>)lZK}#bs!E0sjRomPLUJ*W1@wp7$$k17v)C7xi zjO6XIQ_#oB?Ab$v`Ao+aqTj45zus7!;OiME@;|OsEM3bvfllRa% zwGq0r?DPDjsHFj2udp1Fsqxm8S0_VMPk$-W9M+zyG((5^cV?n`Jv$Rv{t z4yF-iA}xr~whP_ZjS~bkMmT4&7w2f3!9EZAkt(Ql=ofGi&k^z%Z_6YC{GPxZF46yX zz824O7QzdR(Sg7Nx^7S)6h60t^mD|E>ovK`YtaaW;@sWpA+CIi7#IlW5lNAVh zm^&rg{0l+0N%t+bfej?Q1P=HKe8Wr9>42X=?k-~eYw#y~DVR^IcsbL#;lcf@Ms5}E zFeQ^>*ff9ThtW^KvQMhS4y?l+z!wC`pI@~3GLe$lDnT|Q*zzmKn(p1LnR^Y!?1Q@H!A$ZwHZ<+&*JV8 zZwPh1zKjNr@EHb6-JAu&t8pP2#xkEu9qw|_AX$akBMnK0WGfH`!p)T}E~VW_AdOKC zBmW34pZkGbGcbm6hKK?kZ9@t#cOdIwK&Upa6?6>awi17bVItErMG@a+(2Fkj{oKdW zep$yP5^9+;U}BmIkq)o#a_N-0H}4IqbiOk z49ka3D66L9S*9_n07?dzTtI;x6 l*61H7V7#TtZ1dtJcIeFj#b2RFs?wCbi`T6p_b3vNo%Z literal 0 HcmV?d00001 diff --git a/Bai7/Bai7/src/Class/HocSinh.java b/Bai7/Bai7/src/Class/HocSinh.java new file mode 100644 index 0000000..bb12ffd --- /dev/null +++ b/Bai7/Bai7/src/Class/HocSinh.java @@ -0,0 +1,52 @@ +package Class; + +import java.util.Scanner; + +public class HocSinh extends Nguoi { + // thuoc tinh + private String lop; + private String khoHoc; + private String kyHoc; + + // phuong thuc + // ham khoi tao khong doi so + public HocSinh() { + + } + + // ham khoi tao co doi so + public HocSinh(String hoTen, String lop, String khoaHoc, String kyHoc) { + this.hoTen = hoTen; + this.lop = lop; + this.khoHoc = khoaHoc; + this.kyHoc = kyHoc; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + + System.out.print("\tNhap lop: "); + lop = sc.nextLine(); + + System.out.print("\tNhap khoa hoc: "); + khoHoc = sc.nextLine(); + + System.out.print("\tNhap ky hoc: "); + kyHoc = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + + System.out.println("\tLop: " + lop); + System.out.println("\tKhoa hoc: " + khoHoc); + System.out.println("\tKy hoc: " + kyHoc); + } + + // ham lay ra thong tin ve lop + public String getLop() { + return lop; + } +} diff --git a/Bai7/Bai7/src/Class/Nguoi.java b/Bai7/Bai7/src/Class/Nguoi.java new file mode 100644 index 0000000..d84603f --- /dev/null +++ b/Bai7/Bai7/src/Class/Nguoi.java @@ -0,0 +1,70 @@ +package Class; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class Nguoi { + // thuoc tinh + protected String hoTen; + protected Date ngaySinh; + protected String queQuan; + + // phuong thuc + // ham khoi tao khong doi so + public Nguoi() { + + } + + // ham khoi tao co doi so + public Nguoi(String hoTen, Date ngaySinh, String queQuan) { + this.hoTen = hoTen; + this.ngaySinh = ngaySinh; + this.queQuan = queQuan; + } + + // ham nhap vao thong tin + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + + System.out.print("\tNhap ngay sinh: "); + String strDate = sc.nextLine(); + ngaySinh = strToDate(strDate); + + System.out.print("\tNhap que quan: "); + queQuan = sc.nextLine(); + } + + private Date strToDate(String strDate) { + Date date = null; + + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + try { + date = sdf.parse(strDate); + } catch (ParseException e) { + System.out.println("Loi dinh dang ngay thang!"); + } + + return date; + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + ngaySinh); + System.out.println("\tQue quan: " + queQuan); + } + + // ham lay ra que quan + public String getQueQuan() { + return queQuan; + } + + // ham lay ra thong tin ve ngay sinh + public Date getNgaySinh() { + return ngaySinh; + } +} diff --git a/Bai7/Bai7/src/Class/QLHS.java b/Bai7/Bai7/src/Class/QLHS.java new file mode 100644 index 0000000..95a4c52 --- /dev/null +++ b/Bai7/Bai7/src/Class/QLHS.java @@ -0,0 +1,64 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QLHS { + // thuoc tinh + private ArrayList dshs; + + // phuong thuc + // ham khoi tao + public QLHS() { + dshs = new ArrayList(10); + } + + // ham them hoc sinh + public void themHS(HocSinh hs) { + dshs.add(hs); + } + + // ham nhap danh sach + public void nhapDanhSachHS(Scanner sc) { + HocSinh hs; + + System.out.print("Nhap vao so luong hoc sinh: "); + int n = sc.nextInt(); + + System.out.println("Nhap thong tin cho hoc sinh trong danh sach:"); + for (int i = 0; i < n; i++) { + System.out.println("\tHoc sinh thu " + (i + 1) + " la:"); + + hs = new HocSinh(); + hs.nhapThongTin(sc); + + themHS(hs); + } + } + + // ham hien thi + public void hienThiDanhSach() { + int n = dshs.size(); + for (int i = 0; i < n; i++) { + System.out.println("\tHoc sinh thu " + (i + 1) + " la:"); + dshs.get(i).hienThiThongTin(); + } + } + + // ham tim kiem thong tin + public void timKiemThongTin(int nam, String que) { + for (HocSinh hs : dshs) { + if ((hs.getNgaySinh().getYear() + 1900 == nam) && (que.equals(hs.getQueQuan()))) { + hs.hienThiThongTin(); + } + } + } + + public void timKiemThongTin(String lop) { + for (HocSinh hs : dshs) { + if (lop.equals(hs.getLop())) { + hs.hienThiThongTin(); + } + } + } +} diff --git a/Bai7/Bai7/src/Testing/Test.java b/Bai7/Bai7/src/Testing/Test.java new file mode 100644 index 0000000..1f5515e --- /dev/null +++ b/Bai7/Bai7/src/Testing/Test.java @@ -0,0 +1,25 @@ +package Testing; + +import java.util.Scanner; + +import Class.QLHS; + +public class Test { + + public static void main(String[] args) { + Scanner sc=new Scanner(System.in); + + QLHS list=new QLHS(); + + list.nhapDanhSachHS(sc); + + System.out.print("Nhung hoc sinh sinh nam 1985 va que Thai Nguyen la:"); + list.timKiemThongTin(1985, "Thai Nguyen"); + + System.out.println("Nhung hoc sinh hoc lop 10A1 la:"); + list.timKiemThongTin("10A1"); + + sc.close(); + } + +} diff --git a/Bai8/Bai8/.classpath b/Bai8/Bai8/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai8/Bai8/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai8/Bai8/.project b/Bai8/Bai8/.project new file mode 100644 index 0000000..1279f85 --- /dev/null +++ b/Bai8/Bai8/.project @@ -0,0 +1,28 @@ + + + Bai8 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272615 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs b/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai8/Bai8/bin/Class/CBGV.class b/Bai8/Bai8/bin/Class/CBGV.class new file mode 100644 index 0000000000000000000000000000000000000000..c4179f3f7f9e612afcfedb2b49396cb016836029 GIT binary patch literal 1419 zcmZuwYg5xe6g^v@O-evS9zIa3qLvn@f{L_0kXC$EL|cn|3? z4J0uvaExKrX1Kp=wW{W>YYB{({krMa%$6h1UE^S2J8c1@+y__S(X-8F)n@&w;|WZq z%WuthW-bgIH&>~fo@ccRb2V9R%D@Rs=s1bf37irbQ-QAOHFA{??ZDbMa0W9(>4$7$ zGRoulxviGt1(l#>nfnC|=ZH?MhCh9!Z~sEJ6rd`f1zVIYCHhFfGc@=84;-)#dL;xa04Ku264)~>VL|FBI# zZO8Jew)0mO$^Lx<_jA6zbJS}q<+=ns;82PNij&V)$Ixxy~WBkBS6@=p$=ZT_Vf~!n$ zz;ZHnJCi-YE3*78*SV}TzG1Zw zX-SovV7V!bU>cM1mGQgCCzZhr=kgp@a31$be~GW5hFJxDDuUOAPM|2@4#5jKEZrtP zvQgQfLl*84?hmZ(jISS{B=K~x(ZSOWp8s`hMULeoj#rUm<%pviIaYg)ep{!NC}{%7 y;4HGZg?Wz70&FZEV&3U7Ut?Uve2$Gp(tXA1C!&u*N*7ngr9+p8dY89V)SEwx0UP=N literal 0 HcmV?d00001 diff --git a/Bai8/Bai8/bin/Class/Nguoi.class b/Bai8/Bai8/bin/Class/Nguoi.class new file mode 100644 index 0000000000000000000000000000000000000000..1aefa9149b0411bf3a2dc129ce8e1230f5c6ecfc GIT binary patch literal 1368 zcma)5ZBNrs6n-unv@1nmZ-Bg5RB$UV14NV!Q9%)9nUXC_{8&b_mXvmEt&tCY@gHeq zB%1gG{87ep+p!JD2eV}No}PQ3^E}Tv_xGP4zW}TwFQAWMaM#irjZC5HIi`Rx!^nyD zQOj7GUCq2ZI?*dGL%-pabekcX@8pVZ-L$JY2GOo+=S9;t7=$xVKlC&@Ik08grn}7$ zN~OyT;a%rgmk`2`j0hx#;k;?<1@H7oua~qVOXt{5MYGCU-Q;oWW7sv!2E$OkizJoY zO!X4^pD*ch1PpN*{TSf8qzob0jmr=*z#!X(Rx25fT`id;BiSnCxu%sVRy5nz>p6}x zg&6_U*UT!OH(dQx#vLdm+wsV^L_o@PGVjSOmn_q@)0~LA47VZ$s-zf>;_7x*k#HaL z0_GTEzQxzC$asJhwV}pQ2=)f~>9PbBivkuHMtz8G&N7y;%v+^@a=G(lLMq+sn1~g+ z9WdivRT|XRtRiBKlm?%v!^#=8I7=e?8WrLjz;sum4hHhzwN~aa(qrw5;pKu#x|bOL}|5}ZXYu&-K4%pOA9*3AzsMX@#VWtFtyz6 zmoi>)Qw85t%NFsP+8-%&%YH-8BXZcKSSmVRy`t}#d}1a4%`9_Kn5Ah7(W?p}%!iA1 zVLn>^N`vLEq!ALG8>HwVt&G-w^%C+|+VtTT{Y$h0Lv(qVet;Yt!U#qw;s8chcbu&5QH literal 0 HcmV?d00001 diff --git a/Bai8/Bai8/bin/Class/QuanLy.class b/Bai8/Bai8/bin/Class/QuanLy.class new file mode 100644 index 0000000000000000000000000000000000000000..4e559c059ec46151a079b738c9b4fe0d2835d2a6 GIT binary patch literal 2041 zcmZ`(TUQ%Z7~Llc9Tca#8lOIge1bN_|!`WM7~CKD2BeaOk2%eTM%?Qfs+K2TWBuJ!aGv8QRroF0R1lLGd&*i8@v{q)5Mv2(IKucD)mTYR;48W;X(2rJhtB}&O z1%ZA)+7mLx5X*29vX~d~vVxZ`H6V3Tc8!vTn}{;GU12Z$HkfvN%P}oCY9)AH+%hIg?> z59&uphQ(%HrIY@{$H$_q>-1WrsFTMcHe~Fkz+`j(>-zjJhK$_OaL<#$wQJ`Uqy*H) zy-=}@4mqSX?Ba%RnwjlQR05JS9+xp(eKtVyCx2nOWBUHK_l240}9K|Y2| zBwrE!E1U(;${8OvNZs4HvVsu5fbiHUw6QaE?scoD=>7%0KYHi;ICgqS8c%khhqHdJ zX|*T};Car3Y@m<0#4G`>sbfE*cf5+>-3F5C?Sz@X*F)*Ao%B%{gX@S8N09#wAMbDG zZ6V(NPZ$lysu(BctpyIR@5+@#6>kM+Lys}b*%=o1!b_)E=?jJKSFsv?uZm<9cX{Rv z+k2R7qeAT29Gc|S>HSA*_ACmhj5o9$1{%_zTe9Rmpn8zpl3gJ^m_9Af311$=K!UshN z$PxE1n)3x`vWcTo$}04Y$LN{(73}pN*iN#LL(X_JzB~V`QA3#MK$P{w*p(>RjyGvN z>htX5DTm30$D~IxX-AMu=#vK^Wq~qWj?yHL{1(K09&?m?cra9FvN>5r<>t5FL*d7v zT=zKr+2GXgX%uJfY395|<>J(O#^V+7N|bxjN#M>2WZ?rOAsGfehGEH&79_)9jp6{$ Ke97|xeDyELx~3ig literal 0 HcmV?d00001 diff --git a/Bai8/Bai8/bin/Testing/Test.class b/Bai8/Bai8/bin/Testing/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..a72e60052591cf5ba170c9f909d75da58c0f7eb7 GIT binary patch literal 916 zcmZuvYikox5Ir|dvdwl)^J-14)~&B5P0aeJTAMaSS_E-@krF6^aI-GSmVLy12>mAF zAF>}3u;35yM~QPc)kMgbJ3Dvoo;l~t{QCXlCx9*NOGq#%M`jROZch_YLXshO!asA( z=5+U_dtw?PLweV8t+2%~SE+Uwk_X;LQ^p)J3Q|ZjEb5kPzK)!(=^yc~Z88*e&){~4 z`oBO%X_j|)*~*;?D+u50=k6tN_s z^dI5&X%L!@f@NH0NC?oSF{I^bFWf;C5~|6ari>g`1oh=2@Km=SxjmKSs$EYtJk^do%3FKtwo2xhk!tfD8CBFIY%&yMi%94cq=Gu`GDri_ z#TIs4FpS6h&*Jp658uAfQb1_Cuiyb5(odn~ytGV*=2JPWc7$b*6g(F5P8qfr(3F$h z@6kYuGv-G22L_d97(%5_wpfE{YiSMSwio$^`P>oz?pm>S046<0H8}aj3f)t?jbL5WCP#B@CpJVlSgln(r zwISBdaHDW%h)TVL#t`@DYHQMCEyj?kheET>qD ds; + + // phuong thuc + // ham khoi tao + public QuanLy() { + ds = new ArrayList(10); + } + + // ham them can bo vao danh sach + public void themCBGV(CBGV canBo) { + ds.add(canBo); + } + + // ham nhap vao danh sach + public void nhapDanhSach(Scanner sc) { + CBGV canBo; + + System.out.print("Nhap vao so luong can bo: "); + int n = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap vao danh sach:"); + for (int i = 0; i < n; i++) { + System.out.println("Can bo thu " + (i + 1) + " la:"); + canBo = new CBGV(); + canBo.nhapThongTin(sc); + themCBGV(canBo); + } + } + + // ham hien thi danh sach + public void hienThiDanhSach() { + for (CBGV cb : ds) { + cb.hienThiThongTin(); + } + } + + // ham tim kiem + public void timKiem(double luong) { + for (CBGV cb : ds) { + if (cb.getLuongThucLinh() >= luong) { + cb.hienThiThongTin(); + } + } + } +} diff --git a/Bai8/Bai8/src/Testing/Test.java b/Bai8/Bai8/src/Testing/Test.java new file mode 100644 index 0000000..c5c796d --- /dev/null +++ b/Bai8/Bai8/src/Testing/Test.java @@ -0,0 +1,22 @@ +package Testing; + +import java.util.Scanner; + +import Class.QuanLy; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QuanLy ql = new QuanLy(); + + ql.nhapDanhSach(sc); + + System.out.println("Danh sach nhung can bo co luong >= 8 trieu la:"); + ql.timKiem(8000000); + + sc.close(); + } + +} diff --git a/Bai9/Bai9/.classpath b/Bai9/Bai9/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai9/Bai9/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai9/Bai9/.project b/Bai9/Bai9/.project new file mode 100644 index 0000000..b972449 --- /dev/null +++ b/Bai9/Bai9/.project @@ -0,0 +1,28 @@ + + + Bai9 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272630 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs b/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai9/Bai9/bin/Class/QuanLy.class b/Bai9/Bai9/bin/Class/QuanLy.class new file mode 100644 index 0000000000000000000000000000000000000000..3c303c46c1414123d80ffe21fd0efd445bf61d0d GIT binary patch literal 1988 zcmZ`(U0WMP7(J7OZV1a)5NZpQShXf8kX8|uAW}dqHldV65d7+pY_m&~4Q@7A{JQd2 zc%xqR+OO~^&*S5Dul*bT1@X*gLjdc|?9A-E=RN1V@63~be*Xi&6u#CF5YQLPvQ|so zt4lj`pdlpCw=4H$sx0kN>h8|2QE&wU#hSoi#`{rst#ay??zE1GMU1%OQaaV%b3#e zia>w6QoaHmuVR`$*v2DwMM1F4D=Of19dBSpAgunVda-=*#3>hj_%LQk?L-vMP2}VB&Nmv>f_h3>CSiR zZid!h9Ts-!nyUHvdN-e#v{G5tQ32U@mJIi{v`I!?!_(=Oq-*f#9vlsy@(Q<8sXsbu zUehsLEfr*4$37ywhQ832cZ%*K9S8WFU1ZAIs>h5?%F7$%EfI+1s&%JeEL-Xw>1sX_ zlPVvcqwhh!pmbfmJN#-~1rSDvbG}|2ySTIDt$}Fr5PI?mJzIT|L-hTMfgio|gB*K2 zB%LR_(a+To_jJZH3K#J#zd{w*M_gc*0QVxvUoddJf#Jw_K6tno4vk*REXq>w| z^_jr8$A7i84S77{)S18plDLUDW;jzCnsrF~8U`_fFGx&yEGH2>rY%9TWDh+6j%k8g SX;}By!Bc;E>PsR9@YTO{53)i4 literal 0 HcmV?d00001 diff --git a/Bai9/Bai9/bin/Class/SinhVien.class b/Bai9/Bai9/bin/Class/SinhVien.class new file mode 100644 index 0000000000000000000000000000000000000000..3abe5550f1e33e043ee8328968abad25f5078bb2 GIT binary patch literal 1526 zcmbVL*-{!&5It8>mQ2(rB9e_P8Wxqrm`$>{WEaf>MO7Y0yd`773E#dT@Ay6^XE`3g9pZWsH3~YWuI~w)@vb=*%T#2bQDPAub}t3C zbhJ#YLfJaf*N=zn#>t^uYg&~ZSr3526%4-Y2$aQ&nyqvQS*#gY$5T$BS*uBVM_~Rm zN%{(GLuVDla|185Ca&WRyK2EJ1Fx0Reyw!H4j{*w2yXROyv0I-nHpUNpsvqGT#_1`53H~a8PkcE<8&d$O^dZ8jxkE%!^M{D0rhSKqbx~uQ zzywjl+=@x!M~E|pX+(9FB@d~cg_yb&l{uz1OLK~;&C;dD)MgP&-~ukT*?i_3#eDS} zE{$JrVK$X+fqcTsU+nr37`(gai4?IbIN4SO67M`{6@+h$31)_a{O)n7X m3%v0Hu}+|?eMD=Urq**<JSUBSV literal 0 HcmV?d00001 diff --git a/Bai9/Bai9/bin/Class/TheMuon.class b/Bai9/Bai9/bin/Class/TheMuon.class new file mode 100644 index 0000000000000000000000000000000000000000..131a56f3ff254668f95dd17fd7b41e95444399ab GIT binary patch literal 2328 zcmaJ?YgZFj6x}xlXA%b=5dq^XSRWw}gNWLK^@UKV1Zk6E?R!Y3$!Ic@CKD@t_t*HX z%XVp4tFG0x`n5l*?LKz`1hM7A+|6F_Bs6Z_wRoIn8MEnA`1PpHM`Zy6{}9Z z?Ry5I3j4#K3a(dObsbM(Z_AfU1+}PPdKG&;JRV$nXg{`d?ZB<&?%07dL({756`Qv9 zS#X`ULLxM(*E3zN8{V0g}xU{N4gkVSF0Y~c#7O1XI>)le8nkM2&Q ziMNOwk``rb(N>tTa1C!O#9BeK=!-xU&b*FcPgb>zOx#e2U%HsRIGLTCn4FN3+_DgZ zX=1iFMO7*+OwpW$dC7#KGf`u)BCQg0)&sp+Fok_2w7jL_c=trv8dy?D>LdjWJ6CY) zjhZ8z=KW^f4oobQSh<|d=dFo)@%A(V)K& z*ri8#YFV1cz~?&!s=LwvyLSJ!K*D+*V2ZtB)!l3Y(R$g!8u|^8*pRmGk=yOITPr(F z6IDJDEBL8~)M!f-4p!oD@W?_9b&dhM(Qv#n157XO)>ap5Mm&5A4K2sOXSZ;Om}s&; zV^YQ*^gw_)bh5oNySMhxDFrkC{eX$DS=QKs?WKaIJ)JVKE@!ge6qti=1^K&IkV7i} zgG}*PoPfZ3CMGr;sCQz<3x2yjN&dL6H2da2EB4l zaotNx4o-ge^K^-;;@X$lz=2=2*&%-8bO#O*?l2PES)mb613U@95q<@rM$0JI0RhMy zdx62s_zMhYvM-R_#v3FlV33wW?9E|%9wk;%V`oDDE;f;L077a&hagM_WXLi=mLDg& zFaOE2yqwRBZQ$f@NF~m7kj{*CaDgniOx>3s-{g;S$Y(O+8<-}y#P#J&Cad>1#o~4c zcf@UK2jxiy37jOE6tgwLfKQX~8Gg^=JkDVPX=ZPfb88HDI9r#H?FlEp6;2-SV1bmy zXOTff=#|8~I-H11y>2+aFdRwJh|0gj-3N*M2JS6qN$b7*Q}je418wb3xmUpTmA2lo!#aBl;%<}mm(;U=u0>c5|s^}pJT9thaGrizIpLg zcrn~TYv;w|@Z#pKiznelvV(6zk8NdzvELwpTU5qvMm~#sEJzh|I`&YxZZ~#?@9{&I dbdGB%{pYy(jO-&inbIF%f?g;4AGOs_{{n<6?JocT literal 0 HcmV?d00001 diff --git a/Bai9/Bai9/bin/Testing/Test.class b/Bai9/Bai9/bin/Testing/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..b2afd4551f2713c465d311041c9e5c71da0befa3 GIT binary patch literal 915 zcmZuw*>2N76g`tBb>o^gOIreg;IbxdsM(jM;w2RllG&6fQpMB6jOwWzJ9vrIC%%b3 zBodYQ06q$F$7xBB@-la3?)aR0&$<5n=jSf~&v2k2!(enp6iffuQc**ep>V=S-10cx zee9nICuUeakiLxHFf7#@J%(&M_$qWPA#WguWrlTI`r<<}=!>w+`<`GZ*@45o9uK8D zUtDHmS4IqL_B>~c@CID^3|sXt_Kdp|hg4Rp(bG_5D5i-dmY&sdxbKTFk1{qjZ2VVn z=QN7Nz`z!+GGr9!<`hx});oWg#DpsNprxaLYpVF`43+xACyMw6>C^Uj6j`4W?%St2 zs>rM5mH`vnl=WRcJmkLH;f||1m_p6hNgb$C?-;m?d!%5Hkf5`wK2evKRjuFwLsP+- z5#gDUq}@mg-;6^(y&Cbrbdo@tu}cQ+>u6wC!wy3^6^PoL12oXYLk4ZAI6NiBMSZEc z{{&VISq2^{C#x>ebzOPcQ#a&oqU$O)CE61MPu07e;{_4z%v`(u^ zgC4BXYD^zcyh5iu*04@D>f`SOsX!a&C>))kG(p8aNA+leo9~;uW7N)YyL5kydUK3D zIzOHf)KUPQ2n@1z4HZ(xM3EdWqmGS~*qnmXkM^8MR#C$Xyd>%}4d*MoPCMDBOa`sL Dn2O9k literal 0 HcmV?d00001 diff --git a/Bai9/Bai9/src/Class/QuanLy.java b/Bai9/Bai9/src/Class/QuanLy.java new file mode 100644 index 0000000..d15ed92 --- /dev/null +++ b/Bai9/Bai9/src/Class/QuanLy.java @@ -0,0 +1,46 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QuanLy { + // thuoc tinh + private ArrayList ds; + + // phuong thuc + // ham khoi tao khong doi so + public QuanLy() { + ds = new ArrayList(10); + } + + // ham them the muon vao danh sach + public void themTheMuon(TheMuon theMuon) { + ds.add(theMuon); + } + + // ham nhap vao danh sach + public void nhapDanhSach(Scanner sc) { + TheMuon theMuon; + + System.out.print("Nhap vao so luong the muon: "); + int n = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap vao danh sach:"); + for (int i = 0; i < n; i++) { + System.out.println("The muon thu " + (i + 1) + " la:"); + theMuon = new TheMuon(); + theMuon.nhapThongTin(sc); + themTheMuon(theMuon); + } + } + + // ham hien thi danh sach + public void hienThiDanhSachTraCuoiThang() { + for (TheMuon the : ds) { + if (the.getHanTra().getDate() == 31 || the.getHanTra().getDate() == 30) { + the.hienThiThongTin(); + } + } + } +} diff --git a/Bai9/Bai9/src/Class/SinhVien.java b/Bai9/Bai9/src/Class/SinhVien.java new file mode 100644 index 0000000..3fdbd60 --- /dev/null +++ b/Bai9/Bai9/src/Class/SinhVien.java @@ -0,0 +1,48 @@ +package Class; + +import java.util.Scanner; + +public class SinhVien { + // thuoc tinh + protected String hoTen; + protected String maSV; + protected String ngaySinh; + protected String lop; + + // phuong thuc + // ham khoi tao khong doi so + public SinhVien() { + + } + + // ham khoi tao co doi so + public SinhVien(String hoTen, String maSV, String ngaySinh, String lop) { + this.hoTen = hoTen; + this.maSV = maSV; + this.ngaySinh = ngaySinh; + this.lop = lop; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + + System.out.print("\tNhap ma sinh vien: "); + maSV = sc.nextLine(); + + System.out.print("\tNhap ngay sinh: "); + ngaySinh = sc.nextLine(); + + System.out.print("\tNhap lop: "); + lop = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + ngaySinh); + System.out.println("\tMa sinh vien: " + maSV); + System.out.println("\tLop: " + lop); + } +} diff --git a/Bai9/Bai9/src/Class/TheMuon.java b/Bai9/Bai9/src/Class/TheMuon.java new file mode 100644 index 0000000..1ab7820 --- /dev/null +++ b/Bai9/Bai9/src/Class/TheMuon.java @@ -0,0 +1,75 @@ +package Class; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class TheMuon extends SinhVien { + // thuoc tinh + private int soMuon; + private Date ngayMuon; + private Date hanTra; + private String soHieu; + + // phuong thuc + // ham khoi tao khong doi so + public TheMuon() { + + } + + // ham khoi tao co doi so + public TheMuon(int soMuon, Date ngayMuon, String soHieu) { + this.soMuon = soMuon; + this.ngayMuon = ngayMuon; + this.soHieu = soHieu; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + + System.out.print("\tNhap so muon: "); + soMuon = sc.nextInt(); + sc.nextLine(); + + System.out.print("\tNhap ngay muon: "); + String strNgayMuon = sc.nextLine(); + ngayMuon = strToDate(strNgayMuon); + + String strNgayTra = "31-12-2020"; + hanTra = strToDate(strNgayTra); + + System.out.println("\tNhap so hieu: "); + soHieu = sc.nextLine(); + } + + private Date strToDate(String strNgayMuon) { + Date date = null; + + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + try { + date = sdf.parse(strNgayMuon); + } catch (ParseException e) { + System.out.println("Loi dinh dang ngay thang!"); + } + + return date; + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + + System.out.println("\tSo phieu muon: " + soMuon); + System.out.println("\tNgay muon: " + ngayMuon); + System.out.println("\tHan tra: " + hanTra); + System.out.println("\tSo hieu: " + soHieu); + } + + // ham lay ra thong tin ve han tra + public Date getHanTra() { + return hanTra; + } +} diff --git a/Bai9/Bai9/src/Testing/Test.java b/Bai9/Bai9/src/Testing/Test.java new file mode 100644 index 0000000..63eb244 --- /dev/null +++ b/Bai9/Bai9/src/Testing/Test.java @@ -0,0 +1,22 @@ +package Testing; + +import java.util.Scanner; + +import Class.QuanLy; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QuanLy ql = new QuanLy(); + + ql.nhapDanhSach(sc); + + System.out.println("Danh sach sinh vien tra sach vao cuoi thang:"); + ql.hienThiDanhSachTraCuoiThang(); + + sc.close(); + } + +} diff --git a/README.md b/README.md deleted file mode 100644 index d8e4fba..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Bài tập về OOP - -[shareprogramming.net](https://shareprogramming.net/) \ No newline at end of file diff --git a/exercise_oop_account/Account.java b/exercise_oop_account/Account.java deleted file mode 100644 index 96b3f83..0000000 --- a/exercise_oop_account/Account.java +++ /dev/null @@ -1,41 +0,0 @@ -public class Account { - private int id; - private String name; - private int balance; - - public Account(int id, String name, int balance) { - this.id = id; - this.name = name; - this.balance = balance; - } - - public String getName() { - return name; - } - - public int getBalance() { - return balance; - } - - public void credit(int amount) { - this.balance += amount; - } - - public void debit(int amount) { - if (amount > this.balance) { - System.out.println("Thanh Toan khong thanh cong"); - } else { - this.balance -= amount; - } - } - - public void tranferTo(Account account, int amount) { - if (amount > this.balance) { - System.out.println("Chuyen tien khong thanh cong"); - } else { - // Tru tien tai khoan chuyen - this.balance -= amount; - account.credit(amount); - } - } -} diff --git a/exercise_oop_account/Main.java b/exercise_oop_account/Main.java deleted file mode 100644 index 1c15ee1..0000000 --- a/exercise_oop_account/Main.java +++ /dev/null @@ -1,35 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Account a = new Account(1, "A", 50); - Account b = new Account(1, "B", 10); - - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - - // Cong tien vao tai khoan - a.credit(30); - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - - // Tru tien vao tai khoan - a.debit(20); - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - - // Tru tien vao tai khoan khong hop le - a.debit(1000); - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - - // Chuyen tien cho b - a.tranferTo(b, 10); - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - } -} diff --git a/exercise_oop_composition_book_author/exercise_oop_composition_book_author.iml b/exercise_oop_composition_book_author/exercise_oop_composition_book_author.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_composition_book_author/exercise_oop_composition_book_author.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_composition_book_author/src/Author.java b/exercise_oop_composition_book_author/src/Author.java deleted file mode 100644 index 582797d..0000000 --- a/exercise_oop_composition_book_author/src/Author.java +++ /dev/null @@ -1,38 +0,0 @@ -public class Author { - private String name; - private String email; - private String gender; - private int age; - - public Author(String name, String email, String gender, int age) { - this.name = name; - this.email = email; - this.gender = gender; - this.age = age; - } - - public String getName() { - return name; - } - - public String getEmail() { - return email; - } - - public String getGender() { - return gender; - } - - public int getAge() { - return age; - } - - public String toString() { - return "Author{" + - "name='" + name + '\'' + - ", email='" + email + '\'' + - ", gender='" + gender + '\'' + - ", age=" + age + - '}'; - } -} diff --git a/exercise_oop_composition_book_author/src/Book.java b/exercise_oop_composition_book_author/src/Book.java deleted file mode 100644 index 8d3011a..0000000 --- a/exercise_oop_composition_book_author/src/Book.java +++ /dev/null @@ -1,39 +0,0 @@ - -public class Book { - private String name; - private Author author; - private double price; - private int count; - - public Book(String name, Author author, double price, int count) { - this.name = name; - this.author = author; - this.price = price; - this.count = count; - } - - public String getName() { - return name; - } - - public Author getAuthor() { - return author; - } - - public double getPrice() { - return price; - } - - public int count() { - return count; - } - - public String toString() { - return "Book{" + - "name='" + name + '\'' + - ", author=" + author.getName() + - ", price=" + price + - ", count=" + count + - '}'; - } -} diff --git a/exercise_oop_composition_book_author/src/Main.java b/exercise_oop_composition_book_author/src/Main.java deleted file mode 100644 index 27938f4..0000000 --- a/exercise_oop_composition_book_author/src/Main.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Author author = new Author("shareprogramming.net", "nthanhhai2909@gmail.com", "male", 23); - Book book = new Book("Java OOP", author, 10, 100); - System.out.println(book.toString()); - } -} diff --git a/exercise_oop_composition_student_address/exercise_oop_composition_student_address.iml b/exercise_oop_composition_student_address/exercise_oop_composition_student_address.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_composition_student_address/exercise_oop_composition_student_address.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_composition_student_address/src/Address.java b/exercise_oop_composition_student_address/src/Address.java deleted file mode 100644 index fe2232e..0000000 --- a/exercise_oop_composition_student_address/src/Address.java +++ /dev/null @@ -1,39 +0,0 @@ - -public class Address { - private String country; - private String city; - private String district; - private String street; - - public Address(String country, String city, String district, String street) { - this.country = country; - this.city = city; - this.district = district; - this.street = street; - } - - public String getCountry() { - return country; - } - - public String getCity() { - return city; - } - - public String getDistrict() { - return district; - } - - public String getStreet() { - return street; - } - - public String toString() { - return "Address{" + - "country='" + country + '\'' + - ", city='" + city + '\'' + - ", district='" + district + '\'' + - ", street='" + street + '\'' + - '}'; - } -} diff --git a/exercise_oop_composition_student_address/src/Main.java b/exercise_oop_composition_student_address/src/Main.java deleted file mode 100644 index 3b72307..0000000 --- a/exercise_oop_composition_student_address/src/Main.java +++ /dev/null @@ -1,13 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Address address = new Address("VN", "HCM", "Q7", "428 LE VAN LUONG"); - Student student = new Student(); - student.setName("HGA"); - student.setAddress(address); - student.setAge(23); - student.setScore(5); - System.out.println(student.toString()); - System.out.println("Xep loai: " + student.getRating()); - } -} diff --git a/exercise_oop_composition_student_address/src/Student.java b/exercise_oop_composition_student_address/src/Student.java deleted file mode 100644 index b2059e3..0000000 --- a/exercise_oop_composition_student_address/src/Student.java +++ /dev/null @@ -1,58 +0,0 @@ - -public class Student { - private String name; - private int age; - private double score; - private Address address; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public double getScore() { - return score; - } - - public void setScore(double score) { - this.score = score; - } - - public Address getAddress() { - return address; - } - - public void setAddress(Address address) { - this.address = address; - } - - public String getRating() { - if (this.score < 5.0) { - return "bad"; - } else if (this.score >= 5.0 && this.score < 8.0) { - return "medium"; - } else { - return "good"; - } - } - - public String toString() { - return "Student{" + - "name='" + name + '\'' + - ", age=" + age + - ", score=" + score + - ", address=" + address.toString() + - '}'; - } -} diff --git a/exercise_oop_date/exercise_oop_date.iml b/exercise_oop_date/exercise_oop_date.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_date/exercise_oop_date.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_date/src/Date.java b/exercise_oop_date/src/Date.java deleted file mode 100644 index 5098c1b..0000000 --- a/exercise_oop_date/src/Date.java +++ /dev/null @@ -1,56 +0,0 @@ - -public class Date { - private int day; - private int month; - private int year; - - public Date(int day, int month, int year) { - this.day = day; - this.month = month; - this.year = year; - } - - public int getDay() { - return day; - } - - public void setDay(int day) { - this.day = day; - } - - public int getMonth() { - return month; - } - - public void setMonth(int month) { - this.month = month; - } - - public int getYear() { - return year; - } - - public void setYear(int year) { - this.year = year; - } - - public String toString() { - return "Date{" + - "day=" + day + - ", month=" + month + - ", year=" + year + - '}'; - } - - public boolean isLeapYear() { - if (this.year % 400 == 0) - return true; - - // Nếu số năm chia hết cho 4 và không chia hết cho 100, - // đó không là 1 năm nhuận - if (this.year % 4 == 0 && this.year % 100 != 0) - return true; - - return false; - } -} diff --git a/exercise_oop_date/src/Main.java b/exercise_oop_date/src/Main.java deleted file mode 100644 index 84e4055..0000000 --- a/exercise_oop_date/src/Main.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Date date = new Date(12, 3, 2016); - System.out.println(date.toString()); - System.out.println(date.isLeapYear()); - } -} diff --git a/exercise_oop_employee/exercise_oop_employee.iml b/exercise_oop_employee/exercise_oop_employee.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_employee/exercise_oop_employee.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_employee/src/Employee.java b/exercise_oop_employee/src/Employee.java deleted file mode 100644 index 33e82b3..0000000 --- a/exercise_oop_employee/src/Employee.java +++ /dev/null @@ -1,51 +0,0 @@ -public class Employee { - private int id; - private String lastName; - private String firstName; - private int salary; - - public Employee(int id, String lastName, String firstName, int salary) { - this.id = id; - this.lastName = lastName; - this.firstName = firstName; - this.salary = salary; - } - - public int getId() { - return id; - } - - public String getLastName() { - return lastName; - } - - public String getFirstName() { - return firstName; - } - - public int getSalary() { - return salary; - } - - public void setSalary(int salary) { - this.salary = salary; - } - - public String getFullName() { - return this.lastName + " " + this.firstName; - } - - public int getAnnualSalary() { - return this.salary * 12; - } - - public int upToSalary(int percent) { - return this.salary + (this.salary * percent)/100; - } - - public String toString() { - return this.getFullName() + " - " + "salary: " + this.salary; - } -} - - diff --git a/exercise_oop_employee/src/Main.java b/exercise_oop_employee/src/Main.java deleted file mode 100644 index 342c48f..0000000 --- a/exercise_oop_employee/src/Main.java +++ /dev/null @@ -1,10 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Employee employee = new Employee(1, "Nguyen", "Sin", 10000000); - System.out.println(employee.getFullName()); - System.out.println(employee.getAnnualSalary()); - System.out.println(employee.toString()); - System.out.println("Salary up to: " + employee.upToSalary(10)); - } -} diff --git a/exercise_oop_inheritance_circle_cylinder/exercise_oop_inheritance_circle_cylinder.iml b/exercise_oop_inheritance_circle_cylinder/exercise_oop_inheritance_circle_cylinder.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_inheritance_circle_cylinder/exercise_oop_inheritance_circle_cylinder.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_inheritance_circle_cylinder/src/Circle.java b/exercise_oop_inheritance_circle_cylinder/src/Circle.java deleted file mode 100644 index bb6a581..0000000 --- a/exercise_oop_inheritance_circle_cylinder/src/Circle.java +++ /dev/null @@ -1,36 +0,0 @@ -public class Circle { - private double radius; - private String color; - - public Circle(double radius, String color) { - this.radius = radius; - this.color = color; - } - - public double getRadius() { - return radius; - } - - public void setRadius(double radius) { - this.radius = radius; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public double getArea() { - return this.radius * this.radius * Math.PI; - } - - public String toString() { - return "Circle{" + - "radius=" + radius + - ", color='" + color + '\'' + - '}'; - } -} diff --git a/exercise_oop_inheritance_circle_cylinder/src/Cylinder.java b/exercise_oop_inheritance_circle_cylinder/src/Cylinder.java deleted file mode 100644 index 5cda15a..0000000 --- a/exercise_oop_inheritance_circle_cylinder/src/Cylinder.java +++ /dev/null @@ -1,21 +0,0 @@ -public class Cylinder extends Circle { - private double heigth; - - public Cylinder(double radius, String color, double heigth) { - super(radius, color); - this.heigth = heigth; - } - - public double getHeigth() { - return heigth; - } - - public void setHeigth(double heigth) { - this.heigth = heigth; - } - - public double getVolumer() { - return super.getArea() * this.heigth; - } - -} diff --git a/exercise_oop_inheritance_circle_cylinder/src/Main.java b/exercise_oop_inheritance_circle_cylinder/src/Main.java deleted file mode 100644 index 51647e6..0000000 --- a/exercise_oop_inheritance_circle_cylinder/src/Main.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Circle cylinder = new Cylinder(2.4, "red", 10); - System.out.println("Area: " + cylinder.getArea()); - System.out.println("Volume: " + ((Cylinder) cylinder).getVolumer()); - } -} diff --git a/exercise_oop_inheritance_person_student_staff/exercise_oop_inheritance_person_student_staff.iml b/exercise_oop_inheritance_person_student_staff/exercise_oop_inheritance_person_student_staff.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_inheritance_person_student_staff/exercise_oop_inheritance_person_student_staff.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_inheritance_person_student_staff/src/Main.java b/exercise_oop_inheritance_person_student_staff/src/Main.java deleted file mode 100644 index 88e73ab..0000000 --- a/exercise_oop_inheritance_person_student_staff/src/Main.java +++ /dev/null @@ -1,10 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Person student = new Student("H", "DN", "CHINH QUY", 3, 6.7); - Person staff = new Staff("D", "BT", "KHTN", 12.5); - System.out.println(((Student) student).getRating()); - System.out.println(((Staff) staff).upToSalary(40)); - - } -} diff --git a/exercise_oop_inheritance_person_student_staff/src/Person.java b/exercise_oop_inheritance_person_student_staff/src/Person.java deleted file mode 100644 index f5176ef..0000000 --- a/exercise_oop_inheritance_person_student_staff/src/Person.java +++ /dev/null @@ -1,17 +0,0 @@ -public class Person { - private String name; - private String address; - - public Person(String name, String address) { - this.name = name; - this.address = address; - } - - public String getAddress() { - return address; - } - - public String getName() { - return name; - } -} diff --git a/exercise_oop_inheritance_person_student_staff/src/Staff.java b/exercise_oop_inheritance_person_student_staff/src/Staff.java deleted file mode 100644 index e1d1a9b..0000000 --- a/exercise_oop_inheritance_person_student_staff/src/Staff.java +++ /dev/null @@ -1,31 +0,0 @@ -public class Staff extends Person { - - private String school; - private double salary; - - public Staff(String name, String address, String school, double salary) { - super(name, address); - this.school = school; - this.salary = salary; - } - - public String getSchool() { - return school; - } - - public void setSchool(String school) { - this.school = school; - } - - public double getSalary() { - return salary; - } - - public void setSalary(double salary) { - this.salary = salary; - } - - public double upToSalary(int percent) { - return this.salary + (this.salary * percent) / 100; - } -} diff --git a/exercise_oop_inheritance_person_student_staff/src/Student.java b/exercise_oop_inheritance_person_student_staff/src/Student.java deleted file mode 100644 index 1a125de..0000000 --- a/exercise_oop_inheritance_person_student_staff/src/Student.java +++ /dev/null @@ -1,47 +0,0 @@ -public class Student extends Person{ - private String program; - private int year; - private double score; - - public Student(String name, String address, String program, int year, double score) { - super(name, address); - this.program = program; - this.year = year; - this.score = score; - } - - public String getProgram() { - return program; - } - - public void setProgram(String program) { - this.program = program; - } - - public int getYear() { - return year; - } - - public void setYear(int year) { - this.year = year; - } - - public double getScore() { - return score; - } - - public void setScore(double score) { - this.score = score; - } - - public String getRating() { - if (this.score < 5) { - return "bad"; - } else if (this.score >= 5 && this.score <8) { - return "medium"; - } else { - return "good"; - } - } - -} diff --git a/exercise_oop_polymorphism_interface_moveable/exercise_oop_polymorphism_interface_moveable.iml b/exercise_oop_polymorphism_interface_moveable/exercise_oop_polymorphism_interface_moveable.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_polymorphism_interface_moveable/exercise_oop_polymorphism_interface_moveable.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_polymorphism_interface_moveable/src/Main.java b/exercise_oop_polymorphism_interface_moveable/src/Main.java deleted file mode 100644 index e07f4eb..0000000 --- a/exercise_oop_polymorphism_interface_moveable/src/Main.java +++ /dev/null @@ -1,16 +0,0 @@ -public class Main { - - public static void main(String[] args) { - MoveablePoint moveablePoint = new MoveablePoint(10, 5, 1,1); - MoveableCircle moveableCircle = new MoveableCircle(moveablePoint, 4); - System.out.println(moveableCircle.toString()); - moveableCircle.moveRight(); - System.out.println(moveableCircle.toString()); - moveableCircle.moveUp(); - System.out.println(moveableCircle.toString()); - moveableCircle.moveLeft(); - System.out.println(moveableCircle.toString()); - moveableCircle.moveDown(); - System.out.println(moveableCircle.toString()); - } -} diff --git a/exercise_oop_polymorphism_interface_moveable/src/Moveable.java b/exercise_oop_polymorphism_interface_moveable/src/Moveable.java deleted file mode 100644 index 9cda3d9..0000000 --- a/exercise_oop_polymorphism_interface_moveable/src/Moveable.java +++ /dev/null @@ -1,6 +0,0 @@ -public interface Moveable { - void moveUp(); - void moveDown(); - void moveLeft(); - void moveRight(); -} diff --git a/exercise_oop_polymorphism_interface_moveable/src/MoveableCircle.java b/exercise_oop_polymorphism_interface_moveable/src/MoveableCircle.java deleted file mode 100644 index 037c7db..0000000 --- a/exercise_oop_polymorphism_interface_moveable/src/MoveableCircle.java +++ /dev/null @@ -1,35 +0,0 @@ -public class MoveableCircle implements Moveable{ - - private MoveablePoint center; - private double radius; - - public MoveableCircle(MoveablePoint center, double radius) { - this.center = center; - this.radius = radius; - } - - @Override - public void moveUp() { - this.center.setX(this.center.getX() + this.center.getxSpeed()); - } - - @Override - public void moveDown() { - this.center.setX(this.center.getX() - this.center.getxSpeed()); - } - - @Override - public void moveLeft() { - this.center.setY(this.center.getY() - this.center.getySpeed()); - } - - @Override - public void moveRight() { - this.center.setY(this.center.getY() + this.center.getySpeed()); - } - - @Override - public String toString() { - return "Center: " + "(" + this.center.getX() + ", "+ this.center.getY() + ")"; - } -} diff --git a/exercise_oop_polymorphism_interface_moveable/src/MoveablePoint.java b/exercise_oop_polymorphism_interface_moveable/src/MoveablePoint.java deleted file mode 100644 index 8543190..0000000 --- a/exercise_oop_polymorphism_interface_moveable/src/MoveablePoint.java +++ /dev/null @@ -1,76 +0,0 @@ -public class MoveablePoint implements Moveable { - private int x; - private int y; - private int xSpeed; - private int ySpeed; - - public MoveablePoint(int x, int y, int xSpeed, int ySpeed) { - this.x = x; - this.y = y; - this.xSpeed = xSpeed; - this.ySpeed = ySpeed; - } - - @Override - public void moveUp() { - this.x += this.xSpeed; - - } - - @Override - public void moveDown() { - this.x -= this.xSpeed; - } - - @Override - public void moveLeft() { - this.y -= this.ySpeed; - } - - @Override - public void moveRight() { - this.y += this.ySpeed; - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getxSpeed() { - return xSpeed; - } - - public void setxSpeed(int xSpeed) { - this.xSpeed = xSpeed; - } - - public int getySpeed() { - return ySpeed; - } - - public void setySpeed(int ySpeed) { - this.ySpeed = ySpeed; - } - - @Override - public String toString() { - return "MoveablePoint{" + - "x=" + x + - ", y=" + y + - ", xSpeed=" + xSpeed + - ", ySpeed=" + ySpeed + - '}'; - } -} diff --git a/exercise_polymorphism/Circle.java b/exercise_polymorphism/Circle.java deleted file mode 100644 index 5d0e6a4..0000000 --- a/exercise_polymorphism/Circle.java +++ /dev/null @@ -1,38 +0,0 @@ -public class Circle extends Shape { - private double radius; - - public Circle() { - } - - public Circle(double radius) { - this.radius = radius; - } - - public Circle(String color, boolean filled, double radius) { - super(color, filled); - this.radius = radius; - } - - public double getRadius() { - return radius; - } - - public void setRadius(double radius) { - this.radius = radius; - } - - @Override - public double getArea() { - return Math.PI * this.radius * this.radius; - } - - @Override - public double getPerimeter() { - return this.radius * 2 * Math.PI; - } - - @Override - public String toString() { - return this.radius + " - " + this.color + " - " + this.filled; - } -} diff --git a/exercise_polymorphism/Main.java b/exercise_polymorphism/Main.java deleted file mode 100644 index 722548b..0000000 --- a/exercise_polymorphism/Main.java +++ /dev/null @@ -1,53 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Shape s1 = new Circle("RED", true, 5.5); - System.out.println(s1); - System.out.println(s1.getArea()); // which version? - System.out.println(s1.getPerimeter()); // which version? - System.out.println(s1.getColor()); - System.out.println(s1.isFilled()); - System.out.println(((Circle) s1).getRadius()); - - Circle c1 = (Circle)s1; - System.out.println(c1); - System.out.println(c1.getArea()); - System.out.println(c1.getPerimeter()); - System.out.println(c1.getColor()); - System.out.println(c1.isFilled()); - System.out.println(c1.getRadius()); - - Shape s3 = new Rectangle("RED", false, 4.5, 7.5); - System.out.println(s3); - System.out.println(s3.getArea()); - System.out.println(s3.getPerimeter()); - System.out.println(s3.getColor()); - System.out.println(((Rectangle) s3).getLength()); - - Rectangle r1 = (Rectangle)s3; - System.out.println(r1); - System.out.println(r1.getArea()); - System.out.println(r1.getColor()); - System.out.println(r1.getLength()); - - Shape s4 = new Square(6.6); - System.out.println(s4); - System.out.println(s4.getArea()); - System.out.println(s4.getColor()); - System.out.println(((Square) s4).getWidth()); - - Rectangle r2 = (Rectangle)s4; - System.out.println(r2); - System.out.println(r2.getArea()); - System.out.println(r2.getColor()); - System.out.println(r2.getWidth()); - System.out.println(r2.getLength()); - - Square sq1 = (Square)r2; - System.out.println(sq1); - System.out.println(sq1.getArea()); - System.out.println(sq1.getColor()); - System.out.println(sq1.getWidth()); - System.out.println(sq1.getLength()); - } -} diff --git a/exercise_polymorphism/Rectangle.java b/exercise_polymorphism/Rectangle.java deleted file mode 100644 index 1c3ddaa..0000000 --- a/exercise_polymorphism/Rectangle.java +++ /dev/null @@ -1,50 +0,0 @@ -public class Rectangle extends Shape{ - - protected double width; - protected double length; - - public Rectangle() { - } - - public Rectangle(double width, double length) { - this.width = width; - this.length = length; - } - - public Rectangle(String color, boolean filled, double width, double length) { - super(color, filled); - this.width = width; - this.length = length; - } - - public double getWidth() { - return width; - } - - public void setWidth(double width) { - this.width = width; - } - - public double getLength() { - return length; - } - - public void setLength(double length) { - this.length = length; - } - - @Override - public double getArea() { - return this.width * this.length; - } - - @Override - public double getPerimeter() { - return this.width + this.length; - } - - @Override - public String toString() { - return this.width + " - " + this.length + " - " + this.color + " - " + this.filled; - } -} diff --git a/exercise_polymorphism/Shape.java b/exercise_polymorphism/Shape.java deleted file mode 100644 index 6e5e840..0000000 --- a/exercise_polymorphism/Shape.java +++ /dev/null @@ -1,32 +0,0 @@ -public abstract class Shape { - protected String color; - protected boolean filled; - - public Shape() {} - - public Shape(String color, boolean filled) { - this.color = color; - this.filled = filled; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public boolean isFilled() { - return filled; - } - - public void setFilled(boolean filled) { - this.filled = filled; - } - - public abstract double getArea(); - public abstract double getPerimeter(); - public abstract String toString(); - -} diff --git a/exercise_polymorphism/Square.java b/exercise_polymorphism/Square.java deleted file mode 100644 index 39a15e9..0000000 --- a/exercise_polymorphism/Square.java +++ /dev/null @@ -1,12 +0,0 @@ -public class Square extends Rectangle { - public Square() { - } - - public Square(double side) { - super(side, side); - } - - public Square(String color, boolean filled, double side) { - super(color, filled, side, side); - } -} diff --git a/exerciseoop_class-object_cricle/exerciseoop_class-object_cricle.iml b/exerciseoop_class-object_cricle/exerciseoop_class-object_cricle.iml deleted file mode 100644 index c90834f..0000000 --- a/exerciseoop_class-object_cricle/exerciseoop_class-object_cricle.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exerciseoop_class-object_cricle/src/com/company/Circle.java b/exerciseoop_class-object_cricle/src/com/company/Circle.java deleted file mode 100644 index c83d198..0000000 --- a/exerciseoop_class-object_cricle/src/com/company/Circle.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.company; - -public class Circle { - private double radius; - private String color; - - public Circle() { - this.radius = 1.0; - this.color = "red"; - } - - public Circle(double radius) { - this.radius = radius; - this.color = "red"; - } - - public Circle(double radius, String color) { - this.radius = radius; - this.color = color; - } - - public double getRadius() { - return radius; - } - - public void setRadius(double radius) { - this.radius = radius; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public double getArea() { - return this.radius * this.radius * Math.PI; - } - - public String toString() { - return "Radius: " + this.radius + " - Color: " + this.color; - } -} diff --git a/exerciseoop_class-object_cricle/src/com/company/Main.java b/exerciseoop_class-object_cricle/src/com/company/Main.java deleted file mode 100644 index 304d1d5..0000000 --- a/exerciseoop_class-object_cricle/src/com/company/Main.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.company; - -public class Main { - - public static void main(String[] args) { - // Test default constructor - Circle circle1 = new Circle(); - display(circle1); - - // Test constructor has 1 parameter radius - Circle circle2 = new Circle(2.0); - display(circle2); - - // Test constructor has 2 parameter radius, color - Circle circle3 = new Circle(2.0, "blue"); - display(circle3); - - // Test getter setter - Circle circle4 = new Circle(); - circle4.setColor("Green"); - circle4.setRadius(3.0); - display(circle4); - - - - } - - public static void display(Circle circle) { - System.out.println(circle.toString()); - System.out.println("Area: " + circle.getArea()); - System.out.println(); - } -} \ No newline at end of file diff --git a/exerciseoop_class-object_rectangle/exerciseoop_class-object_rectangle.iml b/exerciseoop_class-object_rectangle/exerciseoop_class-object_rectangle.iml deleted file mode 100644 index c90834f..0000000 --- a/exerciseoop_class-object_rectangle/exerciseoop_class-object_rectangle.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exerciseoop_class-object_rectangle/src/com/company/Main.java b/exerciseoop_class-object_rectangle/src/com/company/Main.java deleted file mode 100644 index 2765487..0000000 --- a/exerciseoop_class-object_rectangle/src/com/company/Main.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.company; - -public class Main { - - public static void main(String[] args) { - Rectangle rectangle1 = new Rectangle(); - rectangle1.setLength(10); - rectangle1.setWidth(13); - System.out.println(rectangle1.toString()); - System.out.println("Area: " + rectangle1.getArea()); - } -} diff --git a/exerciseoop_class-object_rectangle/src/com/company/Rectangle.java b/exerciseoop_class-object_rectangle/src/com/company/Rectangle.java deleted file mode 100644 index 176f3d1..0000000 --- a/exerciseoop_class-object_rectangle/src/com/company/Rectangle.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.company; - -public class Rectangle { - private int length; - private int width; - - public Rectangle() {} - - public Rectangle(int length, int width) { - this.length = length; - this.width = width; - } - - public int getLength() { - return length; - } - - public void setLength(int length) { - this.length = length; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getArea() { - return this.length * this.width; - } - - public String toString() { - return "Length: " + this.length + " - Width: " + this.width; - } -} diff --git a/oop-b14/oop-b14.iml b/oop-b14/oop-b14.iml deleted file mode 100644 index e7b98ac..0000000 --- a/oop-b14/oop-b14.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/oop-b14/src/Main.java b/oop-b14/src/Main.java deleted file mode 100644 index c0830d8..0000000 --- a/oop-b14/src/Main.java +++ /dev/null @@ -1,33 +0,0 @@ -import entity.GoodStudent; -import entity.NormalStudent; - -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.stream.Collectors; - -public class Main { - public static void main(String[] args) { - // DEMO cho câu 14 yêu cầu 3 - List goodStudent = Arrays.asList( - new GoodStudent("Nguyễn Văn D","", "", "", "", "", 7.3f, ""), - new GoodStudent("Nguyễn Văn B","", "", "", "", "", 7.2f, ""), - new GoodStudent("Nguyễn Văn A", "", "", "", "", "", 7.2f, ""), - new GoodStudent("Nguyễn Văn C","", "", "", "", "", 7.3f, "") - ); - System.out.println("abc"); - List lgs = getSortedGoodStudentList(goodStudent).subList(0, 2); - lgs.forEach(System.out::println); - } - - - public static List getSortedGoodStudentList(List playerList) { - return playerList.stream().sorted(Comparator.comparing(GoodStudent::getGpa).reversed() - .thenComparing(GoodStudent::getLastName)).collect(Collectors.toList()); - } - - public static List getSortedNormalStudentList(List playerList) { - return playerList.stream().sorted(Comparator.comparing(NormalStudent::getEnglishScore).reversed() - .thenComparing(NormalStudent::getLastName)).collect(Collectors.toList()); - } -} diff --git a/oop-b14/src/entity/GoodStudent.java b/oop-b14/src/entity/GoodStudent.java deleted file mode 100644 index dc32c2c..0000000 --- a/oop-b14/src/entity/GoodStudent.java +++ /dev/null @@ -1,18 +0,0 @@ -package entity; - -public class GoodStudent extends Student { - Float gpa; - String bestRewardName; - - - public GoodStudent(String fullName, String dob, String gender, String phoneNumber, String universityName, String gradeLevel, Float gpa, String bestRewardName) { - super(fullName, dob, gender, phoneNumber, universityName, gradeLevel); - this.gpa = gpa; - this.bestRewardName = bestRewardName; - } - - public Float getGpa() { - return gpa; - } - -} diff --git a/oop-b14/src/entity/NormalStudent.java b/oop-b14/src/entity/NormalStudent.java deleted file mode 100644 index ccfd98c..0000000 --- a/oop-b14/src/entity/NormalStudent.java +++ /dev/null @@ -1,16 +0,0 @@ -package entity; - -public class NormalStudent extends Student{ - Integer englishScore; - Float entryTestScore; - - public NormalStudent(String fullName, String dob, String gender, String phoneNumber, String universityName, String gradeLevel, Integer englishScore, Float entryTestScore) { - super(fullName, dob, gender, phoneNumber, universityName, gradeLevel); - this.englishScore = englishScore; - this.entryTestScore = entryTestScore; - } - - public Integer getEnglishScore() { - return englishScore; - } -} diff --git a/oop-b14/src/entity/Student.java b/oop-b14/src/entity/Student.java deleted file mode 100644 index ce00b40..0000000 --- a/oop-b14/src/entity/Student.java +++ /dev/null @@ -1,24 +0,0 @@ -package entity; - -public class Student { - String fullName; - String dob; - String gender; - String phoneNumber; - String universityName; - String gradeLevel; - - public Student(String fullName, String dob, String gender, String phoneNumber, String universityName, String gradeLevel) { - this.fullName = fullName; - this.dob = dob; - this.gender = gender; - this.phoneNumber = phoneNumber; - this.universityName = universityName; - this.gradeLevel = gradeLevel; - } - - public String getLastName() { - String[] nameSplit = fullName.split(" "); - return nameSplit[nameSplit.length - 1]; - } -} diff --git a/oop-shareprogramming.iml b/oop-shareprogramming.iml deleted file mode 100644 index c6f833d..0000000 --- a/oop-shareprogramming.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/.idea/.gitignore b/oop_employee_management/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/oop_employee_management/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/oop_employee_management/.idea/misc.xml b/oop_employee_management/.idea/misc.xml deleted file mode 100644 index 0548357..0000000 --- a/oop_employee_management/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/oop_employee_management/.idea/modules.xml b/oop_employee_management/.idea/modules.xml deleted file mode 100644 index 76c0135..0000000 --- a/oop_employee_management/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/.idea/sonarlint/issuestore/index.pb b/oop_employee_management/.idea/sonarlint/issuestore/index.pb deleted file mode 100644 index e69de29..0000000 diff --git a/oop_employee_management/.idea/uiDesigner.xml b/oop_employee_management/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/oop_employee_management/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/.idea/vcs.xml b/oop_employee_management/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/oop_employee_management/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/oop_employee_management/README.md b/oop_employee_management/README.md deleted file mode 100644 index c203d41..0000000 --- a/oop_employee_management/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# oop_employee_management - - - -## Getting started - -Bản code prototype cho bài 13 trong bộ bài tập tổng hợp tại [Deft blog](https://shareprogramming.net/tong-hop-bai-tap-lap-trinh-huong-doi-tuong-trong-java/) - -Các bạn có thể dựa vào đây, để lấy ý tưởng và triển khai bài hoàn chỉnh. - - diff --git a/oop_employee_management/oop_b13.iml b/oop_employee_management/oop_b13.iml deleted file mode 100644 index c90834f..0000000 --- a/oop_employee_management/oop_b13.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/oop_employee_management.iml b/oop_employee_management/oop_employee_management.iml deleted file mode 100644 index c90834f..0000000 --- a/oop_employee_management/oop_employee_management.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/out/production/oop_b13/Main.class b/oop_employee_management/out/production/oop_b13/Main.class deleted file mode 100644 index 725e64cb539503f44f19b4a8fd53c92912005472..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 508 zcmZuu%TB^T6g>ll(pm*U@cqCQy09A)7Z^7tuIeMfuyHkD14H^SrI`3xy3oXhAK*tB z&lD3RVHWq!J@?ExcV@nSKED8*;?PDBYZmHgl(24N1DhtcOl%7j&sC(-3xRy=s4HMx z#*e;0*;A2!GYNZsaxZ%Uk*XK>Wzdz0()Ax`q(e2PhIcJh)aL1sS)kE+@J8}kx`B)a zZYNDtG-zk)G8vFxThJD;JMkpx`&UZaSz7T#i#RY*GO^=e7kjiA$e}c`@8AGUmYOF} znc3a;Mt(n?gE}wc)DL;Zc)~_~I-82!I}Vm|JYR+!zLsgs!vf}$CI$4Uw-#LrO%(XJ zdgVYmN{kjOmsv0ujz1t?v$oAx%s_!9?wu)td6|`k6_knS!)KWou{Y$Z`F9vI0h=u# TPaor-h=mGPiSwfvbEy3S<%(oD diff --git a/oop_employee_management/out/production/oop_b13/entity/Certificate.class b/oop_employee_management/out/production/oop_b13/entity/Certificate.class deleted file mode 100644 index e33d657f34b14a025a896c7d4faca266a1ce5223..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1366 zcma))&2H0B5QUE&Cnl-sPe{@>g#v9Ui35#9*@3z#LPCmyM62$d#H6<*j^w&X?06)Q zh>%$D06Y}p%(Wqr<49~~uE%rFd^2-@{r>S2z;m=puyIgC0guESig_%iVWVloHDIcN zfpX`{`{=btUNCH*MWG6YFAP|LH}>g5FZe(=@FIRyHa^GA{Ds&(2w4*>q?`!sKeja@$YIzUAb=adRLFeW@d6??46#I#F7(ZG93e( ze+#8xsKx9!XDg|eN|A!4v&l`^_g^a+;QHKfj$~^NR zd2-?;+(Ct3B2c9jfzK?Ir>~2E+nU03pG=W+pH5-9+tw8MnQEPo;9ZO5i@d#x4Jwwg zt*yLut&~)urfx;>>be^JU(TbL#aaI_3kjw{xGa!d8e}&UWG5RWmj>A*$o>)#S-DK$ZYGG8 z206?Gxt9%Mr9oVRw3dL#k_2QI_i5#!%&#V&206+EdBA6#v6{IT6|d$QL5`Pz$Qu!m JJtCOc{{yS!zoh^G diff --git a/oop_employee_management/out/production/oop_b13/entity/Employee.class b/oop_employee_management/out/production/oop_b13/entity/Employee.class deleted file mode 100644 index f1d5b0b78e6869adee66d3b7ea62e0448d3bf9ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2387 zcmchX+foxj5Qck_%_f9sByx(1f(j<#5K%mWD8~{jrB-2azk~&b+U!zcqs0sOJX)Hv z$_pRBhqC;8W^-`az4fMNwxXn>Yktgv{&VwJ^97Oz;W zrD;7)8-h}GujTrJ#2Y~gc_64zJFz}mRmXCVs=Izux<|``GKVe4d22OnZ1-i;KR&R| z1&wG^UpDM&&8u6^rsdnPPMscmE=*H)!;+4mT-|Q^@=(@sd?x6Mc5C_4sn+C~508Oe zdE{Dts|l}}(D6#mc75reS2uc5mRI3qu1HtIC0voI2jQ&G@IKi!F%Lgldm7>+fc$yk%w|{TK24w1fHi zzp})%nhEn~$KIzM_t0xLEMIyq{_c_O?_gktOXZ7YP;k3>|!0SDo}-JPmISoeM5 zY`r^XW1R${W+Mi?dUoSMrjQvY%OK!;J(L;vbhglL=@DgZu+2l;H)mC1ETQz`Rw1N)pdpb5H(FLu6#KHf11(P(lIaFy=7i2%tt0 zdyJ-$gEPO@(Syv$qe^Dn8Ez@E^N!0-svQ?@s2#^lsT~(@(j@k}jv3?{gGRSw$`GI_ z;#ANbx(oSlQ@&H;3l0+sTQ_AQvMJL5(ax)|W-wDVq}S4{(oO;Ewu&&St-8gTL2-ia zMS>*5Ak&c`rD%|37^Do4N(>11mdBzDi;EpG!XWdJAhR?V)e$2MvIvj|F(CYF8Du`P zBdIXRqezg2=#HeqAkP5uJO+d(i$SW9AZ8fkMI^}mXb>|DvIda#7!V$823bVU^d;=w z;O~?UgKR~B=*fSGAWQTp2=X3lcWC==svg=M0KJI;(vQm|243GUQ{Au5bMqKC{Ym$+ ZnNT_K*bIE53|B4s?o}FJPoYcDv%hHBlN|s6 diff --git a/oop_employee_management/out/production/oop_b13/entity/Experience.class b/oop_employee_management/out/production/oop_b13/entity/Experience.class deleted file mode 100644 index 5a148a383289b0df3a98f37ad0f32eb98704dcd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2530 zcmcgt+j1L45Iw8wN>(C8vK=IcL`lGwWjO)@;UdS7I0*=ZZE!Fc!euS3?Fp-0)p`Y} zC_nKPd;u>!Kq`@|po$ORqbRy(q}9#hky6$4Oi#}_J!iUCfB*BxUjSZ(h+_eFV#whx z4;#F^7sGu#h~r(n7ezIWDDLQZpX~=6Q{&l(IyQN+rDL1zN9_Dq#||$Z>iC51u8vRH z|Cx?Gwx37wMHG)Tq&lYIZXMkJp=G+lwCkn@t*Sw9xz5hF!m>1^YmbfZjIw3ehvgm5 z74~68Lu5_Z!dur6EG+M82yHkGI+?5q+uUq7_f7Yqv2T$lU32P&wQIP7*F9&*I}*nl zGBwlogx4t#$O(DAP@N=Xj-LvX{%IahG|jT4zGrx5Wm?$qom5QQ6IQtKwE!Ytv}b1@(R5dPfbTqhU@#jB#rSw~ic}Lc?a$5F}`#Zn~a05Oqq8WJrxOlLn)z zby|Jp7RO@O`VwvoAS>&nVr)ko+J@J5iTCIKRk$fBO_4KseB^vzwGSM(X?Vi1sVWXl zZ*QU|sm!PYl!bSZMSYd z5M0g4L8ac{rbr-(O-Ywz^U7?ik*WB#{R#4*DLwfR3UKSb$u5utbWW}-L20JpP z{CKw$LIX#VsNeA%z7DFP3lr^08TWn7mgRIz(xi2UhLg%G&sb|r3mbki6*Fi{exB5j zpq*pSY|>}QX?uPL3a7kH-zksY&@`HKlZ-qt>edi#agaqdH&O>%`;X1KS7D-v(Q27C zHT>!smz=Dx-n$avrNYL4ZI8h9`6kpDhO178!&UmeFVJ5|fPPepaz@oiHU^C=l*Vhc zx=B_e8!nzg`(1`zr!h{)cno0%FVHNZg76|1X~h6bG%~;*MFznB%6B7t3)M$t&l$d1PieZWx(+jynZmW=9z> zAtGn2YE;fRTOBXcT*<^yuTa!Y@&xElT*GU=-nZnv0R0I`-bG}flaf3~m%Qc- z@On@3GFkOzPZ9W4lJK=7(s_C4aM(Zm2Hxx)UZ({3Z6orn#_6xoHLpvAc@^c073n>X zhPP1ZVGSn|{B10e#WNFG!|jPgRz~VY=}@FZR;DDvdb0xbLF!@s(o^;1Pek`lp{HYA z#EVZcLngJY&LZm$G_13 z;Wu>z9G%f`e(*;*o^yATY{KFPoN+R<_ul88d(Ly8bIygo{{HoM0I#5##C2>Za1A^B zxyzq-7`vCiyLc~>x74HwhKnD(>_6fNehD*+Uh3ym+MILmu}T{7A*eym+kQ6COWR z@tKOxReZs_U&irO9J+$hnyptmx+5&}j_w!=rpib96TRq&rco?g6}`c5X~6KIZhoyG z?HV?8vsT=5Y+=^es$+^LhTRs<@vhz^cd>P03TIP6cyVc8L1fFS5;|5Erm@>;9vJo` z{h&ceTE^PfZNX~~j5u}CR*)(irb8Z!JGRlT8#cvRUks#qp3-@QX?*V;_me+wdFc@D z!Hy#u#j7F;abE9gzSVbG+9c%@d!lCQPRFLWfBdg9UO?$Ti96P=Ti@I> z4=uYXdqBZ>&2a7x^~B8LQeYIaZlAZF4X#bj<)Cx7k0!g${lz%!*)^RC(3{!UwJA&I!^IB__D@MaSp4adUp4BjitcK_KGmnEf zDjKRV;yBb$LtVj)tS}$*+a1xU8g}2~x1zd{(;#r9VVV61(Bq*MvfYa2-2$=-Mhe+( zX>Vv);phTX)rmq@);SxlvLOMo;29_~FkZ+GK4Tm7p!hMCZzCtc!3T<6+{QXRT!T*x zJy9O8-E1|iV}mqm1*q?qh422C@AaVuEOBB}K6#JZj?tud)ap3BS6W!b2lVnflv6`* zQg=?s1B0-Fc#Dl1R2l;nbpPPUs5mlEOmDRelOCFtfJ=JC@4Ka!WeRwGaqHi<2i$ez zofEC=jtcD>{mlcy2yyw*EW{NkM=C-ZN1$+Z()R^gy-cG*V>EvTalSas4kyh+r$#c*k%LrkU>>$56G2f^dH21d+bKX++6pj4V?~U>u`JV}gF{ zJMW(Ne3K_hoa0SO>da)4JBTjDk@FOhssD*M@dUE@<-$rPl8I(wXLOHDoH=AvCXq>a zEW+|uE{kcp(+tI)MTUNJxGGs3y1sfWvfOJFkNk6UNjLbZJ%MB!Nm&Fad zgqYlA>Em+7;;VATH%Q*}!HHk?=5)RU%TnfCwwk3cMLeBr;6oW+0Kbf{FM_ z+fB$C5xI2%k+(e}^h|n}`o&A{)8C*zK0_j%JjDp5Nuwc^JH?gss0)nsfRqc2pCX-} xaOab~%_$d{?g29{5Mt|DcOLF-W?UfB1ybKp#8X@yR;1)pka~cB6O@hl(8)4|)8MZ9d}Jo{C4jc&uWd$B!BOM8y+ce5&Fz9zR#{ zg^DkE>njys^QcF05JgErxT2rfH3iAyiT+g2o4R$B-*alhI$Bqt){Tl$cMRHB3JOLV zmUwE^>cTnO)hmXA$cC_lv!x)IS=?6;+P2GtjuwSw>^3R~M(vS)U=orn+9loG*K2~; z9vE_tMV+k;%OQ{Xf<=KWikivvaw+se9P#@;roEOf;)sfomqhOBj{o>g1Q&Ue{vv?SiXbh*AoO2_uZk)=D08pZwLf0c3oC6{=63I+%~T0geG zDOiVgt)e@^wn*(G!@2L)@WAv>SSV9q!!a^^ z+|>ow zVwQfFf(UR$(k#G5DMzYH8i$~8!P568tzM;3p)s7jfbv|L&C@qd$JjIk4GT2WTq9(# zNGo=br7t@$$udOa1UtwsogTR> z5@%8qk~%Y);HIKWapWb6$dUg{4zy6-tFukqf#@_4u}22>)7xPZxI0&J|a`v9sVX=cwTy#a;<#XB3|+o zY+}pv)lMY%V;7OdzC_-_+dV|CQbxOpEEAEH0Yq4NR^Xk!iiElqxz(4*o&JinmA0FZ z+eBn_01-|+6QM_xzMPt0z4Si&9qN+{#FFtQhA2%M4T*&&hLa;MFzN#d7Z__InH+cL x6aMC;3rzXIvRtMb_FBdFI#1U75gp{{YBnP;USL diff --git a/oop_employee_management/out/production/oop_b13/exception/BirthDayException.class b/oop_employee_management/out/production/oop_b13/exception/BirthDayException.class deleted file mode 100644 index 123bac592b99db0652e8b81fc41dfe20fc51e443..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 363 zcmaKoy-ve06otp)?s#IId`~$v-7rSs5tOm>j n-o@$J8|al!0V3{kO&dHX&}7~Fp28;I_!8JctM=Mv6=3HJ!k1Kf diff --git a/oop_employee_management/out/production/oop_b13/exception/EmailException.class b/oop_employee_management/out/production/oop_b13/exception/EmailException.class deleted file mode 100644 index 184d3509b4e2a9407ac94907c6de908a7e01c536..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 290 zcmZ{fy$%6E6ot=S`@>p4p%I-9g>7_1BUBp=(T_D@WbMjY;8k_0qCM^BZGp4qJPoqQZ%dtvZs=v>jjW`MiIt)VXUk9hs zH8&99%KbK@0geBW9^%UttR|EDV!&u$KxZ~ISga=7;6RqudCdlLu$c&XRt?S*T@yeJ diff --git a/oop_employee_management/out/production/oop_b13/exception/FullNameException.class b/oop_employee_management/out/production/oop_b13/exception/FullNameException.class deleted file mode 100644 index 9c14fe4be0d59ed9e229f0391523c94c7d6e5a3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 363 zcmaKoJ5R$f6otr!B-#IaRq-H~hDkTh6KNK*&`$55U#)aW7{ux|QO}jmZ8WWonaNB|e#np@ zGF6r`-MZ|h62f_27m1o`m($-fxOGpO@Nq~u|0jrW_GkVZj|+JG1Fnb{yKoO!jhK79 l2iG@mpf#U72=3uG<$D50tou9N;EAgM$7pW7PFQ(3-2lA)RC53T diff --git a/oop_employee_management/out/production/oop_b13/exception/PhoneException.class b/oop_employee_management/out/production/oop_b13/exception/PhoneException.class deleted file mode 100644 index aa55fb9bb52bde5159e489416d96845a4ca041d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 354 zcmZ{f%}N6?6otB?)(8~(_Kq9rLG1MTDniCVH%kxGBcIFmMg)958y+U z-qhM6Vgfh$PVPO2e62n{0kqKwae%5oO`uK)y4vWnM>xNZpXIBJGHKFiSmxTKotrVi z@7t*&RAX(_<6=Hh`AAMORvNKQWHy$$cDxn+a;6JHD^|-yy_DLT=xJt+8vI~~Am*wl zWV*5V6G;e%c9AFQLA#LV@9BHjUxAN9!sUMvJhivo1>*`Hf7~tN%@$k(rXK4apTX_j iJLrvX9t79$Tjf51Bj$@OAM=Y_0Zvfac%3qNI9mgX3sD>Z diff --git a/oop_employee_management/out/production/oop_b13/service/EmployeeManager.class b/oop_employee_management/out/production/oop_b13/service/EmployeeManager.class deleted file mode 100644 index f5d46a06bd131805800e0d4fef6aaa5a79c39bdc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3081 zcmbVOSyS6q6#irzgpI;tvjk`eBqTMEh9q562yH?_Lu*1>XK9iy5%vWHvgF7z4c+&B z-`l7D03O;-OG+}+NuN5?=}+o(`dvxJHaL0ci>!O^Io~cwM1y9Cs0T-pgB^6Jp zcsho-M0y6##&8+Bidhwz7#fj{L10eByov<{QIX4=_KFY%1udyXeOVtVx`sKDG79b} zkJHAyrMpE(DA>K}cq}C>*Kk)xP6QC6Gc3a$R}fAPo>LH+u(R}SP8pUsRm{x_ z=ZrpUawnd$GrDHY4tW!9==J1>r0k8L8ZDyv{m(l5x=t@)9(>loJj=wJ<(kU``4R$B$JtT2Tue7N>na2FM9 zOS^hzXv?r%ZmKy>XWWB9b)>GMm1G0pz z8P#--rR}1V5tD|LNLvXv=>C2wPYr$OXHI3Q9(5djMe0?<9oV74z@mmFm=yFe+ja}C zqvxlEyI^Mv&GpE&V39vo3v3N}Tv6d@D1gpIEUS1 z@;2~rG=>lHk(@Ih*S>DViMT@6dZn1KYvi;evPMRC1$EU~W~?eMvzs$a zici7e0N0yIH9#t3RACT4D)l;PI5NMEsw!vlG8f&XQM{Z(X_w(`=Y&~cJF0YBVy{BV z!4^Fnk+YYDs{LyQEye^n=M&@n(^Hf9H``K zi)Fx6g+%CFA)E9{!4=d)*e;T+3x>->1sfN$+m4=6LRKqwPQn0J6ZNpl&m&8cQn@7CU`kXEa z<9%(+l~*dhAz;e3mx_4>+LUDpXTsDA1^FlUccoGTJbyZz)UB*33Io35XhoY@zWj5j z*r{@qbNv4u`XO)cTiLiE?1XNbX@hr2#kc$)+rm$+dKC2D-VXf~Zx6pU6n=wnkn*>e zs}Odgf$yBUeD31TF@*UBv3)c|-6_KAj>)m`d(SqlQ@av?R-ys8BX}%Bk zU@un+?nE-cJI)v(X)*K*BE##b3*mejOMVdn?fh`*@NhbO+W<%64q}K%iX6}Z;@JSP zUm~ufo@dvg0_$i9@e!r<8e%um_#>f1kSW*G73iu6(Z3O*A9rED7h(hlf)GXe$s)Uk zhS#7?@B0&V;Z+%K-#WIjfXFHj!ya@8>iE8cA$k!bn;MzyB$JYrJ|AQwR96tH9tp3m z5DwCc{Qm<@#UTd2o1cpzuMd}lD*HC7?72?r{VIP$^Ez5WxQW(sk#Tke^mf!#T5vA?npzxU>YT^dsYUH||9 diff --git a/oop_employee_management/out/production/oop_b13/ui/ScannerFactory.class b/oop_employee_management/out/production/oop_b13/ui/ScannerFactory.class deleted file mode 100644 index 79a40d1e571eec483817e760a34becc9f2246fcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 575 zcmZuuO-sW-5Ph4}#-?eljo;t()Os)%Z;B|QAk+#*3Ldv{sjF>L;zsDd(t0Q;coqCn z;%tlu(LK!0yqS6PhWYq>c>}P6O&b>G3dm#L!a@OySh8Va*}{s2RR+sHI&8I$FBshB zEq~x%qGZqW10IGV-et(|$xy0&2D9F1Gvtnw)d8bE6wHXDx*XFU* zaR%npjl9>)iTt5F;em?cAu-!sp|Uv)v-QTm<4eBc!QB}jWQ?{SC2=55q@L+!?HT8` z*6+YZ(ZM7N4AXxWvasf09UHo;Mg@O#F;vo~9uK?TdFNIH>KEh>@0I8?7&0W$-;!nI zorZ%%`6?E?Pn#{&|4lU7sL>rPx(jWuC6Z^Pevzz0kw-tHe`0G4_LQbeWb@x3%H%tl zKZOcK1x%w#h;BZhyXrSTg7J>ZE6l4Aa$`(9!yxF9QU)|#IW4q_wg{IHmoO8|C7zkI GX!Z*YR(e4I diff --git a/oop_employee_management/out/production/oop_b13/ui/UIManager.class b/oop_employee_management/out/production/oop_b13/ui/UIManager.class deleted file mode 100644 index d9bd529fa8794d376367cca485c23753e0833767..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1580 zcmah|*-{fh6g?f1Ofn831W*(g5CtMiP;o=V6*L+ajaud75Lz5fCaFosGT-5wPksXW zpq5nm0e+O_>6ys{D_Yi6_4M7&J$LD!zrOzfuz<3O92QIr;*vft>*I=nt0od!eGQ9g zT*p!hH%u(!rioj)ox&XhcTMzT!N5He1Ny&WU{xTw| zQJP3e7o%CRT~~VA{@Q+P7h1}x7RrH=_L#G+OY==t+ubRYmFKuSnxbphnA-~I6kR1f zS75M9B~a0m#RkTK4u#0nA4IQuviVAr$aTX*o#yzmW6pK}y2fOyv2807Np8!k)EBc{ zZ+R8D>gcItqOQ;B8Y~Q9*un{nTR4kz7G{tq>COP6&KS6F;Q@*U9$I*W5>bn8qou}+ z_ZG(utXWvchJj5BkMV>}2#o9O$l^Fh7UFf9k_qLgOl$u-2xPnM-Pn39E8L4gdW2J0 zwJWObwMk(|s!$iq{BHx>hgEJjm8@}b>n$RV1VeP{g-uRSagNfivAaV)%Aab1L_<62 zG`+Le&tR}8w?N93@05NQdad)lahTvs%<+u^2ACMbJVz)M_!s;q&U}UV#7hhZc_w|O zi9@_wfdfWyn3BK|jPcaLZ|NQ5|HRk_qzDk(9gBbTZ+*LCiQpFB6}xol^I?xOJD5Ap z@HD|Q1RWyaC?SvW)9DTdkYPH4<0vfx$7xHTFP%=)fm;-Ecuy%oQ+^ML7hjPqeS@*~ z8L3?Q3(T`$a9~{vRwyjSXEmFk$biiRQaH&XC&}v+OFYe9O<@{&pUpx59DLxOiG=_Z+b=qJHUX&(dAx6F~j{Jz@FC|e9?FiV`6 zelfjx1H{Yr;$0%%m4D#Pg%h8THei diff --git a/oop_employee_management/src/Main.java b/oop_employee_management/src/Main.java deleted file mode 100644 index 618e1f5..0000000 --- a/oop_employee_management/src/Main.java +++ /dev/null @@ -1,29 +0,0 @@ -import ui.ScannerFactory; -import ui.UIManager; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - UIManager uiManager = new UIManager(); - Scanner scanner = ScannerFactory.getScanner(); - Integer ch = scanner.nextInt(); - while (true) { - System.out.println("Application"); - System.out.println("Enter 1: To insert "); - System.out.println("Enter 2: To search: "); - // TODO HERE - System.out.println("Enter 4: To exit:"); - switch (ch) { - case 1: { - // input 0 => insert Experience - // input 1 => insert Fresher - // input 2 => insert Intern - int type = scanner.nextInt(); - uiManager.insert(type); - } - // TODO HERE - } - } - } -} diff --git a/oop_employee_management/src/entity/Certificate.java b/oop_employee_management/src/entity/Certificate.java deleted file mode 100644 index 359db6a..0000000 --- a/oop_employee_management/src/entity/Certificate.java +++ /dev/null @@ -1,52 +0,0 @@ -package entity; - -import java.time.LocalDate; - -public class Certificate { - private String id; - private String name; - private String rank; - private LocalDate date; - - public Certificate() { - } - - public Certificate(String id, String name, String rank, LocalDate date) { - this.id = id; - this.name = name; - this.rank = rank; - this.date = date; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getRank() { - return rank; - } - - public void setRank(String rank) { - this.rank = rank; - } - - public LocalDate getDate() { - return date; - } - - public void setDate(LocalDate date) { - this.date = date; - } -} diff --git a/oop_employee_management/src/entity/Employee.java b/oop_employee_management/src/entity/Employee.java deleted file mode 100644 index 8873ec4..0000000 --- a/oop_employee_management/src/entity/Employee.java +++ /dev/null @@ -1,75 +0,0 @@ -package entity; - -import java.time.LocalDate; -import java.util.List; - -public abstract class Employee { - public static long count = 0; - protected String id; - protected String fullName; - protected LocalDate birthday; - protected String phone; - protected String email; - protected List certificates; - - public Employee() {} - - public Employee(String id, String fullName, LocalDate birthday, String phone, String email, List certificates) { - this.id = id; - this.fullName = fullName; - this.birthday = birthday; - this.phone = phone; - this.email = email; - this.certificates = certificates; - } - - public abstract void showInformation(); - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFullName() { - return fullName; - } - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - public LocalDate getBirthday() { - return birthday; - } - - public void setBirthday(LocalDate birthday) { - this.birthday = birthday; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public List getCertificates() { - return certificates; - } - - public void setCertificates(List certificates) { - this.certificates = certificates; - } -} diff --git a/oop_employee_management/src/entity/Experience.java b/oop_employee_management/src/entity/Experience.java deleted file mode 100644 index 005dfe7..0000000 --- a/oop_employee_management/src/entity/Experience.java +++ /dev/null @@ -1,57 +0,0 @@ -package entity; - -import java.time.LocalDate; -import java.util.List; - -public class Experience extends Employee { - private int yearOfExperience; - private String proSkill; - - public Experience() { - } - - public Experience(int yearOfExperience, String proSkill) { - this.yearOfExperience = yearOfExperience; - this.proSkill = proSkill; - } - - public Experience(String id, String fullName, LocalDate birthday, String phone, String email, List certificates, int yearOfExperience, String proSkill) { - super(id, fullName, birthday, phone, email, certificates); - this.yearOfExperience = yearOfExperience; - this.proSkill = proSkill; - } - - @Override - public void showInformation() { - System.out.println(this); - } - - public int getYearOfExperience() { - return yearOfExperience; - } - - public void setYearOfExperience(int yearOfExperience) { - this.yearOfExperience = yearOfExperience; - } - - public String getProSkill() { - return proSkill; - } - - public void setProSkill(String proSkill) { - this.proSkill = proSkill; - } - - @Override - public String toString() { - return "Experience{" + - "id='" + id + '\'' + - ", fullName='" + fullName + '\'' + - ", birthday=" + birthday + - ", phone='" + phone + '\'' + - ", email='" + email + '\'' + - ", yearOfExperience=" + yearOfExperience + - ", proSkill='" + proSkill + '\'' + - '}'; - } -} diff --git a/oop_employee_management/src/entity/Fresher.java b/oop_employee_management/src/entity/Fresher.java deleted file mode 100644 index 993a6a6..0000000 --- a/oop_employee_management/src/entity/Fresher.java +++ /dev/null @@ -1,70 +0,0 @@ -package entity; - -import java.time.LocalDate; -import java.util.List; - -public class Fresher extends Employee { - - private LocalDate graduationDate; - private String graduationRank; - private String universityName; - - public Fresher() { - } - - public Fresher(LocalDate graduationDate, String graduationRank, String universityName) { - this.graduationDate = graduationDate; - this.graduationRank = graduationRank; - this.universityName = universityName; - } - - public Fresher(String id, String fullName, LocalDate birthday, String phone, String email, List certificates, LocalDate graduationDate, String graduationRank, String universityName) { - super(id, fullName, birthday, phone, email, certificates); - this.graduationDate = graduationDate; - this.graduationRank = graduationRank; - this.universityName = universityName; - } - - @Override - public void showInformation() { - System.out.println(this); - } - - public LocalDate getGraduationDate() { - return graduationDate; - } - - public void setGraduationDate(LocalDate graduationDate) { - this.graduationDate = graduationDate; - } - - public String getGraduationRank() { - return graduationRank; - } - - public void setGraduationRank(String graduationRank) { - this.graduationRank = graduationRank; - } - - public String getEducation() { - return universityName; - } - - public void setEducation(String education) { - this.universityName = education; - } - - @Override - public String toString() { - return "Fresher{" + - "id='" + id + '\'' + - ", fullName='" + fullName + '\'' + - ", birthday=" + birthday + - ", phone='" + phone + '\'' + - ", email='" + email + '\'' + - ", graduationDate=" + graduationDate + - ", graduationRank='" + graduationRank + '\'' + - ", universityName='" + universityName + '\'' + - '}'; - } -} diff --git a/oop_employee_management/src/entity/Intern.java b/oop_employee_management/src/entity/Intern.java deleted file mode 100644 index 61d19b5..0000000 --- a/oop_employee_management/src/entity/Intern.java +++ /dev/null @@ -1,69 +0,0 @@ -package entity; - -import java.time.LocalDate; -import java.util.List; - -public class Intern extends Employee { - private String major; - private int semester; - private String universityName; - - public Intern() { - } - - public Intern(String major, int semester, String universityName) { - this.major = major; - this.semester = semester; - this.universityName = universityName; - } - - public Intern(String id, String fullName, LocalDate birthday, String phone, String email, List certificates, String major, int semester, String universityName) { - super(id, fullName, birthday, phone, email, certificates); - this.major = major; - this.semester = semester; - this.universityName = universityName; - } - - @Override - public void showInformation() { - System.out.println(this); - } - - public String getMajor() { - return major; - } - - public void setMajor(String major) { - this.major = major; - } - - public int getSemester() { - return semester; - } - - public void setSemester(int semester) { - this.semester = semester; - } - - public String getUniversityName() { - return universityName; - } - - public void setUniversityName(String universityName) { - this.universityName = universityName; - } - - @Override - public String toString() { - return "Intern{" + - "id='" + id + '\'' + - ", fullName='" + fullName + '\'' + - ", birthday=" + birthday + - ", phone='" + phone + '\'' + - ", email='" + email + '\'' + - ", major='" + major + '\'' + - ", semester=" + semester + - ", universityName='" + universityName + '\'' + - '}'; - } -} diff --git a/oop_employee_management/src/exception/BirthDayException.java b/oop_employee_management/src/exception/BirthDayException.java deleted file mode 100644 index cdeb54f..0000000 --- a/oop_employee_management/src/exception/BirthDayException.java +++ /dev/null @@ -1,7 +0,0 @@ -package exception; - -public class BirthDayException extends Exception { - public BirthDayException(String message) { - super(message); - } -} diff --git a/oop_employee_management/src/exception/EmailException.java b/oop_employee_management/src/exception/EmailException.java deleted file mode 100644 index 24688f7..0000000 --- a/oop_employee_management/src/exception/EmailException.java +++ /dev/null @@ -1,4 +0,0 @@ -package exception; - -public class EmailException extends Exception { -} diff --git a/oop_employee_management/src/exception/FullNameException.java b/oop_employee_management/src/exception/FullNameException.java deleted file mode 100644 index c9a6977..0000000 --- a/oop_employee_management/src/exception/FullNameException.java +++ /dev/null @@ -1,8 +0,0 @@ -package exception; - -public class FullNameException extends Exception { - - public FullNameException(String message) { - super(message); - } -} diff --git a/oop_employee_management/src/exception/PhoneException.java b/oop_employee_management/src/exception/PhoneException.java deleted file mode 100644 index c46a667..0000000 --- a/oop_employee_management/src/exception/PhoneException.java +++ /dev/null @@ -1,8 +0,0 @@ -package exception; - -public class PhoneException extends Exception { - - public PhoneException(String message) { - super(message); - } -} diff --git a/oop_employee_management/src/service/EmployeeManager.java b/oop_employee_management/src/service/EmployeeManager.java deleted file mode 100644 index 9a88348..0000000 --- a/oop_employee_management/src/service/EmployeeManager.java +++ /dev/null @@ -1,64 +0,0 @@ -package service; - -import entity.Employee; -import entity.Experience; -import entity.Fresher; -import entity.Intern; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class EmployeeManager { - - private List employees; - - public EmployeeManager() { - this.employees = new ArrayList<>(); - } - - public void insert(Employee employee) { - this.employees.add(employee); - } - - public Employee findById(String id) { - return this.employees.stream().filter(employee -> employee.getId().equals(id)).findFirst().orElse(null); - } - - public boolean deleteById(String id) { - Employee employee = this.findById(id); - if (employee == null) { - return false; - } - this.employees.remove(employee); - return true; - } - - /** - * type = 0 => Experience - * type = 1 => Fresher - * type = 2 => Intern - */ - public List findByType(int type) { - return this.employees.stream() - .filter(employee -> { - if (type == 0) { - return employee instanceof Experience; - } - if (type == 1) { - return employee instanceof Fresher; - } - if (type == 2) { - return employee instanceof Intern; - } - return false; - }) - .collect(Collectors.toList()); - } - - public List findAll() { - return this.employees; - } - - -} diff --git a/oop_employee_management/src/service/ValidatorService.java b/oop_employee_management/src/service/ValidatorService.java deleted file mode 100644 index 21e4996..0000000 --- a/oop_employee_management/src/service/ValidatorService.java +++ /dev/null @@ -1,27 +0,0 @@ -package service; - -import exception.BirthDayException; -import exception.EmailException; -import exception.FullNameException; -import exception.PhoneException; - -import java.time.LocalDate; - -public class ValidatorService { - - public static void birthdayCheck(LocalDate birthday) throws BirthDayException { - // TODO HERE - } - - public static void phoneCheck(String phone) throws PhoneException { - // TODO HERE - } - - public static void emailCheck(String email) throws EmailException { - // TODO HERE - } - - public static void nameCheck(String name) throws FullNameException { - // TODO HERE - } -} diff --git a/oop_employee_management/src/ui/ScannerFactory.java b/oop_employee_management/src/ui/ScannerFactory.java deleted file mode 100644 index 22e8137..0000000 --- a/oop_employee_management/src/ui/ScannerFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package ui; - -import java.util.Scanner; - -public class ScannerFactory { - - private static Scanner SCANNER; - - public static Scanner getScanner() { - if (SCANNER == null) { - SCANNER = new Scanner(System.in); - } - return SCANNER; - } -} diff --git a/oop_employee_management/src/ui/UIManager.java b/oop_employee_management/src/ui/UIManager.java deleted file mode 100644 index 44b323c..0000000 --- a/oop_employee_management/src/ui/UIManager.java +++ /dev/null @@ -1,113 +0,0 @@ -package ui; - -import entity.Employee; -import entity.Experience; -import entity.Fresher; -import entity.Intern; -import exception.BirthDayException; -import exception.EmailException; -import exception.FullNameException; -import exception.PhoneException; -import service.EmployeeManager; -import service.ValidatorService; - -import java.util.Scanner; - -public class UIManager { - - private EmployeeManager employeeManager = new EmployeeManager(); - - /** - * @param type - * @return Employee - * type = 0 => Experience - * type = 1 => Fresher - * type = 2 => Intern - */ - public void insert(int type) { - Employee employee = null; - if (type == 0) { - employee = insertExperience(); - } - if (type == 1) { - employee = insertFresher(); - } - if (type == 2) { - employee = insertIntern(); - } - - try { - checkData(employee); - } catch (BirthDayException e) { - // insert => insert(type); - insert(type); - } catch (PhoneException e) { - // insert => insert(type); - insert(type); - } catch (EmailException e) { - // insert => insert(type); - insert(type); - } catch (FullNameException e) { - // insert => insert(type); - insert(type); - } - - this.employeeManager.insert(employee); - } - - private Experience insertExperience() { - Experience experience = new Experience(); - Scanner scanner = ScannerFactory.getScanner(); - System.out.print("Input ID: "); - String id = scanner.nextLine(); - System.out.print("Input Name: "); - String name = scanner.nextLine(); - System.out.print("Input Phone: "); - String phone = scanner.nextLine(); - System.out.print("Input Email: "); - String email = scanner.nextLine(); - - // TODO - return experience; - } - - private Intern insertIntern() { - - Intern intern = new Intern(); - // TODO - return intern; - } - - private Fresher insertFresher() { - Fresher fresher = new Fresher(); - // TODO - return fresher; - } - - public void update() { - System.out.print("Input ID to update: "); - String id = ScannerFactory.getScanner().nextLine(); - Employee employee = this.employeeManager.findById(id); - // TODO HERE - } - - public void delete() { - System.out.print("Input ID to deleet: "); - String id = ScannerFactory.getScanner().nextLine(); - this.employeeManager.deleteById(id); - // TODO SHOW MESSAGE HERE - } - - public void showAllEmployee() { - this.employeeManager.findAll().forEach(Employee::showInformation); - } - - private void checkData(Employee employee) throws BirthDayException, PhoneException, EmailException, FullNameException { - ValidatorService.birthdayCheck(employee.getBirthday()); - ValidatorService.phoneCheck(employee.getPhone()); - ValidatorService.emailCheck(employee.getEmail()); - ValidatorService.nameCheck(employee.getFullName()); - } - - // TODO -} diff --git a/synthetic_exercise_oop_java/src/Main.java b/synthetic_exercise_oop_java/src/Main.java deleted file mode 100644 index 91ba70b..0000000 --- a/synthetic_exercise_oop_java/src/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - - public static void main(String[] args) { - // You can run the exercise for earch package. In each package have Main class. - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Engineer.java b/synthetic_exercise_oop_java/src/b1/Engineer.java deleted file mode 100644 index 62193ca..0000000 --- a/synthetic_exercise_oop_java/src/b1/Engineer.java +++ /dev/null @@ -1,30 +0,0 @@ -package b1; - -import java.time.LocalDate; - -public class Engineer extends Officer { - private String branch; - public Engineer(String name, int age, String gender, String address, String branch) { - super(name, age, gender, address); - this.branch = branch; - } - - public String getBranch() { - return branch; - } - - public void setBranch(String branch) { - this.branch = branch; - } - - @Override - public String toString() { - return "Engineer{" + - "branch='" + branch + '\'' + - ", name='" + name + '\'' + - ", age=" + age + - ", gender='" + gender + '\'' + - ", address='" + address + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Main.java b/synthetic_exercise_oop_java/src/b1/Main.java deleted file mode 100644 index d8fbe23..0000000 --- a/synthetic_exercise_oop_java/src/b1/Main.java +++ /dev/null @@ -1,106 +0,0 @@ -package b1; - -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerOfficer managerOfficer = new ManagerOfficer(); - while (true) { - System.out.println("Application Manager Officer"); - System.out.println("Enter 1: To insert officer"); - System.out.println("Enter 2: To search officer by name: "); - System.out.println("Enter 3: To show information officers"); - System.out.println("Enter 4: To exit:"); - String line = scanner.nextLine(); - switch (line) { - case "1": { - System.out.println("Enter a: to insert Enginner"); - System.out.println("Enter b: to insert Worker"); - System.out.println("Enter c: to insert Staff"); - String type = scanner.nextLine(); - switch (type) { - case "a": { - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter age:"); - int age = scanner.nextInt(); - System.out.print("Enter gender: "); - scanner.nextLine(); - String gender = scanner.nextLine(); - System.out.print("Enter address: "); - String address = scanner.nextLine(); - System.out.print("Enter branch: "); - String branch = scanner.nextLine(); - Officer engineer = new Engineer(name, age, gender, address, branch); - managerOfficer.addOfficer(engineer); - System.out.println(engineer.toString()); - break; - - } - case "b": { - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter age:"); - int age = scanner.nextInt(); - System.out.print("Enter gender: "); - scanner.nextLine(); - String gender = scanner.nextLine(); - System.out.print("Enter address: "); - String address = scanner.nextLine(); - System.out.print("Enter level: "); - int level = scanner.nextInt(); - Officer worker = new Worker(name, age, gender, address, level); - managerOfficer.addOfficer(worker); - System.out.println(worker.toString()); - scanner.nextLine(); - break; - } - case "c": { - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter age: "); - int age = scanner.nextInt(); - System.out.print("Enter gender: "); - scanner.nextLine(); - String gender = scanner.nextLine(); - System.out.print("Enter address: "); - String address = scanner.nextLine(); - System.out.print("Enter task: "); - String task = scanner.nextLine(); - Officer staff = new Staff(name, age, gender, address, task); - managerOfficer.addOfficer(staff); - System.out.println(staff.toString()); - break; - } - default: - System.out.println("Invalid"); - break; - } - break; - } - case "2": { - System.out.print("Enter name to search: "); - String name = scanner.nextLine(); - managerOfficer.searchOfficerByName(name).forEach(officer -> { - System.out.println(officer.toString()); - }); - break; - } - case "3": { - managerOfficer.showListInforOfficer(); - break; - } - case "4": { - return; - } - default: - System.out.println("Invalid"); - continue; - } - - } - } - -} diff --git a/synthetic_exercise_oop_java/src/b1/ManagerOfficer.java b/synthetic_exercise_oop_java/src/b1/ManagerOfficer.java deleted file mode 100644 index 376edfe..0000000 --- a/synthetic_exercise_oop_java/src/b1/ManagerOfficer.java +++ /dev/null @@ -1,25 +0,0 @@ -package b1; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class ManagerOfficer { - private List officers; - - public ManagerOfficer() { - this.officers = new ArrayList<>(); - } - - public void addOfficer(Officer officer) { - this.officers.add(officer); - } - - public List searchOfficerByName(String name) { - return this.officers.stream().filter(o -> o.getName().contains(name)).collect(Collectors.toList()); - } - - public void showListInforOfficer() { - this.officers.forEach(o -> System.out.println(o.toString())); - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Officer.java b/synthetic_exercise_oop_java/src/b1/Officer.java deleted file mode 100644 index 9b22132..0000000 --- a/synthetic_exercise_oop_java/src/b1/Officer.java +++ /dev/null @@ -1,49 +0,0 @@ -package b1; - -import java.time.LocalDate; - -public class Officer { - protected String name; - protected int age; - protected String gender; - protected String address; - - public Officer(String name, int age, String gender, String address) { - this.name = name; - this.age = age; - this.gender = gender; - this.address = address; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getGender() { - return gender; - } - - public void setGender(String gender) { - this.gender = gender; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Staff.java b/synthetic_exercise_oop_java/src/b1/Staff.java deleted file mode 100644 index af58bad..0000000 --- a/synthetic_exercise_oop_java/src/b1/Staff.java +++ /dev/null @@ -1,30 +0,0 @@ -package b1; - -import java.time.LocalDate; - -public class Staff extends Officer { - private String task; - public Staff(String name, int age, String gender, String address, String task) { - super(name, age, gender, address); - this.task = task; - } - - public String getTask() { - return task; - } - - public void setTask(String task) { - this.task = task; - } - - @Override - public String toString() { - return "Staff{" + - "task='" + task + '\'' + - ", name='" + name + '\'' + - ", age=" + age + - ", gender='" + gender + '\'' + - ", address='" + address + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Worker.java b/synthetic_exercise_oop_java/src/b1/Worker.java deleted file mode 100644 index 76aa86d..0000000 --- a/synthetic_exercise_oop_java/src/b1/Worker.java +++ /dev/null @@ -1,31 +0,0 @@ -package b1; - -import java.time.LocalDate; - -public class Worker extends Officer { - private int level; - - public Worker(String name, int age, String gender, String address, int level) { - super(name, age, gender, address); - this.level = level; - } - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - @Override - public String toString() { - return "Worker{" + - "level=" + level + - ", name='" + name + '\'' + - ", age=" + age + - ", gender='" + gender + '\'' + - ", address='" + address + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Book.java b/synthetic_exercise_oop_java/src/b2/Book.java deleted file mode 100644 index 9c3afc1..0000000 --- a/synthetic_exercise_oop_java/src/b2/Book.java +++ /dev/null @@ -1,40 +0,0 @@ -package b2; - -public class Book extends Document { - private String author; - private int numerPage; - - - public Book(String id, String nxb, int number, String author, int numberPage) { - super(id, nxb, number); - this.author = author; - this.numerPage = numberPage; - } - - public String getAuthor() { - return author; - } - - public void setAuthor(String author) { - this.author = author; - } - - public int getNumerPage() { - return numerPage; - } - - public void setNumerPage(int numerPage) { - this.numerPage = numerPage; - } - - @Override - public String toString() { - return "Book{" + - "author='" + author + '\'' + - ", numerPage=" + numerPage + - ", id='" + id + '\'' + - ", nxb='" + nxb + '\'' + - ", number='" + number + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Document.java b/synthetic_exercise_oop_java/src/b2/Document.java deleted file mode 100644 index a6552e5..0000000 --- a/synthetic_exercise_oop_java/src/b2/Document.java +++ /dev/null @@ -1,37 +0,0 @@ -package b2; - -public class Document { - protected String id; - protected String nxb; - protected int number; - - public Document(String id, String nxb, int number) { - this.id = id; - this.nxb = nxb; - this.number = number; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getNxb() { - return nxb; - } - - public void setNxb(String nxb) { - this.nxb = nxb; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Journal.java b/synthetic_exercise_oop_java/src/b2/Journal.java deleted file mode 100644 index 56d2586..0000000 --- a/synthetic_exercise_oop_java/src/b2/Journal.java +++ /dev/null @@ -1,40 +0,0 @@ -package b2; - -public class Journal extends Document { - - private int issueNumber; - private int monthIssue; - - public Journal(String id, String nxb, int number, int issueNumber, int monthIssue) { - super(id, nxb, number); - this.issueNumber = issueNumber; - this.monthIssue = monthIssue; - } - - public int getIssueNumber() { - return issueNumber; - } - - public void setIssueNumber(int issueNumber) { - this.issueNumber = issueNumber; - } - - public int getMonthIssue() { - return monthIssue; - } - - public void setMonthIssue(int monthIssue) { - this.monthIssue = monthIssue; - } - - @Override - public String toString() { - return "Journal{" + - "issueNumber=" + issueNumber + - ", monthIssue=" + monthIssue + - ", id='" + id + '\'' + - ", nxb='" + nxb + '\'' + - ", number='" + number + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Main.java b/synthetic_exercise_oop_java/src/b2/Main.java deleted file mode 100644 index 88cf261..0000000 --- a/synthetic_exercise_oop_java/src/b2/Main.java +++ /dev/null @@ -1,127 +0,0 @@ -package b2; - -import b1.ManagerOfficer; - -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerDocument managerDocument = new ManagerDocument(); - while (true) { - System.out.println("Application Manager Document"); - System.out.println("Enter 1: To insert document"); - System.out.println("Enter 2: To search document by category: "); - System.out.println("Enter 3: To show information documents"); - System.out.println("Enter 4: To remove document by id"); - System.out.println("Enter 5: To exit:"); - String line = scanner.nextLine(); - switch (line) { - case "1": { - System.out.println("Enter a: to insert Book"); - System.out.println("Enter b: to insert Newspaper"); - System.out.println("Enter c: to insert Journal"); - String type = scanner.nextLine(); - switch (type) { - case "a": { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - System.out.print("Enter nxb:"); - String nxb = scanner.nextLine(); - System.out.print("Enter number: "); - int number = scanner.nextInt(); - System.out.print("Enter author: "); - scanner.nextLine(); - String author = scanner.nextLine(); - System.out.print("Enter page number: "); - int pageNumber = scanner.nextInt(); - Document book = new Book(id, nxb, number, author, pageNumber); - managerDocument.addDocument(book); - System.out.println(book.toString()); - scanner.nextLine(); - break; - - } - case "b": { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - System.out.print("Enter nxb:"); - String nxb = scanner.nextLine(); - System.out.print("Enter number: "); - int number = scanner.nextInt(); - System.out.print("Enter Day issue: "); - int dayIssue = scanner.nextInt(); - Document newspaper = new Newspaper(id, nxb, number, dayIssue); - managerDocument.addDocument(newspaper); - System.out.println(newspaper.toString()); - scanner.nextLine(); - break; - } - case "c": { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - System.out.print("Enter nxb:"); - String nxb = scanner.nextLine(); - System.out.print("Enter number: "); - int number = scanner.nextInt(); - System.out.print("Enter issue number : "); - int issueNumber = scanner.nextInt(); - System.out.print("Enter issue month : "); - int issueMonth = scanner.nextInt(); - Document journal = new Journal(id, nxb, number, issueNumber, issueMonth); - managerDocument.addDocument(journal); - System.out.println(journal.toString()); - scanner.nextLine(); - break; - } - default: - break; - } - break; - } - case "2": { - System.out.println("Enter a to search book"); - System.out.println("Enter b to search newspaper"); - System.out.println("Enter a to search journal"); - String choise = scanner.nextLine(); - switch (choise) { - case "a": { - managerDocument.searchByBook(); - break; - } - case "b": { - managerDocument.searchByNewspaper(); - break; - } - case "c": - managerDocument.searchByJournal(); - break; - default: - System.out.println("Invalid"); - break; - } - break; - } - case "3": { - managerDocument.showInfor(); - break; - } - case "4": { - System.out.print("Enter id to remove: "); - String id = scanner.nextLine(); - System.out.println(managerDocument.deleteDocument(id) ? "Success" : "Fail"); - } - break; - case "5": { - return; - } - default: - System.out.println("Invalid"); - continue; - } - - } - } - -} diff --git a/synthetic_exercise_oop_java/src/b2/ManagerDocument.java b/synthetic_exercise_oop_java/src/b2/ManagerDocument.java deleted file mode 100644 index 14d765a..0000000 --- a/synthetic_exercise_oop_java/src/b2/ManagerDocument.java +++ /dev/null @@ -1,43 +0,0 @@ -package b2; - -import java.util.ArrayList; -import java.util.List; - -public class ManagerDocument { - List documents; - - public ManagerDocument() { - this.documents = new ArrayList<>(); - } - - public void addDocument(Document document) { - this.documents.add(document); - } - - public boolean deleteDocument(String id) { - Document doc = this.documents.stream() - .filter(document -> document.getId().equals(id)) - .findFirst().orElse(null); - if (doc == null) { - return false; - } - this.documents.remove(doc); - return true; - } - - public void showInfor() { - this.documents.forEach(documents -> System.out.println(documents.toString())); - } - - public void searchByBook() { - this.documents.stream().filter(doc -> doc instanceof Book).forEach(doc -> System.out.println(doc.toString())); - } - - public void searchByNewspaper() { - this.documents.stream().filter(doc -> doc instanceof Newspaper).forEach(doc -> System.out.println(doc.toString())); - } - - public void searchByJournal() { - this.documents.stream().filter(doc -> doc instanceof Journal).forEach(doc -> System.out.println(doc.toString())); - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Newspaper.java b/synthetic_exercise_oop_java/src/b2/Newspaper.java deleted file mode 100644 index 5f572d4..0000000 --- a/synthetic_exercise_oop_java/src/b2/Newspaper.java +++ /dev/null @@ -1,28 +0,0 @@ -package b2; - -public class Newspaper extends Document { - private int dayIssue; - - public Newspaper(String id, String nxb, int number, int dayIssue) { - super(id, nxb, number); - this.dayIssue = dayIssue; - } - - public int getDayIssue() { - return dayIssue; - } - - public void setDayIssue(int dayIssue) { - this.dayIssue = dayIssue; - } - - @Override - public String toString() { - return "Newspaper{" + - "dayIssue=" + dayIssue + - ", id='" + id + '\'' + - ", nxb='" + nxb + '\'' + - ", number='" + number + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/Candidate.java b/synthetic_exercise_oop_java/src/b3/Candidate.java deleted file mode 100644 index ec5cb47..0000000 --- a/synthetic_exercise_oop_java/src/b3/Candidate.java +++ /dev/null @@ -1,47 +0,0 @@ -package b3; - -public class Candidate { - protected String id; - protected String name; - protected String address; - protected int priority; - - public Candidate(String id, String name, String address, int priority) { - this.id = id; - this.name = name; - this.address = address; - this.priority = priority; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public int getPriority() { - return priority; - } - - public void setPriority(int priority) { - this.priority = priority; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/CandidateA.java b/synthetic_exercise_oop_java/src/b3/CandidateA.java deleted file mode 100644 index 6a2fcfa..0000000 --- a/synthetic_exercise_oop_java/src/b3/CandidateA.java +++ /dev/null @@ -1,20 +0,0 @@ -package b3; - -public class CandidateA extends Candidate { - public static final String MON_TOAN = "Toan"; - public static final String MON_LY = "Ly"; - public static final String MON_HOA = "Hoa"; - public CandidateA(String id, String name, String address, int priority) { - super(id, name, address, priority); - } - - @Override - public String toString() { - return "CandidateA{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", address='" + address + '\'' + - ", priority=" + priority + ", Subject: " + MON_TOAN + " - " + MON_LY + " - " + MON_HOA + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/CandidateB.java b/synthetic_exercise_oop_java/src/b3/CandidateB.java deleted file mode 100644 index 8afc14e..0000000 --- a/synthetic_exercise_oop_java/src/b3/CandidateB.java +++ /dev/null @@ -1,22 +0,0 @@ -package b3; - -public class CandidateB extends Candidate { - - public static final String MON_TOAN = "Toan"; - public static final String MON_HOA = "Hoa"; - public static final String MON_SINH = "Sinh"; - - public CandidateB(String id, String name, String address, int priority) { - super(id, name, address, priority); - } - - @Override - public String toString() { - return "CandidateB{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", address='" + address + '\'' + - ", priority=" + priority + ", Subject: " + MON_TOAN + " - " + MON_SINH + " - " + MON_HOA + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/CandidateC.java b/synthetic_exercise_oop_java/src/b3/CandidateC.java deleted file mode 100644 index 15242bb..0000000 --- a/synthetic_exercise_oop_java/src/b3/CandidateC.java +++ /dev/null @@ -1,22 +0,0 @@ -package b3; - -public class CandidateC extends Candidate { - - public static final String MON_VAN = "Van"; - public static final String MON_SU = "Su"; - public static final String MON_DIA = "Dia"; - - public CandidateC(String id, String name, String address, int priority) { - super(id, name, address, priority); - } - - @Override - public String toString() { - return "CandidateC{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", address='" + address + '\'' + - ", priority=" + priority + ", Subject: " + MON_VAN + " - " + MON_SU + " - " + MON_DIA + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/Main.java b/synthetic_exercise_oop_java/src/b3/Main.java deleted file mode 100644 index daa0aaf..0000000 --- a/synthetic_exercise_oop_java/src/b3/Main.java +++ /dev/null @@ -1,88 +0,0 @@ -package b3; - -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerCandidate managerCandidate = new ManagerCandidate(); - while (true) { - System.out.println("Application Manager Candidate"); - System.out.println("Enter 1: To insert candidate"); - System.out.println("Enter 2: To show information of candidate: "); - System.out.println("Enter 3: To search candidate by id"); - System.out.println("Enter 4: To exit:"); - String line = scanner.nextLine(); - switch (line) { - case "1": { - System.out.println("Enter a: to insert Candidate A"); - System.out.println("Enter b: to insert Candidate B"); - System.out.println("Enter c: to insert Candidate C"); - String type = scanner.nextLine(); - switch (type) { - case "a": { - managerCandidate.add(createCadidate(scanner, "a")); - break; - - } - case "b": { - managerCandidate.add(createCadidate(scanner, "b")); - break; - } - case "c": { - managerCandidate.add(createCadidate(scanner, "c")); - break; - } - default: - System.out.println("Invalid"); - break; - } - break; - } - case "2": { - managerCandidate.showInfor(); - break; - } - case "3": { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - Candidate candidate = managerCandidate.searchById(id); - if (candidate == null) { - System.out.println("Not found"); - } else { - System.out.println(candidate.toString()); - } - break; - } - case "4": { - return; - } - default: - System.out.println("Invalid"); - continue; - } - - } - } - - public static Candidate createCadidate(Scanner scanner, String cate) { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter address: "); - String address = scanner.nextLine(); - System.out.print("Enter Priotity: "); - int priority = scanner.nextInt(); - scanner.nextLine(); - if (cate.equals("a")) { - return new CandidateA(id, name,address,priority); - } else if (cate.equals("b")) { - return new CandidateB(id, name,address,priority); - } else { - return new CandidateC(id, name,address,priority); - } - - } -} diff --git a/synthetic_exercise_oop_java/src/b3/ManagerCandidate.java b/synthetic_exercise_oop_java/src/b3/ManagerCandidate.java deleted file mode 100644 index 7ed3d96..0000000 --- a/synthetic_exercise_oop_java/src/b3/ManagerCandidate.java +++ /dev/null @@ -1,25 +0,0 @@ -package b3; - -import java.util.ArrayList; -import java.util.List; - -public class ManagerCandidate { - List candidates; - public ManagerCandidate() { - this.candidates = new ArrayList<>(); - } - - public void add(Candidate candidate) { - this.candidates.add(candidate); - } - - public void showInfor() { - this.candidates.forEach(candidate -> System.out.println(candidate.toString())); - } - - public Candidate searchById(String id) { - return this.candidates.stream().filter(candidate -> candidate.getId().equals(id)).findFirst().orElse(null); - } - - -} diff --git a/synthetic_exercise_oop_java/src/b4/Family.java b/synthetic_exercise_oop_java/src/b4/Family.java deleted file mode 100644 index 72aa52f..0000000 --- a/synthetic_exercise_oop_java/src/b4/Family.java +++ /dev/null @@ -1,37 +0,0 @@ -package b4; - -import java.util.List; - -public class Family { - private List presons; - private String address; - - public Family(List presons, String address) { - this.presons = presons; - this.address = address; - } - - public List getPresons() { - return presons; - } - - public void setPresons(List presons) { - this.presons = presons; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - @Override - public String toString() { - return "Family{" + - "presons=" + presons + - ", address='" + address + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b4/Main.java b/synthetic_exercise_oop_java/src/b4/Main.java deleted file mode 100644 index 382ba01..0000000 --- a/synthetic_exercise_oop_java/src/b4/Main.java +++ /dev/null @@ -1,38 +0,0 @@ -package b4; - -import java.util.ArrayList; -import java.util.List; -import java.util.Scanner; - -// This is sudo code. To overview how to do it. -// You can finish by fill you code - -public class Main { - public static void main(String[] args) { - Town town = new Town(); - Scanner scanner = new Scanner(System.in); - System.out.println("Enter n:"); - int n = scanner.nextInt(); - for(int i = 0; i < n; i++) { - // Input foreach famili - - System.out.println("Enter address:"); - scanner.nextLine(); - String address = scanner.nextLine(); - - // Enter person number in family - List persons = new ArrayList<>(); - System.out.println("Enter number person"); - int number = scanner.nextInt(); - - for (int j = 0; j < number; j++) { - // Inout person for family - } - - // After done input - town.addFamily(new Family(persons,address )); - - - } - } -} diff --git a/synthetic_exercise_oop_java/src/b4/Person.java b/synthetic_exercise_oop_java/src/b4/Person.java deleted file mode 100644 index 057a494..0000000 --- a/synthetic_exercise_oop_java/src/b4/Person.java +++ /dev/null @@ -1,58 +0,0 @@ -package b4; - -public class Person { - private String name; - private int age; - private String job; - private String passport; - - public Person(String name, int age, String job, String passport) { - this.name = name; - this.age = age; - this.job = job; - this.passport = passport; - } - - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getJob() { - return job; - } - - public void setJob(String job) { - this.job = job; - } - - public String getPassport() { - return passport; - } - - public void setPassport(String passport) { - this.passport = passport; - } - - @Override - public String toString() { - return "Person{" + - "name='" + name + '\'' + - ", age=" + age + - ", job='" + job + '\'' + - ", passport='" + passport + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b4/Town.java b/synthetic_exercise_oop_java/src/b4/Town.java deleted file mode 100644 index 82b3ee8..0000000 --- a/synthetic_exercise_oop_java/src/b4/Town.java +++ /dev/null @@ -1,24 +0,0 @@ -package b4; - -import java.util.ArrayList; -import java.util.List; - -public class Town { - List families; - - public Town() { - this.families = new ArrayList<>(); - } - - public List getFamilies() { - return families; - } - - public void setFamilies(List families) { - this.families = families; - } - - public void addFamily(Family family) { - this.families.add(family); - } -} diff --git a/synthetic_exercise_oop_java/src/b5/Hotel.java b/synthetic_exercise_oop_java/src/b5/Hotel.java deleted file mode 100644 index 42b9317..0000000 --- a/synthetic_exercise_oop_java/src/b5/Hotel.java +++ /dev/null @@ -1,38 +0,0 @@ -package b5; - -import java.util.ArrayList; -import java.util.List; - -public class Hotel { - private List persons; - - public Hotel() { - persons = new ArrayList<>(); - } - - public void add(Person person) { - this.persons.add(person); - } - - public boolean delete(String passport) { - Person person = this.persons.stream().filter(p -> p.getPassport().equals(passport)).findFirst().orElse(null); - if (person == null) { - return false; - } else { - this.persons.remove(person); - return true; - } - } - - public int calculator(String passport) { - Person person = this.persons.stream().filter(p -> p.getPassport().equals(passport)).findFirst().orElse(null); - if (person == null) { - return 0; - } - return person.getRoom().getPrice() * person.getNumberRent(); - } - - public void show() { - this.persons.forEach(p -> System.out.println(p.toString())); - } -} diff --git a/synthetic_exercise_oop_java/src/b5/Main.java b/synthetic_exercise_oop_java/src/b5/Main.java deleted file mode 100644 index 47c259f..0000000 --- a/synthetic_exercise_oop_java/src/b5/Main.java +++ /dev/null @@ -1,73 +0,0 @@ -package b5; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - Hotel hotel = new Hotel(); - while (true) { - System.out.println("Application Manager Candidate"); - System.out.println("Enter 1: To insert person for rent"); - System.out.println("Enter 2: To remove person by passport"); - System.out.println("Enter 3: To calculator price by passport"); - System.out.println("Enter 4: To show infor"); - System.out.println("Enter 5: To exit:"); - String line = scanner.nextLine(); - switch(line) { - case "1": { - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter age: "); - int age = scanner.nextInt(); - System.out.print("Enter passport: "); - scanner.nextLine(); - String passport = scanner.nextLine(); - System.out.println("Choise a to rent room type A"); - System.out.println("Choise b to rent room type B"); - System.out.println("Choise c to rent room type C"); - String choise = scanner.nextLine(); - Room room; - if (choise.equals("a")) { - room = new RoomA(); - } else if (choise.equals("b")) { - room = new RoomB(); - } else if (choise.equals("c")) { - room = new RoomC(); - } else { - continue; - } - System.out.print("Enter number day for rent: "); - int numberRent = scanner.nextInt(); - Person person = new Person(name, age, passport, room, numberRent); - hotel.add(person); - scanner.nextLine(); - break; - } - case "2": { - System.out.print("Enter passport: "); - String passport = scanner.nextLine(); - hotel.delete(passport); - break; - } - case "3": { - System.out.print("Enter passport: "); - String passport = scanner.nextLine(); - System.out.println("Price: " + hotel.calculator(passport)); - break; - } - case "4": { - hotel.show(); - break; - } - case "5": { - return; - } - default: - System.out.println("Invalid"); - continue; - } - } - - } -} diff --git a/synthetic_exercise_oop_java/src/b5/Person.java b/synthetic_exercise_oop_java/src/b5/Person.java deleted file mode 100644 index 1f85bac..0000000 --- a/synthetic_exercise_oop_java/src/b5/Person.java +++ /dev/null @@ -1,66 +0,0 @@ -package b5; - -public class Person { - private String name; - private int age; - private String passport; - private Room room; - private int numberRent; - - public Person(String name, int age, String passport, Room room, int numberRent) { - this.name = name; - this.age = age; - this.passport = passport; - this.numberRent = numberRent; - this.room = room; - } - - public int getNumberRent() { - return numberRent; - } - - public void setNumberRent(int numberRent) { - this.numberRent = numberRent; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getPassport() { - return passport; - } - - public void setPassport(String passport) { - this.passport = passport; - } - - public Room getRoom() { - return room; - } - - public void setRoom(Room room) { - this.room = room; - } - - @Override - public String toString() { - return "Person{" + - "name='" + name + '\'' + - ", age=" + age + - ", passport='" + passport + '\'' + room.toString() + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b5/Room.java b/synthetic_exercise_oop_java/src/b5/Room.java deleted file mode 100644 index 3d761a2..0000000 --- a/synthetic_exercise_oop_java/src/b5/Room.java +++ /dev/null @@ -1,27 +0,0 @@ -package b5; - -public class Room { - protected String category; - protected int price; - - public Room(String category, int price) { - this.category = category; - this.price = price; - } - - public String getCategory() { - return category; - } - - public void setCategory(String category) { - this.category = category; - } - - public int getPrice() { - return price; - } - - public void setPrice(int price) { - this.price = price; - } -} diff --git a/synthetic_exercise_oop_java/src/b5/RoomA.java b/synthetic_exercise_oop_java/src/b5/RoomA.java deleted file mode 100644 index 5157f66..0000000 --- a/synthetic_exercise_oop_java/src/b5/RoomA.java +++ /dev/null @@ -1,16 +0,0 @@ -package b5; - -public class RoomA extends Room { - - public RoomA() { - super("A", 500); - } - - @Override - public String toString() { - return "RoomA{" + - "category='" + category + '\'' + - ", price=" + price + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b5/RoomB.java b/synthetic_exercise_oop_java/src/b5/RoomB.java deleted file mode 100644 index fcb01d2..0000000 --- a/synthetic_exercise_oop_java/src/b5/RoomB.java +++ /dev/null @@ -1,15 +0,0 @@ -package b5; - -public class RoomB extends Room { - public RoomB() { - super("B", 300); - } - - @Override - public String toString() { - return "RoomB{" + - "category='" + category + '\'' + - ", price=" + price + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b5/RoomC.java b/synthetic_exercise_oop_java/src/b5/RoomC.java deleted file mode 100644 index 48f7c53..0000000 --- a/synthetic_exercise_oop_java/src/b5/RoomC.java +++ /dev/null @@ -1,15 +0,0 @@ -package b5; - -public class RoomC extends Room { - public RoomC() { - super("C", 100); - } - - @Override - public String toString() { - return "RoomC{" + - "category='" + category + '\'' + - ", price=" + price + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b6/Main.java b/synthetic_exercise_oop_java/src/b6/Main.java deleted file mode 100644 index 594ac5a..0000000 --- a/synthetic_exercise_oop_java/src/b6/Main.java +++ /dev/null @@ -1,17 +0,0 @@ -package b6; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - - School school = new School(); - - // add Student to school by func add(). for ex: school.add(new Student(// infor); - - school.getStudent20YearOld(); - - school.countStudent23YearOldInDN(); - } -} diff --git a/synthetic_exercise_oop_java/src/b6/School.java b/synthetic_exercise_oop_java/src/b6/School.java deleted file mode 100644 index 9a91a34..0000000 --- a/synthetic_exercise_oop_java/src/b6/School.java +++ /dev/null @@ -1,25 +0,0 @@ -package b6; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class School { - private List students; - - public School() { - this.students = new ArrayList<>(); - } - - public void add(Student student) { - this.students.add(student); - } - - public List getStudent20YearOld() { - return this.students.stream().filter(student -> student.getAge() == 20).collect(Collectors.toList()); - } - - public long countStudent23YearOldInDN() { - return this.students.stream().filter(student -> student.getAge() == 23 && student.getHometown().equals("DN")).count(); - } -} diff --git a/synthetic_exercise_oop_java/src/b6/Student.java b/synthetic_exercise_oop_java/src/b6/Student.java deleted file mode 100644 index c1c6650..0000000 --- a/synthetic_exercise_oop_java/src/b6/Student.java +++ /dev/null @@ -1,56 +0,0 @@ -package b6; - -public class Student { - private String name; - private int age; - private String hometown; - private int classStudent; - - public Student(String name, int age, String hometown, int classStudent) { - this.name = name; - this.age = age; - this.hometown = hometown; - this.classStudent = classStudent; - } - - public int getClassStudent() { - return classStudent; - } - - public void setClassStudent(int classStudent) { - this.classStudent = classStudent; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getHometown() { - return hometown; - } - - public void setHometown(String hometown) { - this.hometown = hometown; - } - - @Override - public String toString() { - return "Student{" + - "name='" + name + '\'' + - ", age=" + age + - ", hometown='" + hometown + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b7/Main.java b/synthetic_exercise_oop_java/src/b7/Main.java deleted file mode 100644 index b3668df..0000000 --- a/synthetic_exercise_oop_java/src/b7/Main.java +++ /dev/null @@ -1,19 +0,0 @@ -package b7; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerTeacher managerTeacher = new ManagerTeacher(); - while (true) { - // show input for user choise - // 1 to insert - // 2 to remove => input id. output boolean - // 4 get salary => input id. output double - // 5 exit => return - - } - } - -} diff --git a/synthetic_exercise_oop_java/src/b7/ManagerTeacher.java b/synthetic_exercise_oop_java/src/b7/ManagerTeacher.java deleted file mode 100644 index 5ee02e7..0000000 --- a/synthetic_exercise_oop_java/src/b7/ManagerTeacher.java +++ /dev/null @@ -1,33 +0,0 @@ -package b7; - -import java.util.ArrayList; -import java.util.List; - -public class ManagerTeacher { - private List teachers; - - public ManagerTeacher() { - this.teachers = new ArrayList<>(); - } - - public void add(Teacher teacher) { - this.teachers.add(teacher); - } - - public boolean deleteById(String id) { - Teacher teacher = this.teachers.stream().filter(t -> t.getId().equals(id)).findFirst().orElse(null); - if (teacher == null) { - return false; - } - this.teachers.remove(teacher); - return true; - } - - public double getSalary(String id) { - Teacher teacher = this.teachers.stream().filter(t -> t.getId().equals(id)).findFirst().orElse(null); - if (teacher == null) { - return 0; - } - return teacher.getSalary() + teacher.getBonus() + teacher.getPenaty(); - } -} diff --git a/synthetic_exercise_oop_java/src/b7/Teacher.java b/synthetic_exercise_oop_java/src/b7/Teacher.java deleted file mode 100644 index a3cc9d3..0000000 --- a/synthetic_exercise_oop_java/src/b7/Teacher.java +++ /dev/null @@ -1,88 +0,0 @@ -package b7; - -public class Teacher { - private double salary; - private double bonus; - private double penaty; - private double realSalary; - private String name; - private int age; - private String hometown; - private String id; - - - public Teacher(double salary, double bonus, double penaty, double realSalary, String name, int age, String hometown, String id) { - this.salary = salary; - this.bonus = bonus; - this.penaty = penaty; - this.realSalary = realSalary; - this.name = name; - this.age = age; - this.hometown = hometown; - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getHometown() { - return hometown; - } - - public void setHometown(String hometown) { - this.hometown = hometown; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public double getSalary() { - return salary; - } - - public void setSalary(double salary) { - this.salary = salary; - } - - public double getBonus() { - return bonus; - } - - public void setBonus(double bonus) { - this.bonus = bonus; - } - - public double getPenaty() { - return penaty; - } - - public void setPenaty(double penaty) { - this.penaty = penaty; - } - - public double getRealSalary() { - return realSalary; - } - - public void setRealSalary(double realSalary) { - this.realSalary = realSalary; - } -} diff --git a/synthetic_exercise_oop_java/src/b8/Card.java b/synthetic_exercise_oop_java/src/b8/Card.java deleted file mode 100644 index 7bf14c1..0000000 --- a/synthetic_exercise_oop_java/src/b8/Card.java +++ /dev/null @@ -1,57 +0,0 @@ -package b8; - -public class Card { - private Student student; - private String id; - private int borrowDate; - private int paymentDate; - private int bookId; - - public Card(Student student, String id, int borrowDate, int paymentDate, int bookId) { - this.student = student; - this.id = id; - this.borrowDate = borrowDate; - this.paymentDate = paymentDate; - this.bookId = bookId; - } - - public Student getStudent() { - return student; - } - - public void setStudent(Student student) { - this.student = student; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public int getBorrowDate() { - return borrowDate; - } - - public void setBorrowDate(int borrowDate) { - this.borrowDate = borrowDate; - } - - public int getPaymentDate() { - return paymentDate; - } - - public void setPaymentDate(int paymentDate) { - this.paymentDate = paymentDate; - } - - public int getBookId() { - return bookId; - } - - public void setBookId(int bookId) { - this.bookId = bookId; - } -} diff --git a/synthetic_exercise_oop_java/src/b8/Main.java b/synthetic_exercise_oop_java/src/b8/Main.java deleted file mode 100644 index a0106a3..0000000 --- a/synthetic_exercise_oop_java/src/b8/Main.java +++ /dev/null @@ -1,18 +0,0 @@ -package b8; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerCard managerCard = new ManagerCard(); - while (true) { - // show input for user choise - // 1 to insert - // 2 to remove => input id. output boolean - // 4 get salary => input id. output double - // 5 exit => return - - } - } -} diff --git a/synthetic_exercise_oop_java/src/b8/ManagerCard.java b/synthetic_exercise_oop_java/src/b8/ManagerCard.java deleted file mode 100644 index f9aec48..0000000 --- a/synthetic_exercise_oop_java/src/b8/ManagerCard.java +++ /dev/null @@ -1,26 +0,0 @@ -package b8; - -import java.util.ArrayList; -import java.util.List; - -public class ManagerCard { - - private List cards; - - public ManagerCard() { - this.cards = new ArrayList<>(); - } - - public void add(Card card) { - this.cards.add(card); - } - - public boolean delete(String id) { - Card card = this.cards.stream().filter(t -> t.getId().equals(id)).findFirst().orElse(null); - if (card == null) { - return false; - } - this.cards.remove(card); - return true; - } -} diff --git a/synthetic_exercise_oop_java/src/b8/Student.java b/synthetic_exercise_oop_java/src/b8/Student.java deleted file mode 100644 index c01e5fe..0000000 --- a/synthetic_exercise_oop_java/src/b8/Student.java +++ /dev/null @@ -1,37 +0,0 @@ -package b8; - -public class Student { - private String name; - private int age; - private String school; - - public Student(String name, int age, String school) { - this.name = name; - this.age = age; - this.school = school; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getSchool() { - return school; - } - - public void setSchool(String school) { - this.school = school; - } -} diff --git a/synthetic_exercise_oop_java/synthetic_exercise_oop_java.iml b/synthetic_exercise_oop_java/synthetic_exercise_oop_java.iml deleted file mode 100644 index c90834f..0000000 --- a/synthetic_exercise_oop_java/synthetic_exercise_oop_java.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file From e995c6170de3c698a29aacdde905c9b99dcf7ff5 Mon Sep 17 00:00:00 2001 From: idiotman-2212 Date: Tue, 24 Oct 2023 18:23:21 +0700 Subject: [PATCH 2/5] update --- .idea/.gitignore | 8 -- .idea/misc.xml | 6 - .idea/modules.xml | 20 --- .idea/vcs.xml | 6 - Bai1/Bai1/.classpath | 6 + Bai1/Bai1/.project | 28 ++++ .../Bai1/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai1/Bai1/bin/Class/PhanSo.class | Bin 0 -> 2488 bytes Bai1/Bai1/bin/Test/TestClass.class | Bin 0 -> 1187 bytes Bai1/Bai1/src/Class/PhanSo.java | 114 ++++++++++++++++ Bai1/Bai1/src/Test/TestClass.java | 35 +++++ Bai10/Bai10/.classpath | 10 ++ Bai10/Bai10/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai10/Bai10/bin/BuildClass/BienLai.class | Bin 0 -> 1621 bytes Bai10/Bai10/bin/BuildClass/KhachHang.class | Bin 0 -> 1460 bytes Bai10/Bai10/bin/BuildClass/QuanLy.class | Bin 0 -> 1832 bytes Bai10/Bai10/bin/UseClass/Using.class | Bin 0 -> 916 bytes Bai10/Bai10/src/BuildClass/BienLai.java | 50 +++++++ Bai10/Bai10/src/BuildClass/KhachHang.java | 41 ++++++ Bai10/Bai10/src/BuildClass/QuanLy.java | 45 +++++++ Bai10/Bai10/src/UseClass/Using.java | 21 +++ Bai11/Bai11/.classpath | 10 ++ Bai11/Bai11/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai11/Bai11/bin/BuildClass/VanBan.class | Bin 0 -> 1515 bytes Bai11/Bai11/bin/UseClass/TestClass.class | Bin 0 -> 1442 bytes Bai11/Bai11/src/BuildClass/VanBan.java | 74 ++++++++++ Bai11/Bai11/src/UseClass/TestClass.java | 26 ++++ Bai12/Bai12/.classpath | 10 ++ Bai12/Bai12/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai12/Bai12/bin/BuildClass/MaTran.class | Bin 0 -> 2148 bytes Bai12/Bai12/bin/UseClass/TestClass.class | Bin 0 -> 1484 bytes Bai12/Bai12/src/BuildClass/MaTran.java | 77 +++++++++++ Bai12/Bai12/src/UseClass/TestClass.java | 45 +++++++ Bai13/Bai13/.classpath | 10 ++ Bai13/Bai13/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai13/Bai13/bin/BuildClass/OTo.class | Bin 0 -> 1313 bytes Bai13/Bai13/bin/BuildClass/PTGT.class | Bin 0 -> 1734 bytes Bai13/Bai13/bin/BuildClass/QLPTGT.class | Bin 0 -> 2468 bytes Bai13/Bai13/bin/BuildClass/XeMay.class | Bin 0 -> 1090 bytes Bai13/Bai13/bin/BuildClass/XeTai.class | Bin 0 -> 1093 bytes Bai13/Bai13/bin/UseClass/TestClass.class | Bin 0 -> 1028 bytes Bai13/Bai13/src/BuildClass/OTo.java | 34 +++++ Bai13/Bai13/src/BuildClass/PTGT.java | 50 +++++++ Bai13/Bai13/src/BuildClass/QLPTGT.java | 70 ++++++++++ Bai13/Bai13/src/BuildClass/XeMay.java | 32 +++++ Bai13/Bai13/src/BuildClass/XeTai.java | 32 +++++ Bai13/Bai13/src/UseClass/TestClass.java | 24 ++++ Bai14/Bai14/.classpath | 10 ++ Bai14/Bai14/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai14/Bai14/bin/BuildClass/DaGiac.class | Bin 0 -> 1601 bytes Bai14/Bai14/bin/BuildClass/TamGiac.class | Bin 0 -> 1429 bytes Bai14/Bai14/bin/UseClass/TestClass.class | Bin 0 -> 2489 bytes Bai14/Bai14/src/BuildClass/DaGiac.java | 50 +++++++ Bai14/Bai14/src/BuildClass/TamGiac.java | 48 +++++++ Bai14/Bai14/src/UseClass/TestClass.java | 69 ++++++++++ Bai15/Bai15/.classpath | 10 ++ Bai15/Bai15/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai15/Bai15/bin/BuildClass/Diem.class | Bin 0 -> 1406 bytes Bai15/Bai15/bin/BuildClass/TamGiac.class | Bin 0 -> 1040 bytes Bai15/Bai15/bin/UseClass/TestClass.class | Bin 0 -> 1312 bytes Bai15/Bai15/src/BuildClass/Diem.java | 50 +++++++ Bai15/Bai15/src/BuildClass/TamGiac.java | 40 ++++++ Bai15/Bai15/src/UseClass/TestClass.java | 23 ++++ Bai16/Bai16/.classpath | 10 ++ Bai16/Bai16/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai16/Bai16/bin/BuildClass/Diem.class | Bin 0 -> 1406 bytes Bai16/Bai16/bin/BuildClass/HinhTron.class | Bin 0 -> 718 bytes Bai16/Bai16/bin/UseClass/Test.class | Bin 0 -> 1197 bytes Bai16/Bai16/src/BuildClass/Diem.java | 46 +++++++ Bai16/Bai16/src/BuildClass/HinhTron.java | 28 ++++ Bai16/Bai16/src/UseClass/Test.java | 22 +++ Bai2/Bai2/.classpath | 6 + Bai2/Bai2/.project | 28 ++++ .../Bai2/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai2/Bai2/bin/Class/CanBo.class | Bin 0 -> 1619 bytes Bai2/Bai2/bin/Class/CongNhan.class | Bin 0 -> 1329 bytes Bai2/Bai2/bin/Class/KySu.class | Bin 0 -> 1345 bytes Bai2/Bai2/bin/Class/NhanVien.class | Bin 0 -> 1346 bytes Bai2/Bai2/bin/Class/QLCB.class | Bin 0 -> 2235 bytes Bai2/Bai2/bin/Testing/Test.class | Bin 0 -> 974 bytes Bai2/Bai2/src/Class/CanBo.java | 50 +++++++ Bai2/Bai2/src/Class/CongNhan.java | 33 +++++ Bai2/Bai2/src/Class/KySu.java | 33 +++++ Bai2/Bai2/src/Class/NhanVien.java | 33 +++++ Bai2/Bai2/src/Class/QLCB.java | 69 ++++++++++ Bai2/Bai2/src/Testing/Test.java | 25 ++++ Bai3/Bai3/.classpath | 6 + Bai3/Bai3/.project | 28 ++++ .../Bai3/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai3/Bai3/bin/Class/Bao.class | Bin 0 -> 1267 bytes Bai3/Bai3/bin/Class/QuanLySach.class | Bin 0 -> 2492 bytes Bai3/Bai3/bin/Class/Sach.class | Bin 0 -> 1467 bytes Bai3/Bai3/bin/Class/TaiLieu.class | Bin 0 -> 1561 bytes Bai3/Bai3/bin/Class/TapChi.class | Bin 0 -> 1431 bytes Bai3/Bai3/bin/Testing/Test.class | Bin 0 -> 1128 bytes Bai3/Bai3/src/Class/Bao.java | 33 +++++ Bai3/Bai3/src/Class/QuanLySach.java | 82 +++++++++++ Bai3/Bai3/src/Class/Sach.java | 39 ++++++ Bai3/Bai3/src/Class/TaiLieu.java | 46 +++++++ Bai3/Bai3/src/Class/TapChi.java | 39 ++++++ Bai3/Bai3/src/Testing/Test.java | 27 ++++ Bai4/Bai4/.classpath | 6 + Bai4/Bai4/.project | 28 ++++ .../Bai4/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai4/Bai4/bin/Class/KhoiA.class | Bin 0 -> 1334 bytes Bai4/Bai4/bin/Class/KhoiB.class | Bin 0 -> 461 bytes Bai4/Bai4/bin/Class/KhoiC.class | Bin 0 -> 461 bytes Bai4/Bai4/bin/Class/ThiSinh.class | Bin 0 -> 1674 bytes Bai4/Bai4/bin/Class/TuyenSinh.class | Bin 0 -> 2554 bytes Bai4/Bai4/bin/Testing/Test.class | Bin 0 -> 1169 bytes Bai4/Bai4/src/Class/KhoiA.java | 40 ++++++ Bai4/Bai4/src/Class/KhoiB.java | 15 +++ Bai4/Bai4/src/Class/KhoiC.java | 15 +++ Bai4/Bai4/src/Class/ThiSinh.java | 51 +++++++ Bai4/Bai4/src/Class/TuyenSinh.java | 70 ++++++++++ Bai4/Bai4/src/Testing/Test.java | 29 ++++ Bai5/Bai5/.classpath | 6 + Bai5/Bai5/.project | 28 ++++ .../Bai5/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai5/Bai5/bin/Class/HoDan.class | Bin 0 -> 2070 bytes Bai5/Bai5/bin/Class/KhuPho.class | Bin 0 -> 2511 bytes Bai5/Bai5/bin/Class/Nguoi.class | Bin 0 -> 2235 bytes Bai5/Bai5/bin/Testing/Test.class | Bin 0 -> 872 bytes Bai5/Bai5/src/Class/HoDan.java | 61 +++++++++ Bai5/Bai5/src/Class/KhuPho.java | 66 +++++++++ Bai5/Bai5/src/Class/Nguoi.java | 73 ++++++++++ Bai5/Bai5/src/Testing/Test.java | 20 +++ Bai6/Bai6/.classpath | 6 + Bai6/Bai6/.project | 28 ++++ .../Bai6/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai6/Bai6/bin/Class/KhachSan.class | Bin 0 -> 2154 bytes Bai6/Bai6/bin/Class/KhachTro.class | Bin 0 -> 1803 bytes Bai6/Bai6/bin/Class/Nguoi.class | Bin 0 -> 2103 bytes Bai6/Bai6/bin/Testing/Test.class | Bin 0 -> 1150 bytes Bai6/Bai6/src/Class/KhachSan.java | 57 ++++++++ Bai6/Bai6/src/Class/KhachTro.java | 58 ++++++++ Bai6/Bai6/src/Class/Nguoi.java | 62 +++++++++ Bai6/Bai6/src/Testing/Test.java | 24 ++++ Bai7/Bai7/.classpath | 6 + Bai7/Bai7/.project | 28 ++++ .../Bai7/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai7/Bai7/bin/Class/HocSinh.class | Bin 0 -> 1524 bytes Bai7/Bai7/bin/Class/Nguoi.class | Bin 0 -> 2159 bytes Bai7/Bai7/bin/Class/QLHS.class | Bin 0 -> 2517 bytes Bai7/Bai7/bin/Testing/Test.class | Bin 0 -> 1054 bytes Bai7/Bai7/src/Class/HocSinh.java | 52 +++++++ Bai7/Bai7/src/Class/Nguoi.java | 70 ++++++++++ Bai7/Bai7/src/Class/QLHS.java | 64 +++++++++ Bai7/Bai7/src/Testing/Test.java | 25 ++++ Bai8/Bai8/.classpath | 6 + Bai8/Bai8/.project | 28 ++++ .../Bai8/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai8/Bai8/bin/Class/CBGV.class | Bin 0 -> 1419 bytes Bai8/Bai8/bin/Class/Nguoi.class | Bin 0 -> 1368 bytes Bai8/Bai8/bin/Class/QuanLy.class | Bin 0 -> 2041 bytes Bai8/Bai8/bin/Testing/Test.class | Bin 0 -> 916 bytes Bai8/Bai8/src/Class/CBGV.java | 52 +++++++ Bai8/Bai8/src/Class/Nguoi.java | 40 ++++++ Bai8/Bai8/src/Class/QuanLy.java | 53 ++++++++ Bai8/Bai8/src/Testing/Test.java | 22 +++ Bai9/Bai9/.classpath | 6 + Bai9/Bai9/.project | 28 ++++ .../Bai9/.settings/org.eclipse.jdt.core.prefs | 12 ++ Bai9/Bai9/bin/Class/QuanLy.class | Bin 0 -> 1988 bytes Bai9/Bai9/bin/Class/SinhVien.class | Bin 0 -> 1526 bytes Bai9/Bai9/bin/Class/TheMuon.class | Bin 0 -> 2328 bytes Bai9/Bai9/bin/Testing/Test.class | Bin 0 -> 915 bytes Bai9/Bai9/src/Class/QuanLy.java | 46 +++++++ Bai9/Bai9/src/Class/SinhVien.java | 48 +++++++ Bai9/Bai9/src/Class/TheMuon.java | 75 +++++++++++ Bai9/Bai9/src/Testing/Test.java | 22 +++ README.md | 3 - exercise_oop_account/Account.java | 41 ------ exercise_oop_account/Main.java | 35 ----- .../exercise_oop_composition_book_author.iml | 11 -- .../src/Author.java | 38 ------ .../src/Book.java | 39 ------ .../src/Main.java | 8 -- ...ercise_oop_composition_student_address.iml | 11 -- .../src/Address.java | 39 ------ .../src/Main.java | 13 -- .../src/Student.java | 58 -------- exercise_oop_date/exercise_oop_date.iml | 11 -- exercise_oop_date/src/Date.java | 56 -------- exercise_oop_date/src/Main.java | 8 -- .../exercise_oop_employee.iml | 11 -- exercise_oop_employee/src/Employee.java | 51 ------- exercise_oop_employee/src/Main.java | 10 -- ...ercise_oop_inheritance_circle_cylinder.iml | 11 -- .../src/Circle.java | 36 ----- .../src/Cylinder.java | 21 --- .../src/Main.java | 8 -- ...e_oop_inheritance_person_student_staff.iml | 11 -- .../src/Main.java | 10 -- .../src/Person.java | 17 --- .../src/Staff.java | 31 ----- .../src/Student.java | 47 ------- ...se_oop_polymorphism_interface_moveable.iml | 11 -- .../src/Main.java | 16 --- .../src/Moveable.java | 6 - .../src/MoveableCircle.java | 35 ----- .../src/MoveablePoint.java | 76 ----------- exercise_polymorphism/Circle.java | 38 ------ exercise_polymorphism/Main.java | 53 -------- exercise_polymorphism/Rectangle.java | 50 ------- exercise_polymorphism/Shape.java | 32 ----- exercise_polymorphism/Square.java | 12 -- .../exerciseoop_class-object_cricle.iml | 11 -- .../src/com/company/Circle.java | 45 ------- .../src/com/company/Main.java | 33 ----- .../exerciseoop_class-object_rectangle.iml | 11 -- .../src/com/company/Main.java | 12 -- .../src/com/company/Rectangle.java | 37 ----- oop-b14/oop-b14.iml | 11 -- oop-b14/src/Main.java | 33 ----- oop-b14/src/entity/GoodStudent.java | 18 --- oop-b14/src/entity/NormalStudent.java | 16 --- oop-b14/src/entity/Student.java | 24 ---- oop-shareprogramming.iml | 12 -- oop_employee_management/.idea/.gitignore | 3 - oop_employee_management/.idea/misc.xml | 6 - oop_employee_management/.idea/modules.xml | 8 -- .../.idea/sonarlint/issuestore/index.pb | 0 oop_employee_management/.idea/uiDesigner.xml | 124 ----------------- oop_employee_management/.idea/vcs.xml | 6 - oop_employee_management/README.md | 11 -- oop_employee_management/oop_b13.iml | 11 -- .../oop_employee_management.iml | 11 -- .../out/production/oop_b13/Main.class | Bin 508 -> 0 bytes .../oop_b13/entity/Certificate.class | Bin 1366 -> 0 bytes .../production/oop_b13/entity/Employee.class | Bin 2387 -> 0 bytes .../oop_b13/entity/Experience.class | Bin 2530 -> 0 bytes .../production/oop_b13/entity/Fresher.class | Bin 2937 -> 0 bytes .../production/oop_b13/entity/Intern.class | Bin 2816 -> 0 bytes .../oop_b13/exception/BirthDayException.class | Bin 363 -> 0 bytes .../oop_b13/exception/EmailException.class | Bin 290 -> 0 bytes .../oop_b13/exception/FullNameException.class | Bin 363 -> 0 bytes .../oop_b13/exception/PhoneException.class | Bin 354 -> 0 bytes .../oop_b13/service/EmployeeManager.class | Bin 3081 -> 0 bytes .../oop_b13/ui/ScannerFactory.class | Bin 575 -> 0 bytes .../out/production/oop_b13/ui/UIManager.class | Bin 1580 -> 0 bytes oop_employee_management/src/Main.java | 29 ---- .../src/entity/Certificate.java | 52 ------- .../src/entity/Employee.java | 75 ----------- .../src/entity/Experience.java | 57 -------- .../src/entity/Fresher.java | 70 ---------- .../src/entity/Intern.java | 69 ---------- .../src/exception/BirthDayException.java | 7 - .../src/exception/EmailException.java | 4 - .../src/exception/FullNameException.java | 8 -- .../src/exception/PhoneException.java | 8 -- .../src/service/EmployeeManager.java | 64 --------- .../src/service/ValidatorService.java | 27 ---- .../src/ui/ScannerFactory.java | 15 --- oop_employee_management/src/ui/UIManager.java | 113 ---------------- synthetic_exercise_oop_java/src/Main.java | 6 - .../src/b1/Engineer.java | 30 ----- synthetic_exercise_oop_java/src/b1/Main.java | 106 --------------- .../src/b1/ManagerOfficer.java | 25 ---- .../src/b1/Officer.java | 49 ------- synthetic_exercise_oop_java/src/b1/Staff.java | 30 ----- .../src/b1/Worker.java | 31 ----- synthetic_exercise_oop_java/src/b2/Book.java | 40 ------ .../src/b2/Document.java | 37 ----- .../src/b2/Journal.java | 40 ------ synthetic_exercise_oop_java/src/b2/Main.java | 127 ------------------ .../src/b2/ManagerDocument.java | 43 ------ .../src/b2/Newspaper.java | 28 ---- .../src/b3/Candidate.java | 47 ------- .../src/b3/CandidateA.java | 20 --- .../src/b3/CandidateB.java | 22 --- .../src/b3/CandidateC.java | 22 --- synthetic_exercise_oop_java/src/b3/Main.java | 88 ------------ .../src/b3/ManagerCandidate.java | 25 ---- .../src/b4/Family.java | 37 ----- synthetic_exercise_oop_java/src/b4/Main.java | 38 ------ .../src/b4/Person.java | 58 -------- synthetic_exercise_oop_java/src/b4/Town.java | 24 ---- synthetic_exercise_oop_java/src/b5/Hotel.java | 38 ------ synthetic_exercise_oop_java/src/b5/Main.java | 73 ---------- .../src/b5/Person.java | 66 --------- synthetic_exercise_oop_java/src/b5/Room.java | 27 ---- synthetic_exercise_oop_java/src/b5/RoomA.java | 16 --- synthetic_exercise_oop_java/src/b5/RoomB.java | 15 --- synthetic_exercise_oop_java/src/b5/RoomC.java | 15 --- synthetic_exercise_oop_java/src/b6/Main.java | 17 --- .../src/b6/School.java | 25 ---- .../src/b6/Student.java | 56 -------- synthetic_exercise_oop_java/src/b7/Main.java | 19 --- .../src/b7/ManagerTeacher.java | 33 ----- .../src/b7/Teacher.java | 88 ------------ synthetic_exercise_oop_java/src/b8/Card.java | 57 -------- synthetic_exercise_oop_java/src/b8/Main.java | 18 --- .../src/b8/ManagerCard.java | 26 ---- .../src/b8/Student.java | 37 ----- .../synthetic_exercise_oop_java.iml | 11 -- 303 files changed, 3629 insertions(+), 3655 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml create mode 100644 Bai1/Bai1/.classpath create mode 100644 Bai1/Bai1/.project create mode 100644 Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai1/Bai1/bin/Class/PhanSo.class create mode 100644 Bai1/Bai1/bin/Test/TestClass.class create mode 100644 Bai1/Bai1/src/Class/PhanSo.java create mode 100644 Bai1/Bai1/src/Test/TestClass.java create mode 100644 Bai10/Bai10/.classpath create mode 100644 Bai10/Bai10/.project create mode 100644 Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai10/Bai10/bin/BuildClass/BienLai.class create mode 100644 Bai10/Bai10/bin/BuildClass/KhachHang.class create mode 100644 Bai10/Bai10/bin/BuildClass/QuanLy.class create mode 100644 Bai10/Bai10/bin/UseClass/Using.class create mode 100644 Bai10/Bai10/src/BuildClass/BienLai.java create mode 100644 Bai10/Bai10/src/BuildClass/KhachHang.java create mode 100644 Bai10/Bai10/src/BuildClass/QuanLy.java create mode 100644 Bai10/Bai10/src/UseClass/Using.java create mode 100644 Bai11/Bai11/.classpath create mode 100644 Bai11/Bai11/.project create mode 100644 Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai11/Bai11/bin/BuildClass/VanBan.class create mode 100644 Bai11/Bai11/bin/UseClass/TestClass.class create mode 100644 Bai11/Bai11/src/BuildClass/VanBan.java create mode 100644 Bai11/Bai11/src/UseClass/TestClass.java create mode 100644 Bai12/Bai12/.classpath create mode 100644 Bai12/Bai12/.project create mode 100644 Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai12/Bai12/bin/BuildClass/MaTran.class create mode 100644 Bai12/Bai12/bin/UseClass/TestClass.class create mode 100644 Bai12/Bai12/src/BuildClass/MaTran.java create mode 100644 Bai12/Bai12/src/UseClass/TestClass.java create mode 100644 Bai13/Bai13/.classpath create mode 100644 Bai13/Bai13/.project create mode 100644 Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai13/Bai13/bin/BuildClass/OTo.class create mode 100644 Bai13/Bai13/bin/BuildClass/PTGT.class create mode 100644 Bai13/Bai13/bin/BuildClass/QLPTGT.class create mode 100644 Bai13/Bai13/bin/BuildClass/XeMay.class create mode 100644 Bai13/Bai13/bin/BuildClass/XeTai.class create mode 100644 Bai13/Bai13/bin/UseClass/TestClass.class create mode 100644 Bai13/Bai13/src/BuildClass/OTo.java create mode 100644 Bai13/Bai13/src/BuildClass/PTGT.java create mode 100644 Bai13/Bai13/src/BuildClass/QLPTGT.java create mode 100644 Bai13/Bai13/src/BuildClass/XeMay.java create mode 100644 Bai13/Bai13/src/BuildClass/XeTai.java create mode 100644 Bai13/Bai13/src/UseClass/TestClass.java create mode 100644 Bai14/Bai14/.classpath create mode 100644 Bai14/Bai14/.project create mode 100644 Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai14/Bai14/bin/BuildClass/DaGiac.class create mode 100644 Bai14/Bai14/bin/BuildClass/TamGiac.class create mode 100644 Bai14/Bai14/bin/UseClass/TestClass.class create mode 100644 Bai14/Bai14/src/BuildClass/DaGiac.java create mode 100644 Bai14/Bai14/src/BuildClass/TamGiac.java create mode 100644 Bai14/Bai14/src/UseClass/TestClass.java create mode 100644 Bai15/Bai15/.classpath create mode 100644 Bai15/Bai15/.project create mode 100644 Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai15/Bai15/bin/BuildClass/Diem.class create mode 100644 Bai15/Bai15/bin/BuildClass/TamGiac.class create mode 100644 Bai15/Bai15/bin/UseClass/TestClass.class create mode 100644 Bai15/Bai15/src/BuildClass/Diem.java create mode 100644 Bai15/Bai15/src/BuildClass/TamGiac.java create mode 100644 Bai15/Bai15/src/UseClass/TestClass.java create mode 100644 Bai16/Bai16/.classpath create mode 100644 Bai16/Bai16/.project create mode 100644 Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai16/Bai16/bin/BuildClass/Diem.class create mode 100644 Bai16/Bai16/bin/BuildClass/HinhTron.class create mode 100644 Bai16/Bai16/bin/UseClass/Test.class create mode 100644 Bai16/Bai16/src/BuildClass/Diem.java create mode 100644 Bai16/Bai16/src/BuildClass/HinhTron.java create mode 100644 Bai16/Bai16/src/UseClass/Test.java create mode 100644 Bai2/Bai2/.classpath create mode 100644 Bai2/Bai2/.project create mode 100644 Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai2/Bai2/bin/Class/CanBo.class create mode 100644 Bai2/Bai2/bin/Class/CongNhan.class create mode 100644 Bai2/Bai2/bin/Class/KySu.class create mode 100644 Bai2/Bai2/bin/Class/NhanVien.class create mode 100644 Bai2/Bai2/bin/Class/QLCB.class create mode 100644 Bai2/Bai2/bin/Testing/Test.class create mode 100644 Bai2/Bai2/src/Class/CanBo.java create mode 100644 Bai2/Bai2/src/Class/CongNhan.java create mode 100644 Bai2/Bai2/src/Class/KySu.java create mode 100644 Bai2/Bai2/src/Class/NhanVien.java create mode 100644 Bai2/Bai2/src/Class/QLCB.java create mode 100644 Bai2/Bai2/src/Testing/Test.java create mode 100644 Bai3/Bai3/.classpath create mode 100644 Bai3/Bai3/.project create mode 100644 Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai3/Bai3/bin/Class/Bao.class create mode 100644 Bai3/Bai3/bin/Class/QuanLySach.class create mode 100644 Bai3/Bai3/bin/Class/Sach.class create mode 100644 Bai3/Bai3/bin/Class/TaiLieu.class create mode 100644 Bai3/Bai3/bin/Class/TapChi.class create mode 100644 Bai3/Bai3/bin/Testing/Test.class create mode 100644 Bai3/Bai3/src/Class/Bao.java create mode 100644 Bai3/Bai3/src/Class/QuanLySach.java create mode 100644 Bai3/Bai3/src/Class/Sach.java create mode 100644 Bai3/Bai3/src/Class/TaiLieu.java create mode 100644 Bai3/Bai3/src/Class/TapChi.java create mode 100644 Bai3/Bai3/src/Testing/Test.java create mode 100644 Bai4/Bai4/.classpath create mode 100644 Bai4/Bai4/.project create mode 100644 Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai4/Bai4/bin/Class/KhoiA.class create mode 100644 Bai4/Bai4/bin/Class/KhoiB.class create mode 100644 Bai4/Bai4/bin/Class/KhoiC.class create mode 100644 Bai4/Bai4/bin/Class/ThiSinh.class create mode 100644 Bai4/Bai4/bin/Class/TuyenSinh.class create mode 100644 Bai4/Bai4/bin/Testing/Test.class create mode 100644 Bai4/Bai4/src/Class/KhoiA.java create mode 100644 Bai4/Bai4/src/Class/KhoiB.java create mode 100644 Bai4/Bai4/src/Class/KhoiC.java create mode 100644 Bai4/Bai4/src/Class/ThiSinh.java create mode 100644 Bai4/Bai4/src/Class/TuyenSinh.java create mode 100644 Bai4/Bai4/src/Testing/Test.java create mode 100644 Bai5/Bai5/.classpath create mode 100644 Bai5/Bai5/.project create mode 100644 Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai5/Bai5/bin/Class/HoDan.class create mode 100644 Bai5/Bai5/bin/Class/KhuPho.class create mode 100644 Bai5/Bai5/bin/Class/Nguoi.class create mode 100644 Bai5/Bai5/bin/Testing/Test.class create mode 100644 Bai5/Bai5/src/Class/HoDan.java create mode 100644 Bai5/Bai5/src/Class/KhuPho.java create mode 100644 Bai5/Bai5/src/Class/Nguoi.java create mode 100644 Bai5/Bai5/src/Testing/Test.java create mode 100644 Bai6/Bai6/.classpath create mode 100644 Bai6/Bai6/.project create mode 100644 Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai6/Bai6/bin/Class/KhachSan.class create mode 100644 Bai6/Bai6/bin/Class/KhachTro.class create mode 100644 Bai6/Bai6/bin/Class/Nguoi.class create mode 100644 Bai6/Bai6/bin/Testing/Test.class create mode 100644 Bai6/Bai6/src/Class/KhachSan.java create mode 100644 Bai6/Bai6/src/Class/KhachTro.java create mode 100644 Bai6/Bai6/src/Class/Nguoi.java create mode 100644 Bai6/Bai6/src/Testing/Test.java create mode 100644 Bai7/Bai7/.classpath create mode 100644 Bai7/Bai7/.project create mode 100644 Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai7/Bai7/bin/Class/HocSinh.class create mode 100644 Bai7/Bai7/bin/Class/Nguoi.class create mode 100644 Bai7/Bai7/bin/Class/QLHS.class create mode 100644 Bai7/Bai7/bin/Testing/Test.class create mode 100644 Bai7/Bai7/src/Class/HocSinh.java create mode 100644 Bai7/Bai7/src/Class/Nguoi.java create mode 100644 Bai7/Bai7/src/Class/QLHS.java create mode 100644 Bai7/Bai7/src/Testing/Test.java create mode 100644 Bai8/Bai8/.classpath create mode 100644 Bai8/Bai8/.project create mode 100644 Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai8/Bai8/bin/Class/CBGV.class create mode 100644 Bai8/Bai8/bin/Class/Nguoi.class create mode 100644 Bai8/Bai8/bin/Class/QuanLy.class create mode 100644 Bai8/Bai8/bin/Testing/Test.class create mode 100644 Bai8/Bai8/src/Class/CBGV.java create mode 100644 Bai8/Bai8/src/Class/Nguoi.java create mode 100644 Bai8/Bai8/src/Class/QuanLy.java create mode 100644 Bai8/Bai8/src/Testing/Test.java create mode 100644 Bai9/Bai9/.classpath create mode 100644 Bai9/Bai9/.project create mode 100644 Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs create mode 100644 Bai9/Bai9/bin/Class/QuanLy.class create mode 100644 Bai9/Bai9/bin/Class/SinhVien.class create mode 100644 Bai9/Bai9/bin/Class/TheMuon.class create mode 100644 Bai9/Bai9/bin/Testing/Test.class create mode 100644 Bai9/Bai9/src/Class/QuanLy.java create mode 100644 Bai9/Bai9/src/Class/SinhVien.java create mode 100644 Bai9/Bai9/src/Class/TheMuon.java create mode 100644 Bai9/Bai9/src/Testing/Test.java delete mode 100644 README.md delete mode 100644 exercise_oop_account/Account.java delete mode 100644 exercise_oop_account/Main.java delete mode 100644 exercise_oop_composition_book_author/exercise_oop_composition_book_author.iml delete mode 100644 exercise_oop_composition_book_author/src/Author.java delete mode 100644 exercise_oop_composition_book_author/src/Book.java delete mode 100644 exercise_oop_composition_book_author/src/Main.java delete mode 100644 exercise_oop_composition_student_address/exercise_oop_composition_student_address.iml delete mode 100644 exercise_oop_composition_student_address/src/Address.java delete mode 100644 exercise_oop_composition_student_address/src/Main.java delete mode 100644 exercise_oop_composition_student_address/src/Student.java delete mode 100644 exercise_oop_date/exercise_oop_date.iml delete mode 100644 exercise_oop_date/src/Date.java delete mode 100644 exercise_oop_date/src/Main.java delete mode 100644 exercise_oop_employee/exercise_oop_employee.iml delete mode 100644 exercise_oop_employee/src/Employee.java delete mode 100644 exercise_oop_employee/src/Main.java delete mode 100644 exercise_oop_inheritance_circle_cylinder/exercise_oop_inheritance_circle_cylinder.iml delete mode 100644 exercise_oop_inheritance_circle_cylinder/src/Circle.java delete mode 100644 exercise_oop_inheritance_circle_cylinder/src/Cylinder.java delete mode 100644 exercise_oop_inheritance_circle_cylinder/src/Main.java delete mode 100644 exercise_oop_inheritance_person_student_staff/exercise_oop_inheritance_person_student_staff.iml delete mode 100644 exercise_oop_inheritance_person_student_staff/src/Main.java delete mode 100644 exercise_oop_inheritance_person_student_staff/src/Person.java delete mode 100644 exercise_oop_inheritance_person_student_staff/src/Staff.java delete mode 100644 exercise_oop_inheritance_person_student_staff/src/Student.java delete mode 100644 exercise_oop_polymorphism_interface_moveable/exercise_oop_polymorphism_interface_moveable.iml delete mode 100644 exercise_oop_polymorphism_interface_moveable/src/Main.java delete mode 100644 exercise_oop_polymorphism_interface_moveable/src/Moveable.java delete mode 100644 exercise_oop_polymorphism_interface_moveable/src/MoveableCircle.java delete mode 100644 exercise_oop_polymorphism_interface_moveable/src/MoveablePoint.java delete mode 100644 exercise_polymorphism/Circle.java delete mode 100644 exercise_polymorphism/Main.java delete mode 100644 exercise_polymorphism/Rectangle.java delete mode 100644 exercise_polymorphism/Shape.java delete mode 100644 exercise_polymorphism/Square.java delete mode 100644 exerciseoop_class-object_cricle/exerciseoop_class-object_cricle.iml delete mode 100644 exerciseoop_class-object_cricle/src/com/company/Circle.java delete mode 100644 exerciseoop_class-object_cricle/src/com/company/Main.java delete mode 100644 exerciseoop_class-object_rectangle/exerciseoop_class-object_rectangle.iml delete mode 100644 exerciseoop_class-object_rectangle/src/com/company/Main.java delete mode 100644 exerciseoop_class-object_rectangle/src/com/company/Rectangle.java delete mode 100644 oop-b14/oop-b14.iml delete mode 100644 oop-b14/src/Main.java delete mode 100644 oop-b14/src/entity/GoodStudent.java delete mode 100644 oop-b14/src/entity/NormalStudent.java delete mode 100644 oop-b14/src/entity/Student.java delete mode 100644 oop-shareprogramming.iml delete mode 100644 oop_employee_management/.idea/.gitignore delete mode 100644 oop_employee_management/.idea/misc.xml delete mode 100644 oop_employee_management/.idea/modules.xml delete mode 100644 oop_employee_management/.idea/sonarlint/issuestore/index.pb delete mode 100644 oop_employee_management/.idea/uiDesigner.xml delete mode 100644 oop_employee_management/.idea/vcs.xml delete mode 100644 oop_employee_management/README.md delete mode 100644 oop_employee_management/oop_b13.iml delete mode 100644 oop_employee_management/oop_employee_management.iml delete mode 100644 oop_employee_management/out/production/oop_b13/Main.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Certificate.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Employee.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Experience.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Fresher.class delete mode 100644 oop_employee_management/out/production/oop_b13/entity/Intern.class delete mode 100644 oop_employee_management/out/production/oop_b13/exception/BirthDayException.class delete mode 100644 oop_employee_management/out/production/oop_b13/exception/EmailException.class delete mode 100644 oop_employee_management/out/production/oop_b13/exception/FullNameException.class delete mode 100644 oop_employee_management/out/production/oop_b13/exception/PhoneException.class delete mode 100644 oop_employee_management/out/production/oop_b13/service/EmployeeManager.class delete mode 100644 oop_employee_management/out/production/oop_b13/ui/ScannerFactory.class delete mode 100644 oop_employee_management/out/production/oop_b13/ui/UIManager.class delete mode 100644 oop_employee_management/src/Main.java delete mode 100644 oop_employee_management/src/entity/Certificate.java delete mode 100644 oop_employee_management/src/entity/Employee.java delete mode 100644 oop_employee_management/src/entity/Experience.java delete mode 100644 oop_employee_management/src/entity/Fresher.java delete mode 100644 oop_employee_management/src/entity/Intern.java delete mode 100644 oop_employee_management/src/exception/BirthDayException.java delete mode 100644 oop_employee_management/src/exception/EmailException.java delete mode 100644 oop_employee_management/src/exception/FullNameException.java delete mode 100644 oop_employee_management/src/exception/PhoneException.java delete mode 100644 oop_employee_management/src/service/EmployeeManager.java delete mode 100644 oop_employee_management/src/service/ValidatorService.java delete mode 100644 oop_employee_management/src/ui/ScannerFactory.java delete mode 100644 oop_employee_management/src/ui/UIManager.java delete mode 100644 synthetic_exercise_oop_java/src/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Engineer.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b1/ManagerOfficer.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Officer.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Staff.java delete mode 100644 synthetic_exercise_oop_java/src/b1/Worker.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Book.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Document.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Journal.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b2/ManagerDocument.java delete mode 100644 synthetic_exercise_oop_java/src/b2/Newspaper.java delete mode 100644 synthetic_exercise_oop_java/src/b3/Candidate.java delete mode 100644 synthetic_exercise_oop_java/src/b3/CandidateA.java delete mode 100644 synthetic_exercise_oop_java/src/b3/CandidateB.java delete mode 100644 synthetic_exercise_oop_java/src/b3/CandidateC.java delete mode 100644 synthetic_exercise_oop_java/src/b3/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b3/ManagerCandidate.java delete mode 100644 synthetic_exercise_oop_java/src/b4/Family.java delete mode 100644 synthetic_exercise_oop_java/src/b4/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b4/Person.java delete mode 100644 synthetic_exercise_oop_java/src/b4/Town.java delete mode 100644 synthetic_exercise_oop_java/src/b5/Hotel.java delete mode 100644 synthetic_exercise_oop_java/src/b5/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b5/Person.java delete mode 100644 synthetic_exercise_oop_java/src/b5/Room.java delete mode 100644 synthetic_exercise_oop_java/src/b5/RoomA.java delete mode 100644 synthetic_exercise_oop_java/src/b5/RoomB.java delete mode 100644 synthetic_exercise_oop_java/src/b5/RoomC.java delete mode 100644 synthetic_exercise_oop_java/src/b6/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b6/School.java delete mode 100644 synthetic_exercise_oop_java/src/b6/Student.java delete mode 100644 synthetic_exercise_oop_java/src/b7/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b7/ManagerTeacher.java delete mode 100644 synthetic_exercise_oop_java/src/b7/Teacher.java delete mode 100644 synthetic_exercise_oop_java/src/b8/Card.java delete mode 100644 synthetic_exercise_oop_java/src/b8/Main.java delete mode 100644 synthetic_exercise_oop_java/src/b8/ManagerCard.java delete mode 100644 synthetic_exercise_oop_java/src/b8/Student.java delete mode 100644 synthetic_exercise_oop_java/synthetic_exercise_oop_java.iml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 639900d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 0e0500a..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Bai1/Bai1/.classpath b/Bai1/Bai1/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai1/Bai1/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai1/Bai1/.project b/Bai1/Bai1/.project new file mode 100644 index 0000000..c0b6442 --- /dev/null +++ b/Bai1/Bai1/.project @@ -0,0 +1,28 @@ + + + Bai1 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272454 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs b/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai1/Bai1/bin/Class/PhanSo.class b/Bai1/Bai1/bin/Class/PhanSo.class new file mode 100644 index 0000000000000000000000000000000000000000..f4ab430de744f5d071adb46963043e69e1f8c136 GIT binary patch literal 2488 zcmbVOU2_v<6n@?$G#}kGP@1ANi3w(OsTejvPrkiLb4l^4Fk9S z3mGrGV}{{E9cUey@dr5mA8%BA&hDC~1B~eG%=O69g$brm9Rr|c-GlESWr;m!M|E!%Qu6vFw@ zWqvX1teFXfp=pRA9*4q!hF$2B*=`L{^eLp~EZbb@G%99m$*9y#g~2(eYSfpFmL=<8 zGvd~)HtpwnsZG&!zEl!leRj=gE|wLB^K%~8j%(G6<*H%ZW@~D6IgU3m62<-3_sg!pj{CxlYaI`8Kfm%vrK!bW-XSZm{i!eT_%2n=Q>t>&1}UmP5AiH1WsW_ zis4WKXK*fxvrOr>&Aj2(G|b{-hH6xp?nu5gS`woR8ZP1z(`+=GroE<+;fc?*N6)|; z)Ab4I7R7K*4CfV&zD)gB0*K`m4U4#{5OWVg}CdV2!^_+kSIHyR@J;bj<>jY0vl39}H?|WSL)BXd_!n6V74C7DU2TFvW=*s_yFcRQ; z;R*RYL8|sGj+62;oLU*2+QMns{|O&$;{0G~6PM)^f4PYTFRJl>zW(&zzupdcn9>48 zX7L#59mgau4U++EXLdaZO~^+Onkn!~n?6;fj z?p20+tA|3m8-ChLyEI1HOS^RX9(>X5CjOoI15p(vlP?M3*W?vC6qBKXBtnXC3r6HS z?20@NZ`1MX&%|!5({;^r@84xZfqSWVA`KF(+HKSdw?aHP*b6>gSfQtpx?FLbrDXQP j)!E>k;PBRJ@>coEb2scG1@4lJagCAjMrR93o2>s0nJt_c literal 0 HcmV?d00001 diff --git a/Bai1/Bai1/bin/Test/TestClass.class b/Bai1/Bai1/bin/Test/TestClass.class new file mode 100644 index 0000000000000000000000000000000000000000..be5aed6b0fd45d221976022f7d59b12d173fe4cd GIT binary patch literal 1187 zcmZuwYflo|XVnjw z)TBS4KdR}Og%(KoGBfuv=bn4!&hI}ze*xIShah|cV_RWQ0>iteWx9I;L#gzMfPddU*CQB0SVI8A0^@np(vO?9GrdugXH{Jwmbc5Y zdLkR9vO7+{YnToTjm_0URJ$WhZWSs~}$4vT}))it^HPWH!J!A!G#- z0|^<@B%e8KXxPLfLX~Z+qM#O2`Cb8X>3%bW$7B{!>h$)OtV$2=sfK52Lc)frTP4FR z6hqh%nC!d2+A2SUT|RR+LIQ1=DE2hGP%wdV)pj^ue%YvSlHvo#g|F_E85$q}U#sqH zaO(S8@Z6hhx$cx$Qy@~bn~k!5V5&*>zKEy5x_Trmf%*JGfR87RKi43wEO)^@uyT#i z4=)_ys={Ex2v@D0z1{wplT z?zFI+S#4oO8S6CGl#y9$;bA*rOC_}MM8&sNymQX+obc0N{_`%)15B`dgfvGu+!_aA z6wCY~8TvO6!#2Hp{8Vp|z!7HgnHi^;$2TlM$09EH8!T$0+T3clf|qzjYXs+bjeRy6 c$5*@|f{%AgIN)iBH9q1UPkzSVGuwy5zZN(L6aWAK literal 0 HcmV?d00001 diff --git a/Bai1/Bai1/src/Class/PhanSo.java b/Bai1/Bai1/src/Class/PhanSo.java new file mode 100644 index 0000000..d68a2c8 --- /dev/null +++ b/Bai1/Bai1/src/Class/PhanSo.java @@ -0,0 +1,114 @@ +package Class; + +import java.util.Scanner; + +public class PhanSo { + // thuoc tinh + private int tuSo; + private int mauSo; + + // phuong thuc + // ham khoi tao khong doi so + public PhanSo() { + tuSo = 0; + mauSo = 1; + } + + // ham khoi tao co doi so + public PhanSo(int tuSo, int mauSo) { + this.tuSo = tuSo; + this.mauSo = mauSo; + } + + // ham nhap phan so + public void nhapPS(Scanner sc) { + int a; + int b; + + do { + System.out.print("\tNhap vao tu so: "); + a = sc.nextInt(); + + System.out.print("\tNhap vao mau so: "); + b = sc.nextInt(); + + // kiem tra + if (b == 0) { + System.out.println("Mau so khong duoc bang 0. Hay nhap lai!"); + } else { + tuSo = a; + mauSo = b; + } + } while (b == 0); + } + + // ham hien thi + public void hienThiPS() { + if (tuSo * mauSo < 0) { + System.out.println("\t-" + Math.abs(tuSo) + "/" + Math.abs(mauSo)); + } else { + System.out.println("\t" + Math.abs(tuSo) + "/" + Math.abs(mauSo)); + } + } + + // ham cong + public PhanSo congPS(PhanSo ps2) { + int a = tuSo * ps2.mauSo + ps2.tuSo * mauSo; + int b = mauSo * ps2.mauSo; + + return new PhanSo(a, b); + } + + // ham tru + public PhanSo truPS(PhanSo ps2) { + int a = tuSo * ps2.mauSo - ps2.tuSo * mauSo; + int b = mauSo * ps2.mauSo; + + return new PhanSo(a, b); + } + + // ham nhan + public PhanSo nhanPS(PhanSo ps2) { + int a = tuSo * ps2.tuSo; + int b = mauSo * ps2.mauSo; + + return new PhanSo(a, b); + } + + // ham chia + public PhanSo chiaPS(PhanSo ps2) { + int a = tuSo * ps2.mauSo; + int b = mauSo * ps2.tuSo; + + return new PhanSo(a, b); + } + + // ham tim uscln + private int timUSCLN(int a, int b) { + int r = a % b; + + while (r != 0) { + a = b; + b = r; + r = a % b; + } + + return b; + } + + // ham kiem tra phan so toi gian hay chua + public boolean kiemTraToiGian() { + if (timUSCLN(tuSo, mauSo) == 1) { + return true; + } + return false; + } + + // ham toi gian + public void toiGianPS() { + int x = timUSCLN(tuSo, mauSo); + + tuSo /= x; + mauSo /= x; + } +} diff --git a/Bai1/Bai1/src/Test/TestClass.java b/Bai1/Bai1/src/Test/TestClass.java new file mode 100644 index 0000000..a38acdf --- /dev/null +++ b/Bai1/Bai1/src/Test/TestClass.java @@ -0,0 +1,35 @@ +package Test; + +import java.util.Scanner; + +import Class.PhanSo; + +public class TestClass { + + public static void main(String[] args) { + Scanner sc=new Scanner(System.in); + PhanSo ps1=new PhanSo(); + PhanSo ps2=new PhanSo(); + PhanSo psTong =new PhanSo(); + + // nhap phan so + System.out.println("Nhap vao phan so thu nhat:"); + ps1.nhapPS(sc); + System.out.println("Nhap vao phan so thu hai:"); + ps2.nhapPS(sc); + + // tinh tong 2 phan so + psTong=ps1.congPS(ps2); + + // hien thi phan so + System.out.println("\nPhan so thu nhat la:"); + ps1.hienThiPS(); + System.out.println("\nPhan so thu hai la:"); + ps2.hienThiPS(); + System.out.println("\nPhan so tong la:"); + psTong.hienThiPS(); + + sc.close(); + } + +} diff --git a/Bai10/Bai10/.classpath b/Bai10/Bai10/.classpath new file mode 100644 index 0000000..4f2c72b --- /dev/null +++ b/Bai10/Bai10/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Bai10/Bai10/.project b/Bai10/Bai10/.project new file mode 100644 index 0000000..cc55708 --- /dev/null +++ b/Bai10/Bai10/.project @@ -0,0 +1,28 @@ + + + Bai10 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272482 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs b/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai10/Bai10/bin/BuildClass/BienLai.class b/Bai10/Bai10/bin/BuildClass/BienLai.class new file mode 100644 index 0000000000000000000000000000000000000000..f78d91586f76cfba284557e5b56087c0bfbc6192 GIT binary patch literal 1621 zcmZ{k+j84f6o&upIQ5}Q(>ShiorF3)q_#ril!gLvDXknzOx-la#-(tjI+{p~BV}xv zfjjP);Q@FLn8ulb86JR#;Sm`AwXLK!X>YWTYyICkZ2kT3AAbSZz_$s+6f)Mp>+aRM zcE4Y-JjZX?UIKB2?AZQe*Y3F6w!g2C?6_VtcoKLDs;-dG%i2I89@3bbTMFmydA=9k zSC}f5+dQcSdrlftxL_cS^9r*K&v$kP2QQso%YNB)2+;^ScDHT!JXuGZ@zC}91Zj+s zM1)m}l+@s$K?#^Jds1WOS$UHI_S7a4uU3N{&^-hv2Ieci~Q=Ctr#(IvW zPuEVjg40XlGliK{Z6Z4sK9>etPs2jpz!!MTF0l^}9e+<@u~a{c9C@pX#S;TNI?6B@ zwTYyA*T6H$YC>nV>nG7@}#%57!WZ}7Je=U+*Z@@ z0T@wZuSvjIW-CwejZPsZoy}QH`dW|dYL3&q!MDV(!POm(N_Nd-%>1UW&GMV388Cx5 zW^s`-V{{2~$Z#bN=J^!|T}n-J%!&hZ;fRyPBjn8T5%RD7<@B8l{mm01iwn5KSx);l zxl8-Vx6A}wpt2fWNV4)IsU*sUNcktOC9r~4UOmEsC}+(jkMwG&q!~6eU*VLYAg^096f})66f}(_x1ed_Jm-szXnxfx2P|{-7|XxoTBbb2s<}GE zZ9;MQ@VRVOUvK90rfI$+^DE@`=3@W2KTlAv=z=Yi;3{izjXAqc?HgRJz~tYcf)XC0 ztRu+jidm--Soj3@$)@B*M2x>Me#z@DGxmTqf5Li^**eA}VHje2h{h04PY%8u9pug& mv_=Q{A=)F0|JV5zb=H`{3hrVZPjP#!hjveU=mkk)_~t(n|1Z-3 literal 0 HcmV?d00001 diff --git a/Bai10/Bai10/bin/BuildClass/KhachHang.class b/Bai10/Bai10/bin/BuildClass/KhachHang.class new file mode 100644 index 0000000000000000000000000000000000000000..726f6dbffdbc6a7caffd99df2de2d0c40c130882 GIT binary patch literal 1460 zcmZuw+foxj5IqBdP2vKIA)=xzcuRs9MMWieBVLF^yd;I?;}W*mrIOuLva$5l2meP) zVwG0;0e+O_>D`bJ!^=$1O!w*2r+fbV{rMZfEtEA3DJ0ffPIV_=HJi=shHX~tb<^F| z5K%b3XMQlVRUWgiw)d=xuMqVuH*dGrJ%!0)@44hR9CtUTFw*okZBs!N=vy=Mp1WJ7 z@93)II{pKN;Z%A{A(HoYtT=`-t|N|P3KK=gwKiL|ZL3i>x2u+*dlj>~Wi}i+cP=Bo z?KBmV#iJ-Qdnz@^sW5nz-ikqCO2-IB#X6-!LsYEOI${`A&|TZCmu+G1xJ=l=ZTU_$ zTdJ6@Yc+C$at^Z^&i5%*`qcETnhpbVEZ1vMw5gDS<7Hn{CZA$iW-S-R1(q43Ty=x0 z8Wp=`*xrf}$0c0Ra9QDGAaH+}jug_=xh_bAKBD6ERvZgh)NobdL;!J^w~lMbvN^8x z(HGS@0IBq#Mp4{Q7!TPsJ%f4(vjyDLIXJf!G>I<=1-7&h#hq>~HPfh2IKyWx3Pa5b z3kmTL(_ptIY{zoTwsWAfhE?|B|Dg(6Z8f6c^o+&IeM05%NCqe!M-FQ`@_52gGwXHB z-BDOPN}7Q}JMcMyc&6idppEZ^11+s6=y)NDYk}fbH;SS{ELQ4jlEbE?ex)#zDhw)l zkRXaTQozeTb>bzj)u>p{92xoX?(e%MB4CaKIn0kbjEGDst%%HNuyaa-UCIBUpU%@w z?uz?J<_E^U(ip-7*En}zjKLE)PD>A+Z~~J&3BXCN0#K!AgnL2&G7I}OX7-WHEbe2v zhnFN7FgC)t7!nxA6s=@{oeASR*hC753#mjvU6>@~i?Jw$GdSDH{Dqn2ZTTB!Cg@VP*Wtr-H=?Ja b=m+vTjmucV6>RWd_qtQ;cIPdhAh-G-E;5hbI!fpdin34e*u_8RYypmZ?0ii zit`m&uV)@Kq?0?;p$YWv$;UENkxnUde|OI+xB{VKU7$bbe`vUNC3Ck{lZQFG?q&r# z@^;CQZlh)ij9wHolWW^(&bFMKw6n9!yfkAwwmT~jPNp^mwE1e$G7v_Wi4GV#dIaJZ z>}jAIeJUizoaAz9vjYNenTX($Ku^wgtkuT;u2tKRyA^VZ<*Ef)*_1U~&4WeFE!)%- zZ>QGufV?{0vb7%&6}X&i4?5+a+Eg@#O^o0g1;}EN4kerN+q}!Bb_Dd@rf9Of2ui?o z%JN`AI_119lm!L?9N+4EK{}3A%PN`g;(ZCO$xtG^!0&D=3s*&8*dI z$IZJnOYUc*NDB$rL9`dI)I8B7R74ix4a zTDgVolt|IQN0`)ci_O(4T%f?j$C#oSj`g#JPR;&Vk*_lZ^<9d}v7R!=v<{EoD0QOpZ;shTPa5^lLc7w%wD zb=QP?`@+PRSZ1rrg9FQ9jfdHA=col}^!OfIl2FqscSYr{3fydOi&Lxq7ei&PnRwtk z;#QmSI`VAf^T)`*I=a-bX<`f4gHGBgv#=YsWAI#To4ATW9^raHwfniMu-%2jA2kY_ zUgTX_c(fu9f^*VSrZ*d9`?NV#)9;!nfL4S{mfr|x3~62&S;grm6D1ftk^x4G));J6 zB}1V-GEq@|q1EkQSa~B~ZPW_ZlC6$zXY)voE7o|2YQns}s6`!hK6TDQh(hB#FAR>I zTv_nvKrDR(GkuKi?Ox*uy?-G7n;+lLvD-&78QFzC&IY(P_fZC#kpT*G@HP^}5#)b8zsdbS0hBywB(+Fm94NK&AkKER{wv8LUhRG(o*BW-PgKx=w zi3mzfh|d*#hwr(^2xjmD-!%Nl-QozHFd(8s=sej%K#h3#x;VcwP+7Sco_U7b?fQn^ zl&8!d@*w}lx(AD)9?DOI7*gvV_MV=+XsH}zKY({&1WCG_!UWQo;(UP@f~sw^DvN=l Y5axW&!spEY!haAEx5#s!p&>Z`0fD29L;wH) literal 0 HcmV?d00001 diff --git a/Bai10/Bai10/bin/UseClass/Using.class b/Bai10/Bai10/bin/UseClass/Using.class new file mode 100644 index 0000000000000000000000000000000000000000..9c5c7ee243c2121d1cdcece28c63fbd3a710c900 GIT binary patch literal 916 zcmZuwT~8B16g^W~mM#mFRj#X?(>fCG8FB= z;eMNkLd9o~+1L{i5!jbmn}pcsLNcsYzt|J@RveP1X05GZnPE9iB(dtN7U&BI0FqlV9*AN z!B>8qsY@sP&tuh&W#C~tPLCM(J#pTV^6IgHCn}e7{2-zMXL;D8S(c^@jC_wAN=-3= zQeS}gg~JmRM=0B;SUViy=KIFx5S0_$F5VlW+8APs z;ztvLN(!J8fk7i(K$$>I@@NA^ROv+#n`3bL(w ds; + + // Phuong thuc + // Ham khoi tao + public QuanLy() { + ds = new ArrayList(10); + } + + // Ham them bien lai vao danh sach + public void themBienLai(BienLai bienLai) { + ds.add(bienLai); + } + + // Ham nhap danh sach + public void nhapDanhSach(Scanner sc) { + BienLai bienLai; + System.out.print("Nhap vao so luong bien lai: "); + int n = sc.nextInt(); + sc.nextLine(); + System.out.println("Nhap vao danh sach bien lai:"); + for (int i = 0; i < n; i++) { + System.out.println("Bien lai thu " + (i + 1) + " la:"); + bienLai = new BienLai(); + bienLai.nhapThongTin(sc); + + themBienLai(bienLai); + } + } + + // Ham hien thi danh sach + public void hienThiDanhSach() { + for (int i = 0; i < ds.size(); i++) { + System.out.println("Bien lai thu " + (i + 1) + " la:"); + ds.get(i).hienThiThongTin(); + System.out.println(); + } + } +} diff --git a/Bai10/Bai10/src/UseClass/Using.java b/Bai10/Bai10/src/UseClass/Using.java new file mode 100644 index 0000000..943dd83 --- /dev/null +++ b/Bai10/Bai10/src/UseClass/Using.java @@ -0,0 +1,21 @@ +package UseClass; + +import java.util.Scanner; + +import BuildClass.QuanLy; + +public class Using { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QuanLy ql = new QuanLy(); + ql.nhapDanhSach(sc); + + System.out.println("Danh sach bien lai cua cac ho gia dinh la:"); + ql.hienThiDanhSach(); + + sc.close(); + } + +} diff --git a/Bai11/Bai11/.classpath b/Bai11/Bai11/.classpath new file mode 100644 index 0000000..4f2c72b --- /dev/null +++ b/Bai11/Bai11/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Bai11/Bai11/.project b/Bai11/Bai11/.project new file mode 100644 index 0000000..2d865e8 --- /dev/null +++ b/Bai11/Bai11/.project @@ -0,0 +1,28 @@ + + + Bai11 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272495 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs b/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai11/Bai11/bin/BuildClass/VanBan.class b/Bai11/Bai11/bin/BuildClass/VanBan.class new file mode 100644 index 0000000000000000000000000000000000000000..30bc71cde2681a9d8a0f82f2b3c2979cd0819ccd GIT binary patch literal 1515 zcmZ`&+fEx-6kTU79@`9HF5`vXesSkaPl)va7^aCpBIx{XPGO;u>`<%1ST5GSp{qFS7zW~hPp#eo; zsNC`Vdc}A4_h)vTpzH(&G=bD}=O<^zcY?i{&E4m2tu0^#P47`B*b^9DyExryx4dBQ zo+Yu3 zZg~3wBWpdn$YJGrne#gd5X*#)7|W?OJ3;$#vsK@G7D@ZSt(7FwxMJX=_iBx9#y ztjKqRy>=t4C`=zWk--EHY7M7Vq9s~xC12tBE2kr%Z+%^=EC~p?vt23+B+K6}l~#XP zTiM{Y9xCJU3ZH<7L9<LO{u8_@=OMqo&%G{&`C=`Fk&;`ms zNIgK5LFT4Hq;!U|OtTHu zjvryZXvI%(HI+TY&2E@D#CSJM9%9Hce!<{@E>zn%g1mPS7gpSgy*Ybp>Bl5d!-AJF z#CVh|i*nMGb%hegD0-a2GK?k|W$_6et?*sNr&z^xY#@(sP{20No?<#I@ku29yhI0+ zVTmd;vb?Ww^?it>lIJmzuF;|qVqM1+?HD8a4Ms6CF5xC}w0jZ{$TY>i6{vF(`YBRE zh%?Gg7!U^1T*)6Wttj-dh+C1H_?bn?5y;TG&(@D%-Wr}AzI}o(*BPAPE9LdsKgD0q zok&xGoC_T`+3t|Q##P)6E6YYe=apr;mFaZrKJ_Z0x&)Me5vL?MWDEay6~{c5(6j1- zY~rG7Ye$$YTAFNN;}8Sgu=*OY14SHY!qPHt&i)?1=+Xq80G&`!VpOK43f+4|x61sp uRzr<*5y`p6*{()~8PZ>cHw&S^(*3E>RV~!r2kjL7^w0_&TqKo(2mb+;^!P#m literal 0 HcmV?d00001 diff --git a/Bai11/Bai11/bin/UseClass/TestClass.class b/Bai11/Bai11/bin/UseClass/TestClass.class new file mode 100644 index 0000000000000000000000000000000000000000..dabf93c02c916252a75f1310fc0cc167cdf7fa89 GIT binary patch literal 1442 zcma)6TT|0O7(EMxlo}KY2r6pug1rFof}+$bpn{eH7OQxjCB!z6ZaQhgz>`lt=)cj2 zG9xqo0Dq8=j^8HbW^u;p%%;2F?)lC+-+ue^_xB$FM)6)j6GQxY)tt0>wW=?gRWJCb zAi~hG%GbGWb5YdimRC)~V`#l?3Cp|7(40sX7$TF-iWx&Q+ElclmEl;{5@yaXFPrWn zU$#vG&pHOT3*5EjyuKLmN>-JjJKLB!L#SnL35Mf|*V#P=dC#>(F_SDP=w#>&0={S2 zdfwndm~I=o(4(OH0PXx{)icW~j-!{MNrLu-kd~v*h>GtKs>#cl7&>r5N;t{TmpF7w zvLG|`t2m7_B;WDLjXkh=BDVt;g+|hHC0^0ixub1xUt8PMJbzq^;T$d~IM2`(@Fy1g z4yw3_L57x!#3JxIkHG(3^^$2qMG`57s4zD?X*i`zBpba_FhovG_?EpAmbbvg1Q#)+ zF(SndD!9zh`?trz0n?4*DxH2w?ALv+2`R_sQiF~WIb2t917mb0c%@>B6^7x%2sf~* zqm$)2ZmAd#gm_LUP#Sbw#U1H`68K|1O-l4i^2I-Sk3gxBoSj9AENW9_r!h7MkD{~)0e*dV-j1==!`jKVmPs}vd zVn=lpIl`c{w(p2ycrUc+-OTeU7G&nuAoH{=c3#Dz?5q~UcB)kA2zQIrI$ekK23_&0 zL7~v|{mns5)l3RyH~w913Ms;|rhHM9M;mSn#bbHLcMbEACHwj4?i(>8p)df#rpE+m zqJQ)V(5TQ%r!S*#OKJvN1kX{R g*%5ri3%n$qeQ>daS7h4&EWE}WvXS8}?P + + + + + + + + + diff --git a/Bai12/Bai12/.project b/Bai12/Bai12/.project new file mode 100644 index 0000000..86b69a4 --- /dev/null +++ b/Bai12/Bai12/.project @@ -0,0 +1,28 @@ + + + Bai12 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272503 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs b/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai12/Bai12/bin/BuildClass/MaTran.class b/Bai12/Bai12/bin/BuildClass/MaTran.class new file mode 100644 index 0000000000000000000000000000000000000000..1cd50492d14cec58081be51a6223ed56f711b5f4 GIT binary patch literal 2148 zcmaJ>-%}e^7(F+;Nk~|J6Z(Syk=l}kmM8_PhSFLJZ7dL!*h*=YC9Gs=*kqDTN8kBJ z`oxScYHg__GwO>kebX16@jqcuJa=~qAn0Ur_ujkre&;*qeBZwQ`-dL^j9?`QpFrEK znps?(Eb7&2YF5uxbSnr|pmkk;s;7#&wU)}RtQ&b-AW$vcN zC`(J+4vd?YX-{w&Puv$!CrhhF7z&y-gwYrR18eXjAZP6wf(Qf=l8cCj280A!W=zYN zt8J_pm7Km(G zb0`zHO>51`$EY;ml0egZLAPRdEoK*Lv86CBATDJ{Frt@`qpy3B`N$K48ZP4sbJxpd z!&()H#xn^Q|HxqvCEb9OfbX#r`)zr1Sm4TOvHvH+2yJ>CyB?G1V;ZjE9f1bB>T2>SeD;LIu;Xas_iX7sedsgUB9t+A&PS zhxmv&Jk^UeBm24Z<`luHH0wx&8o;^|VfvFVS!=Sk;_*{zFmcLWm{tBz`hT80H*7kk z<`}~*Q%ill-S!H4iH=d(s2NxFGFTTP+R9)UivVCY9Z}qs-tDJ6Q zbQ|xIdS`UFXK))6Sq`@!Y$~Eh>hWyN7Wt6t09UdcY4s}cBvBYxXw*WWsh%+Cv9(TAYJTvHUQyp$?Q2#ryP^ nQ%{OVbt&$7Qp8yhpYf*O5#=lbM?~2}i=gj~t~SfW@In6vWFL}b literal 0 HcmV?d00001 diff --git a/Bai12/Bai12/bin/UseClass/TestClass.class b/Bai12/Bai12/bin/UseClass/TestClass.class new file mode 100644 index 0000000000000000000000000000000000000000..621ccabfd2d874b7aba82f699768382514bdc62b GIT binary patch literal 1484 zcmah}OLNm!7(F+UEyXB_lMtHlR0;(-0o(v>!6ua0Esa|{(At=W_l?lRqOz2+WTsto zI@4u$?WVi3>7rf2!kK}Y{s4Ydr{~HcF_X-6q5JsG_nq%~_2%DK{{Xmz$2x`tCT~Y> z*_Tn2Z@5vMoOEac*{AZE%=N>GN`l=Ur@il>AJJ%G@%Hb0?gJF!ANFgmS zUiAWZwcB2II}N$+yCkoMj`W+dWk$Byh00*K?7qZRrI9hwOXR-3aP&#|t)! zxu%W@fr$j@#-5+AJ2D8|&IqP3t>fT3Vb_0%Vz+JL5Z)6QQl!&;N-xY;g3WGBR#&!* z8Duf5QaCIyWACeyYbp;%O&r5g_0!>hI*P;9Q9Ug`72U4(A07 zg{Vfb!gg+N4GnzA3JwP7gmJ;rae?Ae*YltBr=cbr9T{Y>h)b$AA2B++Qpq(9d?GNn zV;{G|V8e>Nz;arl)s|LFD{Hx+^1WiBpwiNlwETqZs);3Vgwg>^RBNb4_hTGvCmU_x z`v1Er(aj=CCd&AXlnz5tl(t>nlSnbQkIcXgfzjIApe=J~yc#{sfm6dj05HT8UoKajw>)>j zJvF}t<3$2zxGES_IKb8HD{vp>Z3JT&r-a7hJ7@{X->;Efdx^;{%v4|E$mEG0<`#N5 zv&3cLj*{fJCD#(kYb>rEJ+_651xS4K%RvMot zragS2E??4#+N+7#ws2Kl(!7x7)^399m|-#*CTQ}JkMcIgcRtQ1nZ-ONSeGfz@ia>O zldKS}<1p^w2qccf#|d;f>ObNne#R;MLaX0!8o%QVp2NnUWcUjUN%2KI+ga + + + + + + + + + diff --git a/Bai13/Bai13/.project b/Bai13/Bai13/.project new file mode 100644 index 0000000..a5b705b --- /dev/null +++ b/Bai13/Bai13/.project @@ -0,0 +1,28 @@ + + + Bai13 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272515 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs b/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai13/Bai13/bin/BuildClass/OTo.class b/Bai13/Bai13/bin/BuildClass/OTo.class new file mode 100644 index 0000000000000000000000000000000000000000..1780a464dbfd83640747a668cb53b2abdc9dd620 GIT binary patch literal 1313 zcmZuwe^U}s6g^MT1zJTh@VBm&2Ka+Y%L20!(@0Vq7-sx)g&o;~T?Uq>K2}ZQOwIHG z`cO^h?V^!5JM;G4_uf6{-1F}H{pZIo02_F(pif|Ur)5^lnX2AwCXWiX0-r#rYwftO zUl15*+L?+iAhH6%kEYSuwXL%Z7s9y@`X@bE)vdE+-f5WDSz2Il%d|{qTcAG{FADfF zcG(D`A44hv2ogVMTE=0kc4{;V`f1gWFm_3=7WIZHq#bUdYCX1(Cul6+6hVh4gyeu*w26v23rd4pLfXyjHR2mg3l6 z14_5wsK`oF71z|N<;MZ_1`e(nk-|I4cPOxWlj}WxT=Mb}g|-8|D~f8hF5mA%r+ny+atmC?g3F z<|qM9cv2FDBtT;N9Ak-6h#h4q$?mm6=rjYu0gZ{xZZbA+3x V2#rJwt_aWF%`110SZE)P{{p5r1eO2* literal 0 HcmV?d00001 diff --git a/Bai13/Bai13/bin/BuildClass/PTGT.class b/Bai13/Bai13/bin/BuildClass/PTGT.class new file mode 100644 index 0000000000000000000000000000000000000000..732b7ba9aa1d7b3545b93706d61c9087876a880f GIT binary patch literal 1734 zcmaJ>e{&L76g@9OcA?uQ<_9Jem1?y>8rRnJS7L2zz=(-4Ei`I>zrYTx14{;W9s6Iu ziC>}Z7@V;){Q&(?ou0c(AOxqw413?Z@7{afIrqMQ{(bc~fHl+&OexIV4%}9Kv!#1I zd#}1xH4syneWIUgyQRH`{ovq^>1;R%kL}1Ham4Ei8GkBVBt+7*l|5)H)tO?-KsulIZ~oi)2)5ob!9!+ zjQLHsr*L-X6kt}*=O!_gi<5i#{R9-wS%_m=tYr%ZOtId!kU&zb^A_H~w1VX|^dzTPIp7{y@SgJE{#!E`L*XeZ42+>3NPIW$lhWE#_ia9WXvaT zj&5(5c#j|wyR4LbsykVsINQ@+_F16)^=uM(tQaUL%!ibZM_YIwt7QIA60*W;ILPlO zVdDb>*U4L$;v{?vAL53B={e7Qkw9S~m!Blf#77ECBal>j45N)tEPRU36b#8!7BE!0 zY=X+njN;f8awQv|TeyWU6q0hh*aW!v zKT6O~5>))ZpkE~Dz7B-c>4xLeq!N`*(5*RlTp7NEyaLyRKlV1I}IPx1>Mh+!6Uw5;e5=CQz)Bv|CXB>0VG zC2d*~6jqLqDrAnZRLCE3YdL;|%qVL*JUP#-3!LFa#;2I^9G0;ZR#_uBW*SrxORggD z(lY%arnF3dc-6E_e|Vh>xHv%boE|~G{U@?>SNq5nR{FR`P_kYdtUo3`*?uUS>x0dk z#5>&lauj(2{#BL+G6Zs-v|J$Qi@1U;R>}T4F5xyV;~t+9AuJWa7+z(Y-c5p3C=R)Q zP9o%T4sra2(&M?UmnaurAl1iq9}oKY=GgIV?X(LKzb6AlR`lS z0dFuq;*5+lj!%rd>1aCI(ec@T;k&=Vy7tLQlNNkPvM=9W-}=^f$zT8e_6LANc%&g9 z&^A`IGs)u_Sttygk50u;$29~6HeQtrav&p})WEs9t5(7l2qX&v;iz{}bnVQ*v3y=G zM(u(d5!ev3Q;u|tc}t+{MK;6H8b``aWQ5NehHb}oM+EA+x~Bz#$FoUGM;)3CY=Ewz zRiOO^4t2DkO__xFrfa-=dIJPD8K_5tKx@=?tjXg1oRyEuxeN(~qS=JZOv}8j_Wohe zP1_8py_Q#50P<>d)7HFVN!YGh3y*pCv?9=HU^{k@x=bc1j30H4WRdQRR4qs8+Ma_D zFr2i^osdpCCKG9aj#|}X3F$aiKB5A98Lw#AyCx&C#e!?i8+a96be}EKgP#{WJ1~{E z9XICYEjb@)M32DENjfqYWY#QX%}g=tq|98}`*Cf{88UVBqF+N_Me4N}1_m%FP@hw< z>%ycL+ewk7jsrNP;UFWeX3G!4z-u@xpgGn}cU(a*)#K{H5d%jtM6K10%9+x-yIeb- ziavZJhDmKTh$JO53)E~#5g#$|rsAi0{4$P)V*;D2#aqVkO3%tS;y87jss?Ym=_2DF z#Yt66gKBl!z*`t+Wy)O6a+ugo*4J~Sd_W3(mKA7bB*~0oLcN_7=&P-Tib(&9pgwI~R|L~>5zRU--t%drv1)5{7OkA6gIlo0)(=5<<+OBko>N=La zgDk7YcCEa0vw77zeuBKIH13~Ans6Nj4KxT<{a0=cxG0i@s=f7fR~~o~74;1RH=#3b zpGhS~g?-DwZG6bmOUuHf2gAx{#|Lw6ikO;f&!4rec?EOVz$Yrb4Jpf=kVPH$@u`Lf zYn$3@CIg?TnbKfgFUkzZQ^UM0azLmVw!WyTp&rW?^9k#et)^U4d3yCLJM3Z->Nw_^ z0yP!+t8o`VBX^wEP)Tay$q59x0zy4YFnX5JGP_Yncnj=+V_>PZKjH(dp9BaZ}(6-%9cI~-(V+9;t2BJUB(l? z({BUup8bS9q3#m)5p)0HAirOqQAd#y-l#iV{}d0nTgK>YXlw~5!u7!`C7cSKDIr?I zIoc@OxBcfM-s|np2#W|mN&%(TR(|&KGq{ZS>=LFYo?_QBX1JW?vSS$+xxB<>Q^lZ{ zNbmLZmN56AUWDtz!S7dYt9a|6l$&Inpf-&}Zbv7!@gHLsc5r0v#A!x)o>68v;az&Y z!Et^EUATuHJj6bHg?>E7emucJe8+b`aE>bFFHt?Jv8vfKBw;ZEmp+wx0isk^4_8-@ znY;3B6w~+sDc-c;Tco)PlF=jBT-D<$vCl$VAa_6j@QB91wO_gzg5wHO_3C6zt3axDLVTq zJSLdTJLGcj8)#fE@WP|?ca>5Hg#xE`7{};xj0qe?A5MC-OfSOz)%5h^b9_O+VYGS# Y10KOmWr9IZ;`?QeTWIwqaRYexA6YOCp8x;= literal 0 HcmV?d00001 diff --git a/Bai13/Bai13/bin/BuildClass/XeMay.class b/Bai13/Bai13/bin/BuildClass/XeMay.class new file mode 100644 index 0000000000000000000000000000000000000000..9f53d78f90ff939ea60792d2fb9f9aee6055aa0f GIT binary patch literal 1090 zcmZuv?M@Rx6g^W4+b*ln0!1v8qKIu#s)An>QK@2@AR%c}HU1jPhOQ~Q&2~%Vu{2r| zO?&_!%6MkFLJ4M)`Mh(^x#!;Be}4P|u!d~|5rOfouG2aww`8YNd~d&%CkCPdV*|H) zwKp|^Si^GF0-hT}THrod1xUl)j$y#w3C5JoK+h!J4NaqZpi(Z221x z4V+f7+K{em`=xwcsYqFvz+@cPaNWQRlhlDN=^hrVC!N4PvXI6s#d}@mGu6j&yyBkk zxIs1WZFy9RA;YKmE;+Nu(#w{~o9)nm^{k03ZWve)n9#r%e_FVSMSLe9W#fyAXGEaXuTFkJg{P*D){xME@ncP!k+3TvTWl)(a%xqM&!AiO}N)1bKj z_`}LH9owxnoqt9uzg8{WN6f%Of$0IOv{+pk+mGQfD-gfn!Wy2caxa?frjmsXJY!?X zcH4Fj1ZG*jOVUEHlKS!7!V8^E;L&p0qHNu=P*(04+PxObY*xLl->|nG)kLOljuoX5 z3v7)cb~3Y7{lQ(7dv+h^I8Uow1=r!iDa_vB}<85GlrNSL(Ftx`4m%MF`b<2VZN~3 z!!6=-S$=m;k|aEkBFr=i*vyz2AWEMRrBTE^O~fjOM0?r|AVcvF$nz6xACiww@uct# hi5}K_*zDouIafcSIsVFE4)X)nWX`O4MKuw;{tGz$&a40c literal 0 HcmV?d00001 diff --git a/Bai13/Bai13/bin/BuildClass/XeTai.class b/Bai13/Bai13/bin/BuildClass/XeTai.class new file mode 100644 index 0000000000000000000000000000000000000000..4277a1bf5ca95916656984b628815b3350afa687 GIT binary patch literal 1093 zcmZuv>rN9<7@SiI+b%260!1v8q6lqKs)9F)H>miB5Rz`H#$QX>&|{X}X1gW&SQ;&f zCO&`#0AC&b`R_~ zwm>2Z1OJ%k0-`D~vL$^PJr@`%6zc-?%WD0v9ol~dWiKJJq zH5}h}!%DHPRAeknVk(L2xM5(HMe2*5;~$r6pWBgpVj+t;iVr%Gz;q8s2IYfL`cW+k zUFW2dK#oVreRAecoglC4&qt2j%$vyLrh!F)Ne%q(OAEKKBrx1kV1($)?6F7OJk~0g zQ82I~kh)TYg(6AQH$sFjXk_3K(P%h_xHk_aBSc zoThYryD87TRFTgat00^kv4N+m<4Yz3Rk5&zXUvAv zYPtTAz#KbxMOq)MqF%hP@KRS31$3RxC}+1V>?i{bZJ@_ao3)@5Hr!pQa%Ad!tSOCH zWIBczW>%{r!daYi29W5IwiFEL|2T6c7Y;QN*^Ct^$5hM5U-PR>ZWD5P#h+H}sPIsNG$H&*D?a zk2aCS2k@bcb6dVl`E&2iotZOd&dmP#`|CG=RlLy$cUh?;ajy@y}B+$<=QkI_Bj@+7PR(Z`41YY)S z?(FiWRQB0pJgm!rVZ7X1xk#ukmmb4p=4<(qK_zTT@1U67)iBC1+HpjobgYWaJx?@~ zNMl07_Ucr%jD zepju}<(=xgs*V{X)p5swi8%(ttMkSd_v#gH*Hs%`ysKoX4V7`vz)?w9eETqEHR`za#7P) zvJF^x$dG6#K&o&?vor1sv6V2(23D}jFyM*fP|cSHm&x{yMs@VWz*B{)5rGduS|{)`dZ@_)*gqZ>3ts z;fny*6%r%rCZZJKw_H6Wkxmwy;R{qwV}s3yZx2><{9 literal 0 HcmV?d00001 diff --git a/Bai13/Bai13/src/BuildClass/OTo.java b/Bai13/Bai13/src/BuildClass/OTo.java new file mode 100644 index 0000000..cd597e3 --- /dev/null +++ b/Bai13/Bai13/src/BuildClass/OTo.java @@ -0,0 +1,34 @@ +package BuildClass; + +import java.util.Scanner; + +public class OTo extends PTGT { + // Thuoc tinh + private int soCho; + private String kieuDongCo; + + // Phuong thuc + public OTo() { + + } + + public OTo(int soCho, String kieuDongCo) { + this.soCho=soCho; + this.kieuDongCo=kieuDongCo; + } + + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap so cho: "); + soCho=sc.nextInt(); + System.out.print("\tNhap kieu dong co: "); + kieuDongCo=sc.nextLine(); + } + + // Ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tSo cho: "+soCho); + System.out.println("\tKieu dong co: "+kieuDongCo); + } +} diff --git a/Bai13/Bai13/src/BuildClass/PTGT.java b/Bai13/Bai13/src/BuildClass/PTGT.java new file mode 100644 index 0000000..a99393d --- /dev/null +++ b/Bai13/Bai13/src/BuildClass/PTGT.java @@ -0,0 +1,50 @@ +package BuildClass; + +import java.util.Scanner; + +public class PTGT { + // Thuoc tinh + protected String hangSX; + protected int namSX; + protected double gia; + protected String mau; + + // Phuong thuc + // Ham khoi tao khong doi so + public PTGT() { + + } + + // Ham khoi tao co doi so + public PTGT(String hangSX, int namSX, double gia, String mau) { + this.hangSX=hangSX; + this.namSX=namSX; + this.gia=gia; + this.mau=mau; + } + + // Ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap vao hang san xuat: "); + hangSX=sc.nextLine(); + System.out.print("\tNhap vao nam san xuat: "); + namSX=sc.nextInt(); sc.nextLine(); + System.out.print("\tNhap vao gia: "); + gia=sc.nextDouble(); sc.nextLine(); + System.out.print("\tNhap vao mau sac: "); + mau=sc.nextLine(); + } + + // Ham hien thi thong tin + public void hienThiThongTin() { + System.out.println("\tHang san xuat: "+hangSX); + System.out.println("\tNam san xuat: "+namSX); + System.out.println("\tGia: "+gia); + System.out.println("\tMau: "+mau); + } + + // Ham lay mau xe + public String getMau() { + return mau; + } +} diff --git a/Bai13/Bai13/src/BuildClass/QLPTGT.java b/Bai13/Bai13/src/BuildClass/QLPTGT.java new file mode 100644 index 0000000..6c23621 --- /dev/null +++ b/Bai13/Bai13/src/BuildClass/QLPTGT.java @@ -0,0 +1,70 @@ +package BuildClass; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QLPTGT { + // Thuoc tinh + private ArrayList ds; + + // Phuong thuc + // Ham khoi tao + public QLPTGT() { + ds=new ArrayList(10); + } + + // Ham them 1 pt vao ds + public void themPTGT(PTGT pt) { + ds.add(pt); + } + + // Ham nhap vao danh sach + public void nhapDanhSach(Scanner sc) { + PTGT pt; + int chon; + System.out.print("Nhap vao so luong phuong tien: "); + int n=sc.nextInt(); sc.nextLine(); + + System.out.println("Nhap vao danh sach:"); + for(int i=0;i + + + + + + + + + diff --git a/Bai14/Bai14/.project b/Bai14/Bai14/.project new file mode 100644 index 0000000..779a42b --- /dev/null +++ b/Bai14/Bai14/.project @@ -0,0 +1,28 @@ + + + Bai14 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272524 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs b/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai14/Bai14/bin/BuildClass/DaGiac.class b/Bai14/Bai14/bin/BuildClass/DaGiac.class new file mode 100644 index 0000000000000000000000000000000000000000..a310e24034e1ff688ecab88561519c9aa68ee549 GIT binary patch literal 1601 zcmZ{k-*VGN6vn@m9m{r<#Bo9>u}uYq;F#Ek0R5Agq~H{4FiEIAndxwYB5NXnBV}xv zDfc`;U!hmr^rjtfX4+04pm+2|`T{NOw~~lql3sYVyVCj2?|ggKf4u$WcL3MXR-p(? z-yS&KPQ7dN`_&EOu49-g;sTi`#xtYZHQc@G*6tI_^aT=quWq=ufM^J$o;s%8wg;Xm zpgiJ6qUN}cza|hXF761#>t4r7BZdhLDWp>nn9?wYgq%%lP?6+L({ZiM!Tzq*Ya6>= zOCa0yOryJF^c=a4HsikS^aW;`$52<9sMwJCG}kr`+P3HJwH;SruGkC;82C=N+A0cF%GBmfy3C{naFN5^ge){>pQ<8CFpP?iHbnsh^6D{9mCPhfk7rS0H`yK1pk=Jf$S(!T zC)NMI3NrGxhB`I`lD-$>3d|OdCnc5AXE)BAaPsU~M_{7m8|Kpo?31wBrfkP@+qUzr zZIZap@QujI$VR1}-7;4Y0<@HI90|MxcvVv#QzN8W$WBBV#_68fHmuD!(4JLo2% zb0PF5p(Spv!V&`d>I)%qA@iRj<~ceATp;sB9@GM^@wvw9K5}(E;!N{TS<;CS-GnG| zxs4@`vNN8uFlliiR+DB<$#j`~<#BCf*I&6G`9bJcn0tu@m04|to|Wm^mG?Xkal2HDED#SPezM-yy)_=;bH4Fd% literal 0 HcmV?d00001 diff --git a/Bai14/Bai14/bin/BuildClass/TamGiac.class b/Bai14/Bai14/bin/BuildClass/TamGiac.class new file mode 100644 index 0000000000000000000000000000000000000000..7237bacafcbb6f7e8be1eca35524265509339600 GIT binary patch literal 1429 zcmZuwU2hXd6g{(Rd*jW<HIeA$ZB_9YX08*k%yU3(pg zcclIWUXdd4f>eQuK@{}|@N@cJ+B3VWB#5juGk5OXIp^Fvci+By{WpM1s2k7(Ca(|N zcC*};{eH17cUN86Fc1@%IO4BJYz7238a3Nd$QP;o$cbf^jj7_#RaC^|E=e9$yRa|GITk(#&-PrYJm9@ z9g<^Sy7eO3mo1lD0bnX3ZP)8qN(@^_vy-k*#jxEL%bk zIw4MrP0iWheia%mU?Tq#Bl*M&nEAvT^954R=+rRDc@idc>`wCZHVtMk~5Z6Q5 lL)gsb}`v=+|QtAFC!%gTzl9}_Jv(GvE?DOT%hrj&}pdYst_yoe| zY<(oJ*>-PAw;lIMK|rA4vUW}D&1+`1_sq;?J?#kiGPXc-+&w5cM!xr?Woh$q!**f< z)k!03YEH@01v)qL8H^8?jC{t+r4_~uEgc(TS>Vd|5m!i;XEw3$3>3df6SEkC7MhJ5#o z0Vij$r>6Ku5@cacPA{a!1hz#ttG#_nme8uA4ZB#pmdTKvXr=Wvyv5otkUA$T(`>>3 z)0jDJb~Gu_;sv|hCexZ}>Q+ql^#q<&uy5T=lJmBs7gX#=l(~x~j>nsfQS3cy8K#qT zEL|(ag6I%von(s0HLV!2i;;Y(Xl5ghR)}Odf`Lc~UFcEJy-f3Z02RGBAW$_cF&}A= zDGW2q5<}=izk)*oTURILb)e!fjtD5GKIcqG2#$F|!BeDlRbmw+mmb{;VnCoaam zhKw9jF^&m=pi`{)bE46WX=9SlXH~={ZHh}<-c&G232q#J2np26ujf=ek39ma6hkV< z38f5E9;8&9gItR%j+7$FyAZ?+0=tGaGa{WMwq``EqR|r>*XAphytX^UWw@YX2OgvN z>@;V)W+#`mB_K?G*po2Gc+%0*R}xHL*_fbX6cXB8YD~&Jts(=ikw2@uDp<#N<$_@2 z31n5|K(H;2Vdh3tZo#7x;EIa8)Iq>Du5-QXV5%r$mUJ49ZfQ=@k_+I`>2AP;XOGpu zf}?(PO%scTNfJVG2u#;|Ae+PuVkUBw%cS|z91lWw@bpv{qt zQQEj4@`fUEK{LowOZ4Ifb$HA9o{F1zpFB&y)h(PbXG_alC>P{Iso#$TwtLFso~?C} zTf`yAuTNF%#-1QP7uXwG*@JX3k}-5M;uz^%Bwuu=?^I+h@TCe3A(`fD72n8CtJ3+R z&4~pxD@*DcHz}VbU(E}IlEsph)=wMqo~&E>8|aZ_vk=aZ{}=R?S1W%NzWEU38*hEc zdTVGIMSxF0xMKlo$0F*c8$t_c_yvtWyZ+7mu5*!U>B*}b^=P3@twdoPw)0I$#d?Ut z%;KXh)bRj~on`Dizls!cPa2uO$wg_YczP&|!Q+S!M@S+oc%qegtB9ArkG_(OC5~XN3!$l>3R8IKF=b2U{bkJjfkYXvjt7SBA-Z20+g6OXf8xm3S;lYr zMVmC0ary4jUzMlA0BPR2Bk(J(3J`8`e>V|t-GRd2*QEWrz@4RkR+;NyIY1|6(#0Wn zlb0SG;qxe)x`;!(j{14k^l^`mx{P(OXu$RutLOQfc#92frLSbi&!}45Aa{P3ryZ#J z7fpV#+qcB{0O|5m+7<{>-d(^4@kI#g;bT`1pGYBmRuRG% z)W=t=BHiV#$^h46kOO&|0zb~|C-`?hj3`Fjs%13<$G7;7zco}wWzLN}{hkp%mhl5m He7N-=2~ry+ literal 0 HcmV?d00001 diff --git a/Bai14/Bai14/src/BuildClass/DaGiac.java b/Bai14/Bai14/src/BuildClass/DaGiac.java new file mode 100644 index 0000000..3885978 --- /dev/null +++ b/Bai14/Bai14/src/BuildClass/DaGiac.java @@ -0,0 +1,50 @@ +package BuildClass; + +import java.util.Scanner; + +public class DaGiac { + // Thuoc tinh + protected int soCanh; + protected int[] kichThuoc; + + // Phuong thuc + // Ham khoi tao khong doi so + public DaGiac() { + soCanh=0; + kichThuoc=new int[soCanh]; + } + + // Ham khoi tao co doi so + public DaGiac(int soCanh) { + this.soCanh=soCanh; + kichThuoc=new int[soCanh]; + } + + // Ham nhap thong tin + public void nhapThongTin(Scanner sc) { + System.out.print("Nhap vao so canh: "); + soCanh=sc.nextInt(); + System.out.println("Nhap vao do dai cua cac canh:"); + for(int i=0;ic) && (a+c>b) && (b+c>a)) { + return true; + } + + return false; + } + + // Hien thi + public void display() { + System.out.println(kichThuoc[0]+", "+kichThuoc[1]+", "+kichThuoc[2]); + } +} diff --git a/Bai14/Bai14/src/UseClass/TestClass.java b/Bai14/Bai14/src/UseClass/TestClass.java new file mode 100644 index 0000000..e590615 --- /dev/null +++ b/Bai14/Bai14/src/UseClass/TestClass.java @@ -0,0 +1,69 @@ +package UseClass; + +import java.util.ArrayList; +import java.util.Scanner; + +import BuildClass.TamGiac; + +public class TestClass { + // Thuoc tinh + private ArrayList ds; + + // Phuong thuc + public TestClass() { + ds=new ArrayList(10); + } + + // Them tg + public void themTG(TamGiac tg) { + ds.add(tg); + } + + // Nhap danh sach + public void nhapDS(Scanner sc) { + TamGiac tg; + System.out.print("Nhap vao so luong tam giac: "); + int n=sc.nextInt(); + for(int i=0;i + + + + + + + + + diff --git a/Bai15/Bai15/.project b/Bai15/Bai15/.project new file mode 100644 index 0000000..539edf9 --- /dev/null +++ b/Bai15/Bai15/.project @@ -0,0 +1,28 @@ + + + Bai15 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272534 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs b/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai15/Bai15/bin/BuildClass/Diem.class b/Bai15/Bai15/bin/BuildClass/Diem.class new file mode 100644 index 0000000000000000000000000000000000000000..4d312504b9f44c2dd2b9464ea0c96a6777ac49e9 GIT binary patch literal 1406 zcmaJ=YflqV5IwiF-L@-rU1+!1ZjJmZqtRkC z@dx;$jAypBMW|-8cjwN%bLPyM*`L3@{Q$6vry4v8;f;n>E~Lvwy`IciW<`TnVQAlY zXC%vpT}-~*+c)!$f_l$4!}mzRzh>E%v#!t=jqNIU)763*LLYP;0R)3k7}Vi|U#uY= z8vM+YwQTc6qq1k#c8tBUsSwFl^G12ss9CaaJH1ZHsw)g&}B{U8X zO}n5lMdoKNw~hz(i%265?%S88%{|_2Ak5Vw>8Qx z{bM&h1r`|Et~P3UbIXz;2}<*pC6rxalQ_8^J{&IB;%M<3;0XthYlyo|-ctOA=3_ z$6Ux+mvOiaNdT95D~)g$rsJ4sr%AFhIrGIoW8eb~4}`DZbxxk(=<9Gihsk#EI>AI9 ze_Z%=s|^tam}cS`7h&Ap`#Y5UZAuE~dlCtsCNkHP$c5fSPRQOOvcPnU{~#iYa9T0d z>1B?JiXw?mnEsCWT;$3z7Db&V;*sShR%nOCzCpW*n@!w3U3mg={y5$KCOX=!<3U@y vH|({jlo03y-(tr&kPLK%#nmzn@?Y`rv??nnYWkCcfY{-BRWjGyWY`C$QEHlOd8AhjGxNu)svvuo0dGXq>E2w>i`NJ#uwZOmFW4ywrst|u1w1fT=1wHRJ6pU);*tei# z#zq2`!t7zt_FoMyntu1lYlc3XA9h+^*zmf6yhlN!e;V`@oU5H8GB$gZzZxGA{5#+_ z5}=}u7~r&SKYQEC?MV#P$36Z|o}jU4Vp*)O;O z=WjT-M#+8I(8ytuR*_vvgW6I2DSw4r7K+$3v7wNhF8-z0KebW9LoT!TuFGFwl5=eb_e?lb()i9crW8VJ4|Vc5si&3R{2da$H4=7Iv*2jv@u5W6Pl0Y zOHi>M5&RF01GlqlW_YiioM%i|OeS`6{tfF>(DCZB1YIFSj*VBbMHGSE8LhQGf!&+H VmL{;d2zCo8)(O1AHfuGMe*=$WpIZO` literal 0 HcmV?d00001 diff --git a/Bai15/Bai15/bin/UseClass/TestClass.class b/Bai15/Bai15/bin/UseClass/TestClass.class new file mode 100644 index 0000000000000000000000000000000000000000..5b8b3e00e04da149fdacf89ae3a0cc139c7af67e GIT binary patch literal 1312 zcmah|Yi|-k6g@+MrRz#5k5<%}mHL3T6rWY0)>^RDN*@YE(N9y@!Zz&Ez|yooOFuv& ziSe`l#y?=Zv)cy^B$BXmXYOOpJ@?G-zdwEgc!JLoTnxe8ww7)1b~{zn+Lmoea5DrB z_z_PvxLHeW?;U6ri^033o4U2kFcwdg7~I)rRg*D>aRnZD87A_&scm(PJ*`#bdku|> z=bIJYDDjpq_NRw#tFE^h!ujEwGgQ^!y2&sV|C+x*P_SCMS<56!5+)g@ZHJ{DTdAB@ z(GA{MYqkt-`4A#(3o|n^0*DAuQw)*#=sMR3?`lVHRGsE?x@O3j#&wZ)gTWKe>=h&lEhz3v%q+lnZ`yiD8CCp^Snh zyrfWmc&M3GhUBPG4CS68&4?1O6s+JigU@O@ZIEo@Bd^Qijf5OS$kxVXN))UKB}j*Y zrH1LlTZWr74O6xBN_`{^F>EM!f6hRzNW$c;8p$>^LYEA#>OS%6^fD|=k~O0)CWnSk z=d1M3QUR+bp2UD$PW42&a-rF2RkSr-JSqSAGhGm^;x=eFwj^C-(L1ECMEex2j8@NV z558|?xFFM4xB(xo&{uH+XuV3iariMoCnEU|#d&Ex=_61M27838kLj}C-$Qg$SYh0p zAbZQPZ-t@KF756kR-R8r-96k%d%oj-AIWks)x*QNsHclZT`YEy?qa!%)idw + + + + + + + + + diff --git a/Bai16/Bai16/.project b/Bai16/Bai16/.project new file mode 100644 index 0000000..821fc3f --- /dev/null +++ b/Bai16/Bai16/.project @@ -0,0 +1,28 @@ + + + Bai16 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272546 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs b/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai16/Bai16/bin/BuildClass/Diem.class b/Bai16/Bai16/bin/BuildClass/Diem.class new file mode 100644 index 0000000000000000000000000000000000000000..65dc1184993cdc3b619bbd98b71ca3c1789ab25c GIT binary patch literal 1406 zcmaJ=YflqV5Iwi_%|fBPR1gtV`T*(!pG8z!P-A^05Mn=>rQNg(?H1dukzZvrT8t+C z0DqM6%yuocRI}N;bLZYUbLPzK&tKnu09eJ-06Yqjjiy;CW-5B4k;Yh>G(f2BbLNr$^=#^c)Zpz+udhN2=P#Dei&`K-#V%e;du4LG+o!q43 zZ8#fmtaFraJNX$bn})ShHl?f(W-%AQg}-XsK5E!TRl`Nh6R*}}nG-pubhDOvRW~hr z+pZgWH66eug{c!!=r*mAL(!-QafPzP!dO5|1c(zQ)`oEuY+p{tcjZP>!xEM$p?-L1 zSVe^yGCy_MMNS8iQt+hbB=VX>URPM|hy5RfRg#Mfz%328aYrF&*V>d6#$%^*r^C31 zwE(F2SRXAk+?NUihaykKVkNd|m7iq<>{Qd@*)Sd<6Tk*X;zYjZx?R?g#iq3CZJn}9 z|JY4Wkp+ggYt4GW*fM2ELejhy31yeqBu=h}4~NUKI9mJ$dBVZt8s=`3w-mpT#4!dF z!(T8YOXQ;yFv>LwFV{h?8iR%~%qL2Z)(*oM#<>&72^TU?NFRM|$VGvS_kkQC9Cw#XJ3oM0$zL_9ZgipGcSNZ6fnbx9|@lq6nuI zGo4=Msi+j6{Dkx0v5=2mKE|S`(?TM;(!y2R5wUO3ZsBGNcY7;eL;|rc%E^v)>v-U5 w_lCU|m68ITn4l5VjyRQ%WUIG$>@nApN z71#FeDmSeMr|mPueY?kyszoFgcX~$*u~wIXT{6hW+~fWUy)Bj+3{thuX4K`RF>-1aqZfhwOW{=Zsrf1$$hak+t`vUi*4}cMx9aj~a*|PQ`=deI zIp@N{;sm`f#)Sg;jni~v^pXAGMCNIi=!Pah>jFhr)DojTSAK_D{)E=lw09V9SSrWg zV7>&x9Ia^*f`k%DQzXqo#WH2ou^cN{rAVOHLUfZ#3k!OH-WAC88Ay$gI>`(%{Q#LC z%R(dpf)0dBUHkyTGOS}GEOQWa1SlD7mS15$b)V^F48pWbZvZo5RGAvhPYH)1!N{O6 RCd}rnMmWZlvlUd^{sV&RZHNE> literal 0 HcmV?d00001 diff --git a/Bai16/Bai16/bin/UseClass/Test.class b/Bai16/Bai16/bin/UseClass/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..1d77946b94b88e65a88f06278eeb72d1c37897df GIT binary patch literal 1197 zcmZuwYf}y>?UR=n`z;tAR4AG9buJqmR)CAocdYy0cK*R zA5j0P={<`i2F$SM^4^~JdEWEu&ySw~R#A}PVHp3=&~gTEG%`i4;Yjc@1W)-n&luc1 z$s8P=Y88iJbX_-fXMQ8F@k^sA4VA_^17+*H|s~5UF1iG#t_O|6>gNc zt&8);rPrzH4dH#IXqFPzxo$GVQlIjd#S4zDnDD zjvrxywK6v+BZ#QL6Jv;`hUb~4;#*DKsCHXcb*(E@6< zM~abdsvzj0LdriP!?8=AfUl+pxe|${g3g4h4LSBo@W z+&-bX3lEtt22b^vA>Qp{aJ*)wj@w{~K*QG?Q@6fFEPDSGo?gj?*cCYnZqQ{!M;9 zy5k)L%b`#kk$eYJ<%tO5ZCu|A${QUd%1bkCB-gy(G1o!599nE+c`@#7VWou!Ej(^v zt%Z%AHP^Gg>bG73OSq`V2;?|o1SL-MHIERf6~<>oT)?YcP}spPfs^qOZ}65N$LO2K a9<>-J+dl0_DE2uHa0oBi-;uWm@Bacd3Jo9t literal 0 HcmV?d00001 diff --git a/Bai16/Bai16/src/BuildClass/Diem.java b/Bai16/Bai16/src/BuildClass/Diem.java new file mode 100644 index 0000000..c224a65 --- /dev/null +++ b/Bai16/Bai16/src/BuildClass/Diem.java @@ -0,0 +1,46 @@ +package BuildClass; + +import java.lang.Math; + +public class Diem { + // Thuoc tinh + private double x; + private double y; + + // Phuong thuc + public Diem() { + this.x = 0; + this.y = 0; + } + + public Diem(double x, double y) { + this.x = x; + this.y = y; + } + + public double getX() { + return x; + } + + public void setX(double x) { + this.x = x; + } + + public double getY() { + return y; + } + + public void setY(double y) { + this.y = y; + } + + // Hien thi thong tin cua diem + public void hienThiDiem() { + System.out.println("(" + x + "; " + y + ")"); + } + + // Tinh khoang cach giua 2 diem + public double tinhKC(Diem d2) { + return Math.sqrt((x - d2.x) * (x - d2.x) + (y - d2.y) * (y - d2.y)); + } +} diff --git a/Bai16/Bai16/src/BuildClass/HinhTron.java b/Bai16/Bai16/src/BuildClass/HinhTron.java new file mode 100644 index 0000000..9ce4ee9 --- /dev/null +++ b/Bai16/Bai16/src/BuildClass/HinhTron.java @@ -0,0 +1,28 @@ +package BuildClass; + +public class HinhTron { + // Thuoc tinh + private Diem tam; + private int bk; + + // Phuong thuc + public HinhTron() { + tam = new Diem(0, 0); + bk = 0; + } + + public HinhTron(Diem tam, int bk) { + this.tam = tam; + this.bk = bk; + } + + // Tinh Chu vi + public double tinhCV() { + return 2 * Math.PI * bk; + } + + // Tinh Dien tich + public double tinhDT() { + return Math.PI * bk * bk; + } +} diff --git a/Bai16/Bai16/src/UseClass/Test.java b/Bai16/Bai16/src/UseClass/Test.java new file mode 100644 index 0000000..fa722f7 --- /dev/null +++ b/Bai16/Bai16/src/UseClass/Test.java @@ -0,0 +1,22 @@ +package UseClass; + +import java.text.DecimalFormat; + +import BuildClass.Diem; +import BuildClass.HinhTron; + +public class Test { + + public static void main(String[] args) { + DecimalFormat df=new DecimalFormat(".##"); + + Diem I=new Diem(1, 2); + int r=10; + + HinhTron O=new HinhTron(I, r); + + System.out.println("Chu vi hinh tron la: "+df.format(O.tinhCV())); + System.out.println("Dien tich hinh tron la: "+df.format(O.tinhDT())); + } + +} diff --git a/Bai2/Bai2/.classpath b/Bai2/Bai2/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai2/Bai2/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai2/Bai2/.project b/Bai2/Bai2/.project new file mode 100644 index 0000000..08f6d3c --- /dev/null +++ b/Bai2/Bai2/.project @@ -0,0 +1,28 @@ + + + Bai2 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272553 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs b/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai2/Bai2/bin/Class/CanBo.class b/Bai2/Bai2/bin/Class/CanBo.class new file mode 100644 index 0000000000000000000000000000000000000000..80152b82315858554687ac3a985c8639300b0d33 GIT binary patch literal 1619 zcmbVL+j0{}5IrNy)@oU7W6MGo7q1ByX>C{s%*`?vTLcW)hD3_1^0=0!v_r|eE@_p* zZ~2Kl^9w*>QI%BX1M*Q6-LtYJBAy~u?M%<~oIZWJ``<5r{R3bXzow87I8|qW?|08_dO^c|wf{!eB7t!~tja)OW_xf~iCQXXlmv{R;T=^};M2CDLRHn< ziMsO2z7m*NSAmKi3XBzsdjiRFSeGWoFloWWDS@eN70BJr!MrS$(!ihF4Y%vl)61ntpYRwi%v}=@79BG&k6?)27GN}6MMC}wFP>ufEj+-6Ttjm^xM*`{e zR$s1lY;e0Rn^;HL!V~;Njp-d8%AhWA{d)q9q}zioF~l9nCT}2357WSCQ)2T!M(=fNW^feX0UWAi7mVXuvkSeUue#WiQC3!;)?`_{nD zvVD7C=h(hGu!l%rr7$2O28EfXKshYX@Y+<}MXcZw?$NwH#$}yAHV)oTU<3EDM$`mK zeZ}8t%7CPhe`Ec(nTMb8*!hG^7n@x??c({##dds=9l6+zFLEOnuj7k+|6-thR%=@z xt&6w`hx&2}bu156SN5y>3wgxVbv1cz4hNB#RCQ&0-{w+7m|-f| zk8Q}GfZv?DZFjU$rl<7;i}uR;+Vjc4h>O;#Ga7W ze*fsu>el(8V<{N7$(;u83bhV4!=5dA494DBE>z${{(RZX+9@;?)uf`DVt99Hl?sg* z80K|EFv$?HUC)vXQQ79lH6d*Z+rkxfKb&j{UbO{-E^Xea+vEcMU`PjS`krt~wI-L+ z>Xt`@mvmgg)fkqsq9I4Bjrnri^Q^fj04apBy3^Hx-CvbQszC@X^x{Bo-izo$>5J?r7xV8)s144<}_9r zb-95p<##cT4Q%V!!E^e_I~_~57}hT8>m17fx2zy4I;wtSo;$h|O2=0^c9mS3FPB4Z z#%pfB+q8Ctx&hNCS8ZJ}#tO~K1l>pKT@4IHVT$SY&^tz}2lQq1jhI8kzfcf@PVYE< zfhkI!rU$g=Ct(H&S}6d7-U`4AU=6dlx|RtKF>7Wb-!b}o$~RveJVzP z2SQ8Jj;di`fg)Aiz#>J8ynzfwVLwt$L@1MnG+@x6Y?Yrji$h%difr=c0JqKJ0IO$s zBz=ShI=x67GMFa})mwUW`jkr=_XAnT{Gi5xFB_00nI2JzpV)Yxd^$wg{D!#!o(=F~ afS3RGoTXFCSVC@0!|bVsuc>wjZ~g*-*cQD2 literal 0 HcmV?d00001 diff --git a/Bai2/Bai2/bin/Class/KySu.class b/Bai2/Bai2/bin/Class/KySu.class new file mode 100644 index 0000000000000000000000000000000000000000..e32d650a141f2127ab886930825583c93bf4062f GIT binary patch literal 1345 zcmb_bZBG+H5Pr6_Tzi~w6ev`s6kppbP~TCCs4b!fLP**)@q-_h_R?E(>^1Gx$j{Pf zn`q(>@JAVEuO}4YBe`U6W_R|PXP%k;{pZIo0FUraLxe%ExV+mf?jBcr8lnsnL%+gh z*&|Q3xOBF;SL5U*_dfDZyy$Y-DpviDkgXEK_@IufcoWA*KB@NisLpN zCH5(2Ht2A+$-S)4y^XAnyU1(EG0X(OXKxy?P@tmP3XC8w5KXaMMNz{V!*l>KT7-dn zxUbZ(Kl^Gh7-n<%^BrY~bQ?rrcrpq=LowwDTh<)$PcGHQCk9P)T*Fg_`4K^aAuacW z+q64zY>--seKpae^{!)6%|JoNI<^eFz)Kox-fr8n$*_7+h3EK&8A=MGY@ia9=zGIA zq7;2?U`Gk31;V-1VZG}0It_bAs27n?&u>lf#xl*$7`;zYKn)OCQL^bJ(V8IdA^jQs zW7Yur7cwF+Xw~TtOi=I@`apX@5GFB2o&qpwRRDenYg&bs)pT@#X)7K3j@eVJ$$-E# zMJMU@On|o)P%%S15L$|MR1OpKWU1^X7RXZMO{B?+29_!!Mv*kMA%i+atN4^v7~uL> zWRkb~xMLOiSUJNZ86eEl?FHhH#vEa&+ET;YCtOl^5XwR$5au`tWCJoJ(_>2U6YKAj l&ju)2-!R+9^FChnvHgF|8M?KEMPx@b%$#WWhH^*n_Akd;9H#&P literal 0 HcmV?d00001 diff --git a/Bai2/Bai2/bin/Class/NhanVien.class b/Bai2/Bai2/bin/Class/NhanVien.class new file mode 100644 index 0000000000000000000000000000000000000000..b73ba0a1197c6407b5cb18a387eef3b637ec7dca GIT binary patch literal 1346 zcmb_bYflqF6g^W~wk->k77A4<#b+NteWMgnsiHS5s8uifTgO z{iQ|9)glm>(-FeBK*(}j)25Vm(>Sh3+oIW&j;wm-ctaXxOA6?=Wwfgn<>rMz(r43i zWvf`J8@6qBN<+enI1iEav#PDVmfDJKiu~Vy-JdsM3@UhO84r_QKFh3%O*QDD$ z*=m@bFgB=hq&%AIIyP193sJ0NOUHA(U_%@2wrMv6Rxir#99JK`q#(9+l)dy^XE+~9 z&DT11lxUhKT8ov9R-9g^Zth4m4U;Fcx2AYwnSC?H0i^<}d1wV`bCS45xO>3A;6Icf zAo_(y06Nzw|G)&DC;5SAo)e}p&7A^>aa91W4;#xDR#sEN0cP^4(09!K!|HGuuC_aT5Ppm z>a8<=(a{;5aYh|ynDLW!G>kIi_}PEq9}%B-v*A+fhuwWI=RD_}=Un!$e}4Z1z)9R! z5D`$bC8JzUPvo*g3ZeqruNgOubjfh$(-&v2nMGe9I#({v3UuUxtBP-z(&s$SSjyRD zKO@kbx91(huXv`wp-0J_&ed#W4QI&B3{s`>wC&jbpg=<+IY|Rqcg|GNfL0C7P!((w zXn%w;6>ZodMdH*+j3y_WA+S?J42=TYa<*fRR~BYXuVBoU=uAB47LC%R;n{K@9!7o3 zE(>U(Pcm*9gKwD&fq!HmvBlryq%_;5p&R??urW7BDiXCgH_?t%dTFkxX!#zczxC#&{Z5kpMq4K*RARr(l{y*Ta<_oMMnd+ zGfxLq9LGroCj@qEq$c!V!&B%NP#p7?KPn-Z*HNkPjD}Mf5NMJ&GC|B&BDsmY5WWeg z1$GDi`<8Uvw;jD`+5DRRfb@P)!x`zM5;$3M6r2;-wNb1!prMLgnlrs7WMv*0yyRZ@ ztqK`9i|1tR9F?o*HJryN3(;6yG#zHNi{O7woXpWLr5JTr9FaY~S<@ z-}PjFgoy~?N5k_>3q1G=*t+qJ@~hu!sNg28$|`%f!fI12Bcr>eVJS$#yy>5J3nnAG zjkgrs+1hkL#cOz5_IsmwqhgfGQu`eZ??UCEv6z>FW!LGEp1rT(9zI}oT1I(1aDpAc zfe^E#899m`u2c>kHSbouqB&yAVbv@rQJ<8;e)8SG5lyz`XyaGmE`laRx#oc6yM-si z!5)bBtU&8oMcedtbp_jhMf-z5zJu?!07;`{D|T?#$uo`m)WR<8=2ytXhKNJ765*NJ z^9$O0t9Wc`14#{T;|ezUm#=Wyxr!@XzQ$!sUEl~2ul5|NqIfSVI-=d* zt(9fi4Uh!R1i|hm`Flv=UeeaZcQ-@bhe3us!c~qTPv9V?aTq>_^&KQ|7d`k0y||AQ zK0_bAz%hJ-etge?xJ><@kO`0nYXq&+_y8teCwXI50jwd9#@b#%LC7OjRVl{5LJ--*7|VPZY*_NzfZry!jOruI}>UJ%O*+{@$RflkR|1x`WeB$2n%<41*sI!qkJ@ o^sR^4hYv{)|25bahA9KtiO3pDI~sU+n`Q5TH7f8i?;`l*Us0IkDgXcg literal 0 HcmV?d00001 diff --git a/Bai2/Bai2/bin/Testing/Test.class b/Bai2/Bai2/bin/Testing/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..ad1fb412cd193890d6f9b4ab52487e74afdfdf57 GIT binary patch literal 974 zcmZuv+fEZv6kVsZv>irn<)$DGDB70Gc)w5tZHL`?|^@#%D&(7~BA*qIXj4!=Ym zAd$om@S}|Dv}iH#a`w6Gv-a9+uV24^`~+|x)htp1=9U*HzS^~Q%pxr?yeAK&9Z252 zZR~k&BGA9)D?eEm=qr}C1=6+Xqi3KGc@r7*3k*5F@;2LH!)tBHM&JpII*}`bZQ1hm z`SdcKH2qj$&^cSPLcCD=N?@Y+!RghmCoR&dl(w@N5g6$_v=cwD>#kJFYvobEcot*- z5w3rY6E8F|fk}as1|9E0`jP!g?Y9%6dNQmS7{+By{))g<@xl~cct*ge1u~B9_fD;9 zU>bS7Tr*)|j@qfF+^o~9L<&?uMf!R$$ zS_d++nvs=w%3`xt;)m8J-wRhQ10^hGQ5Gn41YuieAWSS_Ss=5oQCa4cPiK_>nP#+4FuZe!(PKnj^vcX5$L|Kqm~_G*rl_5T5iIajrc+li*`ZMG kmce5@Vg3LOvx*8y6flD|JY`P{L|MlM2?;!7P72Te0Gln;&Hw-a literal 0 HcmV?d00001 diff --git a/Bai2/Bai2/src/Class/CanBo.java b/Bai2/Bai2/src/Class/CanBo.java new file mode 100644 index 0000000..9bf9f1c --- /dev/null +++ b/Bai2/Bai2/src/Class/CanBo.java @@ -0,0 +1,50 @@ +package Class; + +import java.util.Scanner; + +public class CanBo { + // thuoc tinh + private String hoTen; + private String ngaySinh; + private String gioiTinh; + private String diaChi; + + // phuong thuc + // ham khoi tao khong doi so + public CanBo() { + + } + + // ham khoi tao co doi so + public CanBo(String hoten, String ngaySinh, String gioiTinh, String diaChi) { + this.hoTen = hoten; + this.ngaySinh = ngaySinh; + this.gioiTinh = gioiTinh; + this.diaChi = diaChi; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + System.out.print("\tNhap ngay sinh (dd/MM/yyyy): "); + ngaySinh = sc.nextLine(); + System.out.print("\tNhap gioi tinh: "); + gioiTinh = sc.nextLine(); + System.out.print("\tNhap dia chi: "); + diaChi = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + ngaySinh); + System.out.println("\tGioi tinh: " + gioiTinh); + System.out.println("\tDia chi: " + diaChi); + } + + // ham lay thong tin ho ten + public String getHoTen() { + return this.hoTen; + } +} diff --git a/Bai2/Bai2/src/Class/CongNhan.java b/Bai2/Bai2/src/Class/CongNhan.java new file mode 100644 index 0000000..cf97deb --- /dev/null +++ b/Bai2/Bai2/src/Class/CongNhan.java @@ -0,0 +1,33 @@ +package Class; + +import java.util.Scanner; + +public class CongNhan extends CanBo { + // thuoc tinh + private String bac; + + // phuong thuc + // ham khoi tao khong doi so + public CongNhan() { + + } + + // ham khoi tao co doi so + public CongNhan(String hoten, String ngaySinh, String gioiTinh, String diaChi, String bac) { + super(hoten, ngaySinh, gioiTinh, diaChi); + this.bac = bac; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap bac: "); + bac = sc.nextLine(); + } + + // ham hien thi thong tin + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tBac: " + bac); + } +} diff --git a/Bai2/Bai2/src/Class/KySu.java b/Bai2/Bai2/src/Class/KySu.java new file mode 100644 index 0000000..1831b4a --- /dev/null +++ b/Bai2/Bai2/src/Class/KySu.java @@ -0,0 +1,33 @@ +package Class; + +import java.util.Scanner; + +public class KySu extends CanBo { + // thuoc tinh + private String nganhDaoTao; + + // phuong thuc + // ham khoi tao khong doi so + public KySu() { + + } + + // ham khoi tao co doi so + public KySu(String hoten, String ngaySinh, String gioiTinh, String diaChi, String nganhDaoTao) { + super(hoten, ngaySinh, gioiTinh, diaChi); + this.nganhDaoTao = nganhDaoTao; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap nganh dao tao: "); + nganhDaoTao = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tNganh dao tao: " + nganhDaoTao); + } +} diff --git a/Bai2/Bai2/src/Class/NhanVien.java b/Bai2/Bai2/src/Class/NhanVien.java new file mode 100644 index 0000000..1ea85dc --- /dev/null +++ b/Bai2/Bai2/src/Class/NhanVien.java @@ -0,0 +1,33 @@ +package Class; + +import java.util.Scanner; + +public class NhanVien extends CanBo { + // thuoc tinh + private String congViec; + + // phuong thuc + // ham khoi tao khong doi so + public NhanVien() { + + } + + // ham khoi tao co doi so + public NhanVien(String hoten, String ngaySinh, String gioiTinh, String diaChi, String congViec) { + super(hoten, ngaySinh, gioiTinh, diaChi); + this.congViec = congViec; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap cong viec: "); + congViec = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tCong viec: " + congViec); + } +} diff --git a/Bai2/Bai2/src/Class/QLCB.java b/Bai2/Bai2/src/Class/QLCB.java new file mode 100644 index 0000000..cf3fbb4 --- /dev/null +++ b/Bai2/Bai2/src/Class/QLCB.java @@ -0,0 +1,69 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QLCB { + // thuoc tinh + private ArrayList dscb; + + // phuong thuc + // ham khoi tao + public QLCB() { + dscb = new ArrayList(10); + } + + // ham them can bo + public void themCanBo(CanBo cb) { + dscb.add(cb); + } + + // ham nhap danh sach + public void nhapDanhSach(Scanner sc) { + CanBo cb; + System.out.print("Nhap vao so luong can bo: "); + int n = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap thong tin chi tiet:"); + for (int i = 0; i < n; i++) { + System.out.println("Lan nhap thu " + (i + 1) + ":"); + System.out.print("Chon can bo (1-KySu; 2-NhanVien;3-CongNhan): "); + int chon = sc.nextInt(); + sc.nextLine(); + + cb = new CanBo(); + + switch (chon) { + case 1: + cb = new KySu(); + break; + case 2: + cb = new NhanVien(); + break; + case 3: + cb = new CongNhan(); + break; + + default: + cb = new KySu(); + break; + } + + // sau khi chon loai can bo thi nhap thong tin cho can bo do + cb.nhapThongTin(sc); + + // nhap xong roi thi them can bo vao danh sach + themCanBo(cb); + } + } + + // ham tim kiem theo ten + public void timKiemCanBo(String hoTen) { + for (CanBo cb : dscb) { + if (hoTen.equals(cb.getHoTen())) { + cb.hienThiThongTin(); + } + } + } +} diff --git a/Bai2/Bai2/src/Testing/Test.java b/Bai2/Bai2/src/Testing/Test.java new file mode 100644 index 0000000..2d16a6a --- /dev/null +++ b/Bai2/Bai2/src/Testing/Test.java @@ -0,0 +1,25 @@ +package Testing; + +import java.util.Scanner; + +import Class.QLCB; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QLCB qlcb = new QLCB(); + + qlcb.nhapDanhSach(sc); + + System.out.print("Nhap vao ho ten can tim kiem: "); + String name = sc.nextLine(); + + qlcb.timKiemCanBo(name); + + // huy sc + sc.close(); + } + +} diff --git a/Bai3/Bai3/.classpath b/Bai3/Bai3/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai3/Bai3/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai3/Bai3/.project b/Bai3/Bai3/.project new file mode 100644 index 0000000..93fd09e --- /dev/null +++ b/Bai3/Bai3/.project @@ -0,0 +1,28 @@ + + + Bai3 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272563 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs b/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai3/Bai3/bin/Class/Bao.class b/Bai3/Bai3/bin/Class/Bao.class new file mode 100644 index 0000000000000000000000000000000000000000..7af85b7b4ad3bd6259f5e0dba49d472581b83fb1 GIT binary patch literal 1267 zcma)5YflqF6g^W~wk=D60!36x@!1DZA1F!@v?xN-G$b^QejLiAJ7zoEv|A%TOQUU~ zi9f&}WxTVyLa}@>o6KwHo^$TGcYgi;{u96k4h@7DVtY34c8g{17zi^=`r8_p6)AcQ zrfTxDBa6ESTv-gs$_M_D7j3SZ#bdW4RkOq}zAcq>cNoU9xjI95&p8!wjA6orfhfaN zMJiG4wN6B*#!qaaVVnlH>%1fNJ~#}!mh3W2RL&I<_EvV3arESH^e9)?5|UcNEJODH zU~=^s80JkxFizIA__+_`u29u?WiqJil)1WagdJ*=EZ(kJj%wDVVn_vKJy+Vr;|5ns zbV|OSB@@?iBZg(H7|1Y857~Lvbw$g>E!-w2ot{fV{IsM~JR+-IGFCN(7nNZyn;Z3>A=GV<1pm)409AC#l0wxi`PVO9rl%(LW7NPihJ_(Vyap@xqFBT7vk8&j)`5oq>kk6wos=GYgeT>A~>KZX^66kJugSs@f%!Q`o_e* zcFypev#G}MW2e_?h<&NsIZCf*UF*gQwa*y6E^T<5ui~lQY1|?B(Oj$&7HtCEPAmCPq>y%of@##>5jgY$`=N>`333Zoj&g63w^9! zVo#Df5N3qXCJAqzFmygCKl)rj3XcLSsO$m9k!KZdskK3??k cs*l(IW}2p`Wh^1%@%X-_10IIA#2v!HA2=@p_5c6? literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/bin/Class/QuanLySach.class b/Bai3/Bai3/bin/Class/QuanLySach.class new file mode 100644 index 0000000000000000000000000000000000000000..8ffe30ab73ffe3d220484f62df962b0e767df9fe GIT binary patch literal 2492 zcmZ`)Yf~Fl7=AW{ZdjIExU?wh+7_AsA<}zEZ(M9ko1`sCL#dbc5LU7!+0bNzMXjxu z-{4I92bl4LGdh}%GUMo1|Aim@4=O%qHy2>)hfU6&^Pcy8F7G+}$G^Y)3g9HZQsGn3 zJ)0Nha`bjZ*zwJj$mUe|Ir~s-h-hBetI?aw56!Hjz`s&<@(TLn?o!3E^3my1No>Zg zvJ+F#macW+ir!n+}|}Y|FW*pd}Q}u*7U}#njM(4jpaK zRCFomeMLD9o#>GvLGB67hcj(Z(5Isn2NZP0E!#|13d?3GEtd0y6O0$LBA*c@OTO18 z{Z7s*%eDRd39H@7nS~lohJ^MZ4`(ERAsuhvO+ptdE0iVVao#0aEPPLaPioe+FM$Hx zvgd@IlX|D)GTRXyM=`7*U^!+L_x6X;_@3GxVh#Cpxd zPCF;on?g#>c1f1X3fneIv2Z4USp^fbxuR|4i^4LP(8#k1jnHI7dJr>?N77<_HfP0* z6OkEF3{M%7*1I~c;HrXF7yUl$q;J`)%&uV`H&k3#(9?9JR$NCM2~v=T%-htEl;-7z zn>udcHVv06vSs(%RZFiTr9kuSl2A1)phE>ui(dCo;?{6SPA~BwdebDK;VwEfjN^SB zA7Gk0q+DsLu$s1Pjc4Y*j<=!7kIzEQRqnEQxJDs!YteLvNy_AVr z;_QWVJb+I*E42;a36Xk@5WrKKMHRUwdxj>Yij`8iPDqT@k>R{o$xz-y z{8#zrL%<#LHsee?XXfDN2nde8gg&~B&ZTbcCAxn?@AqzeKYu&jOgbYw(8IR@>GR z9K<2MDblT4#u--eaZVfk5xrwoyuR4Xq`50WUX{IWmH{uamW6xp77XT5WFOS>JzCYnvNKOyMbFt~d+KM1BoJo?#7na_T@C1=!@jL1T(oC&yEKq+NbisgDwk(GpR3 zt5Vn@w%yr4p^w>=CYd8si(*kj72a>`rcBC{njOF*aUBi6T6Q z%29<2uI+y|6&Y|Hxw`m#+H7F_r-o59G2YyTG5Cp#uxI>tEIfxMfo`!)gP%2~?=+?ljs-t=r#l&acOR|q znzTlEW`JviI!}wQBa9pTI>kvcffSNhu^DO+b*Z0uek#>5# W>5O{<26lK>_XJUjFNnp5FaHCa4)t;X literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/bin/Class/Sach.class b/Bai3/Bai3/bin/Class/Sach.class new file mode 100644 index 0000000000000000000000000000000000000000..aa28cbb531f88e8ea98972da6c1cd418aa732196 GIT binary patch literal 1467 zcma)*YflqF6o%h{mTk*&D+Rez1hE&OCNzUHA~SP zLxdP&NFefmI?Yg?K}MQQI#vq

QC6}= z%PeG-DKOj&S+`Xwk;zNbG^$CLDy(A?Q-0jUoQ7F}{uYxz*KDJ#;}+)0QLAnX47s;c zR^o^fU{e|lSx)*8A#eSM6f;cO3Kx{z2nP_uf`+)jpdyvIgd)*)?|oRKJGp2zD{OPEFxxWj>v(_-svuT4UW=Sm)H|c3qWDjj9hjRObE`XHs~| z#jq4W3VS;C!L=(Z6~jCgSiH`QwwpDzlPvLEN7^yNw%o>G?+Jr}-GgOzI)XN?8P?*5j&oFYO7o=UFGa3fbgAl!k9NjJVY*Uw1Fh(mJD}-?xF+~Uy1kRTUIagt&5O*BS z1h+_&(+=#ggA>1mjU$Oo3NETcMLbM+rYC1UR?Y* ia(|38@Y?-x1>`z5OLB7##v0~ZGO>P{i8qAZf!tr^sVipy literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/bin/Class/TaiLieu.class b/Bai3/Bai3/bin/Class/TaiLieu.class new file mode 100644 index 0000000000000000000000000000000000000000..173c07b24f5f076f1496e38e0f4aca3a816ce5c9 GIT binary patch literal 1561 zcmZuw+j1L45IrMHSxKxfab)3ulWamRlI%nw7Xwy8z=jYJ*)d3%T7dYeX;-AZHEfEu1;PkEH)% zo?mUYwJ~nLCMcJ1#lq!NN;Q8Tgl^Y{gRA^!Fr;WpF$XWG?oy?YTDiJg%i<%23%MO; za=O|HwdeR$e#6P*25wonNpB?Z={OrDloc{Pfg<)9UoP+Ev5MOk))dZ15GRS-xPz)f z*0^s%(OaQVDo?AF#m5TEF+JAQp(4(kp$?sWZ8n@N?vK5LK<=C#OYL-6Yx%({9@<#P zCkmG2sS8yWojs5mwE3|(-$`05-+ae&O{?P_3vb~Oi}U{`+Z=lSf!oi5eKeQbKCN60 zUq~;N^Qd9d#umO}*Xdr*H3tf}&(dn@=LvpIAfDRzCK4+Q;trSE)NOn#C9t9r_$G^n z6tZ=ONIT+ao}o_-yTa}}g_Tl$TK!`V?8HMi+@8!_z8MVrZTG1s!(k_*ct<3{Rd(_W z2YLo6X>3|4Y3pcbQ*+Po1?P;b&C`AEN^UD}G5dS;Y@TbLVZbcXn8yMwJAQ=oSma3n zE^rk9pD)wg3j$DCJ)*I8gkt5=5tb)-MWzK~(~QfZfH^GDDn{6qI6lE9Qbb%x6(Z`w zq#zT?PbqwW50lKlGPC&B|G>)PwGpmYR!69ifSm76&P6%jOU@5SOP>8W;dYJKAa0h( z3s}K22in19PS_RPrS*`aiU!3v+nDD%KE-F`qOdWR^B4X_m^Ya7Z`58bK7NZQl|NA! z;mZ-e9^u)s<9X~TPC2$?$MOg-;)n@T(GTpsi@1quUh{B#&SFY literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/bin/Class/TapChi.class b/Bai3/Bai3/bin/Class/TapChi.class new file mode 100644 index 0000000000000000000000000000000000000000..e223e7c38f14d2fb1a1728b7ce09a9a85d34c089 GIT binary patch literal 1431 zcma)5Yg5xe6g^worYYgoQ1HQ{$ip^8ih`gN5kZk^MYJ8%j|*f-oHpq+sgLnj=}4K; z8GnF3%JJ@|&?0!W*D^P%Map$PL7hSa-+h1eoN@w;M!kg})8Alg14Kb(;eMQ?bcN*1w zvtH)=6_X)RbPsrCkJoLnZf%Br%k~(0i>LfTQJ%p_7vJ*_JXayoT*9dO4n>-j)xO2a6|RNTOnf=Pz{j(dLge6y-y8Z+dp+wd8Z zfePEr?UDyRIbrf@K87^Ipt?hxDbG#S=%rHhJl0Ao4g<3avJAS!J)fxI7UmctHGxIo zm$)TF&f|`P+YAE|qVomIOZq6ARy@V3o$G)3n$5Rd4pc0SrTFrD08Aj5Di|Sfyf zS5)+BS@cb(Bh*|aw^2VZw`|cC-9Z=53H_L$V(g+u4bexnDQ8rf^bgYsH5QF=S}o9@ z(LZ9Gp!=%~>!C4DX@Ew-z4VEh3_>6JX(a##XcPcnC`Q2QMs{}e1PNpG7)c`;ImU1s zErQ(Et(N^h0cC&l#$GPX;U?<_4a-g-&}+5l%rjm^I-bCA`lHp#T?nhBmCx*H7!Vj}0JYF@bA^)hJiD4e3PTzO z{~=sB4MMwOU>Mg0A}Z)mGo<6^w!Pz8$f&lgnuZD3jnW;kBULsfFuz&)fX zuwSFzEz<8P!XMIc%m_^B`Y!XCC(<`vUpi*U$93$QNmIl&?nL9a*$g?o|WNl}@pe>jz96mDNK|PO8Izu+Kq>PzTK^=VzC0 zN$dY6s-aWrDeTI~H3m{OQZM+mYRTSo)I=xL(9SDkOoEa54FM6p@eAOp@s#5(xW{JB z5&znNb*>5q4SKj5O#|-NcuJrbeY{c5KNvE`ed_}K`)5d=W5l|^*#0?g?qp}{n8?;K zb%s01OdYd4KiJLA)$vH(Jh{ACj%G)rbu1Ho)=Iy?WPr}}1_!MdBTP9?ji)hy43e0~ zAeJ!1CJbYZ=q5%RR2Q3c@B%OC-$Q&2>m-}vzheWhSbGK&wB91|72>b?7A3w->j>Wb E26{sG`~Uy| literal 0 HcmV?d00001 diff --git a/Bai3/Bai3/src/Class/Bao.java b/Bai3/Bai3/src/Class/Bao.java new file mode 100644 index 0000000..5da5969 --- /dev/null +++ b/Bai3/Bai3/src/Class/Bao.java @@ -0,0 +1,33 @@ +package Class; + +import java.util.Scanner; + +public class Bao extends TaiLieu { + // thuoc tinh + private String ngayPhatHanh; + + // phuong thuc + // ham khoi tao khong doi so + public Bao() { + + } + + // ham khoi tao co doi so + public Bao(String maTaiLieu, String tenNXB, int soBanPhatHanh, String ngayPhatHanh) { + super(maTaiLieu, tenNXB, soBanPhatHanh); + this.ngayPhatHanh = ngayPhatHanh; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap ngay phat hanh: "); + ngayPhatHanh = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tNgay phat hanh: " + ngayPhatHanh); + } +} diff --git a/Bai3/Bai3/src/Class/QuanLySach.java b/Bai3/Bai3/src/Class/QuanLySach.java new file mode 100644 index 0000000..51863a5 --- /dev/null +++ b/Bai3/Bai3/src/Class/QuanLySach.java @@ -0,0 +1,82 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QuanLySach { + // thuoc tinh + private ArrayList dstl; + + // phuong thuc + // ham khoi tao + public QuanLySach() { + dstl = new ArrayList(10); + } + + // them moi 1 tai lieu + public void themTaiLieu(TaiLieu tl) { + dstl.add(tl); + } + + public void inDanhSachTL() { + for (TaiLieu taiLieu : dstl) { + System.out.println(taiLieu); + } + } + // nhap danh sach tai lieu + public void nhapDanhSachTL(Scanner sc) { + int chon; + String stop; + TaiLieu tl; + + do { + System.out.print("Chon loai tai lieu (1-Sach; 2-TapChi; 3-Bao): "); + chon = sc.nextInt(); + sc.nextLine(); + + switch (chon) { + case 1: + tl = new Sach(); + break; + case 2: + tl = new TapChi(); + break; + case 3: + tl = new Bao(); + break; + + default: + tl = new Sach(); + break; + } + + tl.nhapThongTin(sc); + inDanhSachTL(); + themTaiLieu(tl); + System.out.print("\nBan co muon nhap vao nua hay khong (c/k): "); + stop = sc.nextLine(); + } while (stop.equals("c")); + } + + // tim kiem theo ma tai lieu + public void timMaTL(String maTL) { + for (TaiLieu tl : dstl) { + if (maTL.equals(tl.getMaTaiLieu())) { + tl.hienThiThongTin(); + } + } + } + + // tim kiem theo loai tai lieu + public void timLoaiTL(String loai) { + for (TaiLieu tl : dstl) { + if (loai.equals("Sach") && (tl instanceof Sach)) { + tl.hienThiThongTin(); + } else if (loai.equals("TapChi") && (tl instanceof TapChi)) { + tl.hienThiThongTin(); + } else if (loai.equals("Bao") && (tl instanceof Bao)) { + tl.hienThiThongTin(); + } + } + } +} diff --git a/Bai3/Bai3/src/Class/Sach.java b/Bai3/Bai3/src/Class/Sach.java new file mode 100644 index 0000000..3756f0a --- /dev/null +++ b/Bai3/Bai3/src/Class/Sach.java @@ -0,0 +1,39 @@ +package Class; + +import java.util.Scanner; + +public class Sach extends TaiLieu { + // thuoc tinh + private String tacGia; + private int soTrang; + + // phuong thuc + // ham khoi tao khong doi so + public Sach() { + + } + + // ham khoi tao co doi so + public Sach(String maTaiLieu, String tenNXB, int soBanPhatHanh, String tacGia, int soTrang) { + super(maTaiLieu, tenNXB, soBanPhatHanh); + this.tacGia = tacGia; + this.soTrang = soTrang; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap tac gia: "); + tacGia = sc.nextLine(); + System.out.print("\tNhap so trang: "); + soTrang = sc.nextInt(); + sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\ttac gia: " + tacGia); + System.out.println("\tSo trang: " + soTrang); + } +} diff --git a/Bai3/Bai3/src/Class/TaiLieu.java b/Bai3/Bai3/src/Class/TaiLieu.java new file mode 100644 index 0000000..032f499 --- /dev/null +++ b/Bai3/Bai3/src/Class/TaiLieu.java @@ -0,0 +1,46 @@ +package Class; + +import java.util.Scanner; + +public class TaiLieu { + // thuoc tinh + private String maTaiLieu; + private String tenNXB; + private int soBanPhatHanh; + + // phuong thuc + // ham khoi tao khong doi so + public TaiLieu() { + + } + + // ham khoi tao co doi so + public TaiLieu(String maTaiLieu, String tenNXB, int soBanPhatHanh) { + this.maTaiLieu = maTaiLieu; + this.tenNXB = tenNXB; + this.soBanPhatHanh = soBanPhatHanh; + } + + // nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ma tai lieu: "); + maTaiLieu = sc.nextLine(); + System.out.print("\tNhap ten nha xuat ban: "); + tenNXB = sc.nextLine(); + System.out.print("\tNhap so ban phat hanh: "); + soBanPhatHanh = sc.nextInt(); + sc.nextLine(); + } + + // hien thi + public void hienThiThongTin() { + System.out.println("\tMa tai lieu: " + maTaiLieu); + System.out.println("\tTen nha xuat ban: " + tenNXB); + System.out.println("\tSo ban phat hanh: " + soBanPhatHanh); + } + + // ham lay ra ma tai lieu + public String getMaTaiLieu() { + return maTaiLieu; + } +} diff --git a/Bai3/Bai3/src/Class/TapChi.java b/Bai3/Bai3/src/Class/TapChi.java new file mode 100644 index 0000000..2730c54 --- /dev/null +++ b/Bai3/Bai3/src/Class/TapChi.java @@ -0,0 +1,39 @@ +package Class; + +import java.util.Scanner; + +public class TapChi extends TaiLieu { + // thuoc tinh + private int soPhatHanh; + private int thangPhatHanh; + + // phuong thuc + // ham khoi tao khong doi so + public TapChi() { + + } + + // ham khoi tao co doi so + public TapChi(String maTaiLieu, String tenNXB, int soBanPhatHanh, int soPhatHanh, int thangPhatHanh) { + super(maTaiLieu, tenNXB, soBanPhatHanh); + this.soPhatHanh = soBanPhatHanh; + this.thangPhatHanh = thangPhatHanh; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap so phat hanh: "); + soPhatHanh = sc.nextInt(); + System.out.print("\tNhap thang phat hanh: "); + thangPhatHanh = sc.nextInt(); + sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tSo phat hanh: " + soPhatHanh); + System.out.println("\tThang phat hanh: " + thangPhatHanh); + } +} diff --git a/Bai3/Bai3/src/Testing/Test.java b/Bai3/Bai3/src/Testing/Test.java new file mode 100644 index 0000000..18e6628 --- /dev/null +++ b/Bai3/Bai3/src/Testing/Test.java @@ -0,0 +1,27 @@ +package Testing; + +import java.util.Scanner; + +import Class.QuanLySach; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QuanLySach qls = new QuanLySach(); + + qls.nhapDanhSachTL(sc); + qls.inDanhSachTL(); + System.out.print("\n\nNhap vao loai tai lieu can tim: "); + String loai = sc.nextLine(); + qls.timLoaiTL(loai); + + System.out.print("\n\nNhap vao ma tai lieu can tim: "); + String maTL = sc.nextLine(); + qls.timMaTL(maTL); + + sc.close(); + } + +} diff --git a/Bai4/Bai4/.classpath b/Bai4/Bai4/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai4/Bai4/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai4/Bai4/.project b/Bai4/Bai4/.project new file mode 100644 index 0000000..13c1756 --- /dev/null +++ b/Bai4/Bai4/.project @@ -0,0 +1,28 @@ + + + Bai4 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272574 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs b/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai4/Bai4/bin/Class/KhoiA.class b/Bai4/Bai4/bin/Class/KhoiA.class new file mode 100644 index 0000000000000000000000000000000000000000..70a793d84837c153d71c2ce0b498188dc37ef9c9 GIT binary patch literal 1334 zcma)5+fEZv6kVsZ^ull}EvVc^6le!ZqPz8B=DOc53to{2z^! zL=!*2k20<^Q|SN1;S^Jy(*9_eb7JZ`MPeO=F4u=vQM}Cy)}PY7wF%%Y|Gsd=*wiQT-|q0j0E~H zs34Anz;Ma3jidJ2vC*vP$8|%3IyJps)ti>gyNhAhv|8j*3NT}>&CGQM|Fe><#vzbW z5JA6;#uY^U=$3*Q`UMo*)EgDku}>?O%>&&+ZP%*j%QfA$jpkOiDqk|C;5P2WF#|P< zS%Hy&CZAibai-ud<|u&Eb_LQtJOlm_E6C%4K+HBixv~XRBa^)@T?}kxfY@45 zjbY=;(t1%92(@Y?>faBRVULDQ%dqL3e_~3_HWfTVA_{I#1myB8wAZ%kCq^@dC*&Qk zII8LRqR;|TmLi@??`SgGRj`MBx=e304EsbNcasp;p4BZu*}XhbBt-r=SXY0 zb4>K`#z_Xe6UG?trZ9vwqj3*g^Y3@DiR2NNq*5Mr$s{HJ2R=$jmv<|FVP&~j(3UPR z`3=*_dmYScOC3lSGGFcGX_>G0@&LCvVuPp=O!CE3WH!xj2J@Ij4k{i}RH?zZU+t1- zfjb3q5z<9nPA19#_k0luhI`js&_vI+JlIGo|ZI(<~M$7jT1b(}n_9z2I5CNI#az z+#eU2O6J4=bo!y*VO#Ie=2FWvIoE^#u&TFHdNZTvOVlExwm45*I#z4`n>J zW#P}p&CHp(r{B!<d7y=DHmU%vWSf_3Dj>?qKaDqv)c;=EI)mU zT$tEtqK3LaJ5WjVxL(boY$|7QB+v=cxr{@ZDP3=yRtHpx4e0vKf(!kA^!?s zQ1LQGo7IR}FxUDUIIrci%jnVuIIyT1RL#o7?6J~-7NZ7C>9Mr8e|mPlLHjquqpMXi c`jv0X(DXfYO0I)_s%qi^mC5cQnFfx&06le4p#T5? literal 0 HcmV?d00001 diff --git a/Bai4/Bai4/bin/Class/ThiSinh.class b/Bai4/Bai4/bin/Class/ThiSinh.class new file mode 100644 index 0000000000000000000000000000000000000000..3c9a17a5924b9b958dd116076113760267e27186 GIT binary patch literal 1674 zcma)6U31e$6g}%Wk*taklGwpc0P)q@BEdjX+S)+VB%~P9Kx-39%Zp;~L}Hv(#+I4( zt-qxG1H8~_%nY6B58y{Jy?3R=am_kuiGs* z{Gc8v-#}Vm>ZSL}E4MwhSAM+vQZ^%jbT?ev5D+ziaX)NGB{01;xK@ukf!eDIOtb=T z-46t;Rv^{WUW2}5y%VS)x+gGJEbS23df1W{#&FukC$I%hZv{$j_x5*Xr{V3kC4+}e zuf5}S0zN0kbmRwJzCA>lqE?EvQ8NF>QrgKtAZKG76TCZX!+^=Vf{jePTd-ll6tI== z9W?wDZCu6`(je@SpxO9!5SE{i zbP)+Cz5S|*PX%T&+Z4&^hR&`RIxSE66~{smu7MJHwd%v~Y+S=4Rpx-92s@#sE0~m~ zv}55qZWt&FoY4>`iQBk|TLOlXzeF{LphDI7!HSK~aa+J-4_8TGwpbdK*2I?rlQD5W zbRwxLj)@8tE4EQvI88rb;~j!HGD_w2dQL=5QgH-Q-6rMt5m^bwr#sZ6NBSH1Mquv0 z4Y<||+AY~JvCd@b!ve12KDXPVg;jiO;{m9bC%l6LsagUH#oB0A30#$5JhHK+g^0pf zQLf0gjmIp!p@nZN6W!log6VNJ$jlaVi|Spp#)v1)f-)YJn$~umsNG ze8T2;V#BvK|HOsqt9^XtUh9LXWNBG`#>Oua<1&%t^H+m&p3l|6`2=&9VgU;j?;I&| zp15D2or9|+{1PtF_*}+aT)};^uwJ>C#c?K^ei(K#eiWN_ECYd_Q(`d3|n)05M`)V zQHh{}T7ibgqzj@3_3}uFKJBBCsY(bup`siWtS4re`b2JVR?kdovnj#}#jJ#un$j|c zeD{ogJ87_-`XZ`g`9xJ^C-uci7bd;ii$^@*ktvzKRmC=JCvt6Wj;yr1C2wLZ8krIB zNy=&;3Lv1GNi991naQ}8ND4H0-VUkpgl3w0CMv6X8f^-mDUl<-l(qFm70;rb$*mlf z@gy;IF+-^`7rAaXDL8`IEdZYqoAuua%lh+ z-PkKoo|Z8ms*ouRbDj``*oXZJdP(GlPF@8n4xmp!G4(6~(a zrWC|VG7beW!Hlx~gBZi8g0m(2!vVyZe@X&+k$~d40M5}cVi3?7kh~e3SMahxb;&HL zcm+GXu9{3zi?F1}2qwYv0%DXu`EM|G+}08c<67FAl-i`B zn^d9Lud@3M6_=#A{;Y9TSCA6evTq zXz8?Wa+X>-(T}j{MPpZAX4Y^@>zBS)r0hYWf{#ZBB|w;Q&e(QGRt=iLM6 zh%xHfqgA+#j}+YDowG4a#a$I2;}e!HXXfE~*#zw~6?dJfV+nCRLdBQ3$3aMH z*$Ky;lgP`dGHVTKmXuW>7`Jkngnq)17iP`+$6${Hf~VL^W&C8YljI%Ce}!*81o*}< zkiAw#%Lx2j0iljns2yvlnXU`2qV5+o{OFu-QRj*+EmvITks^`glt+b z;t;d=XbX1yjE2rUTFz}m3OYOW@-yH>X>w0`QRssm2s4f#{+(_-@x6l|xc?J&g(7)$ zGG1^bh#*a5SzhVO*ozzJ!5#YCL$AZl zd9uW+*SWcmi_pl)1oKIje2h|DrPo)>)W_XzLy|cX+^NAW%yH#s+-uOeD#vS#JqD#f zh!qNi!aE*ss^6Rj-|3V&^|yOli*93;Dk zh~_YP>*wkaSsifL3cCqCwgNmME9Q`(&#BnwR2+csA5;s`#hvTa%bkI{*oUB7XID<)yXDcteiR9XP%TROh;cos?68 eY9xEENK%FndG(F#P_R?zC5Ekg$mxnTKOP+0) z_sxng(6wYamY)&mNTx~x;jCLVW9UFsM<==jdh?cJZZ+#=vr&{~+Z2fB-HNnJvSF$C z>@e)tEKi^(f0c8Qcy(zx0z=8K`AhDC-=M6;R7pd>K!1>E`j(w8RHWmWjVKZr)G%;O zaN)@F&AN^u+!hEa(7`sO<)(AaLDMIyDeH?d^x=*YKO!)kyzz=6zRS|Gw)DJov3X=V z1Cj|s?w<$o~+aiHp1|TwqV5Y z7*91k5l93jQs@-~9Z94Fv;zfdt8&i72IIMCkrFkjV+zkWP=|D@WGawIHML#c)z-18 z5u~Y1UAr#Gs5S#}wp>u4FLcZV1Fl)7Q>j0A;wu2DX(jgv8atKP2am5$d+ zd}knDb$njO0yuBYF~9jahi#*uaw@Z|BZIdB5tUJ95*SFP{&$1Y^j^mbva}JIHY~GF zS!yt}Q8Je*DYOqd)|BebitT!Y3d_bGeV4ewUUZ39Vd{n^33OMzi@DQ+`G2gyN}`^- zB3;!L0g)4k72IZ{Vy;>04MdgAr`1$34%W(72ZZ>=H^Wt9l;$qDcTSuj@;yk$xT-XG zp_{ATzQFw!qbPdN%MV5O)3oir)pb literal 0 HcmV?d00001 diff --git a/Bai4/Bai4/src/Class/KhoiA.java b/Bai4/Bai4/src/Class/KhoiA.java new file mode 100644 index 0000000..a5e9a3e --- /dev/null +++ b/Bai4/Bai4/src/Class/KhoiA.java @@ -0,0 +1,40 @@ +package Class; + +import java.util.Scanner; + +public class KhoiA extends ThiSinh { + // thuoc tinh + private String mon1; + private String mon2; + private String mon3; + + // phuong thuc + // ham khoi tao khong doi so + public KhoiA() { + + } + + // ham khoi tao co doi so + public KhoiA(String mon1, String mon2, String mon3) { + this.mon1 = mon1; + this.mon2 = mon2; + this.mon3 = mon3; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + System.out.print("\tNhap mon 1: "); + mon1 = sc.nextLine(); + System.out.print("\tNhap mon 2: "); + mon2 = sc.nextLine(); + System.out.print("\tNhap mon 3: "); + mon3 = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + System.out.println("\tTo hop mon thi: " + mon1 + " - " + mon2 + " - " + mon3); + } +} diff --git a/Bai4/Bai4/src/Class/KhoiB.java b/Bai4/Bai4/src/Class/KhoiB.java new file mode 100644 index 0000000..d470247 --- /dev/null +++ b/Bai4/Bai4/src/Class/KhoiB.java @@ -0,0 +1,15 @@ +package Class; + +public class KhoiB extends KhoiA { + // thuoc tinh + + // phuong thuc + // ham khoi tao + public KhoiB() { + + } + + public KhoiB(String mon1, String mon2, String mon3) { + super(mon1, mon2, mon3); + } +} diff --git a/Bai4/Bai4/src/Class/KhoiC.java b/Bai4/Bai4/src/Class/KhoiC.java new file mode 100644 index 0000000..79628f6 --- /dev/null +++ b/Bai4/Bai4/src/Class/KhoiC.java @@ -0,0 +1,15 @@ +package Class; + +public class KhoiC extends KhoiA { + // thuoc tinh + + // phuong thuc + // ham khoi tao + public KhoiC() { + + } + + public KhoiC(String mon1, String mon2, String mon3) { + super(mon1, mon2, mon3); + } +} diff --git a/Bai4/Bai4/src/Class/ThiSinh.java b/Bai4/Bai4/src/Class/ThiSinh.java new file mode 100644 index 0000000..ae4ab09 --- /dev/null +++ b/Bai4/Bai4/src/Class/ThiSinh.java @@ -0,0 +1,51 @@ +package Class; + +import java.util.Scanner; + +public class ThiSinh { + // thuoc tinh + private int soBD; + private String hoTen; + private String diaChi; + private String dienUuTien; + + // phuong thuc + // ham khoi tao khong doi so + public ThiSinh() { + + } + + // ham khoi tao co doi so + public ThiSinh(int soBD, String hoTen, String diaChi, String dienUuTien) { + this.soBD = soBD; + this.hoTen = hoTen; + this.diaChi = diaChi; + this.dienUuTien = dienUuTien; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap so bao danh: "); + soBD = sc.nextInt(); + sc.nextLine(); + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + System.out.print("\tNhap dia chi: "); + diaChi = sc.nextLine(); + System.out.print("\tNhap dien uu tien: "); + dienUuTien = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tSo bao danh: " + soBD); + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tDia chi: " + diaChi); + System.out.println("\tDien uu tien: " + dienUuTien); + } + + // ham lay ra thong tin ve so bao danh + public int getSoBD() { + return soBD; + } +} diff --git a/Bai4/Bai4/src/Class/TuyenSinh.java b/Bai4/Bai4/src/Class/TuyenSinh.java new file mode 100644 index 0000000..24c723b --- /dev/null +++ b/Bai4/Bai4/src/Class/TuyenSinh.java @@ -0,0 +1,70 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class TuyenSinh { + // thuoc tinh + private ArrayList dsts; + + // phuong thuc + public TuyenSinh() { + dsts = new ArrayList(10); + } + + // ham them 1 thi sinh + public void themThiSinh(ThiSinh ts) { + dsts.add(ts); + } + + // nhap danh sach + public void nhapDanhSach(Scanner sc) { + ThiSinh ts; + int chon; + + System.out.print("Nhap vao so luong thi sinh: "); + int n = sc.nextInt(); + sc.nextLine(); + + for (int i = 0; i < n; i++) { + System.out.println("Thi sinh thuoc khoi nao (1-KhoiA; 2-KhoiB; 3-KhoiC): "); + chon = sc.nextInt(); + + switch (chon) { + case 1: + ts = new KhoiA("Toan", "Ly", "Hoa"); + break; + case 2: + ts = new KhoiB("Toan", "Hoa", "Sinh"); + break; + case 3: + ts = new KhoiC("Van", "Su", "Dia"); + break; + default: + ts = new KhoiA("Toan", "Ly", "Hoa"); + break; + } + + ts.nhapThongTin(sc); + themThiSinh(ts); + } + } + + // ham hien thi + public void hienThiDanhSach() { + int n = dsts.size(); + for (int i = 0; i < n; i++) { + System.out.println("Thi sinh thu " + (i + 1) + " la:"); + dsts.get(i).hienThiThongTin(); + } + } + + // tim kiem thi sinh theo so bao danh + public void timKiemThiSinh(int soBaoDanh) { + for (ThiSinh ts : dsts) { + if (ts.getSoBD() == soBaoDanh) { + ts.hienThiThongTin(); + } + } + } +} diff --git a/Bai4/Bai4/src/Testing/Test.java b/Bai4/Bai4/src/Testing/Test.java new file mode 100644 index 0000000..c9f740d --- /dev/null +++ b/Bai4/Bai4/src/Testing/Test.java @@ -0,0 +1,29 @@ +package Testing; + +import java.util.Scanner; + +import Class.TuyenSinh; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + TuyenSinh dsTuyenSinh = new TuyenSinh(); + + System.out.println("Nhap vao danh sach thi sinh: "); + dsTuyenSinh.nhapDanhSach(sc); + + System.out.println("Danh sach thi sinh du thi la:"); + dsTuyenSinh.hienThiDanhSach(); + + System.out.print("Nhap so bao danh can tim: "); + int soBaoDanh = sc.nextInt(); + sc.nextLine(); + + dsTuyenSinh.timKiemThiSinh(soBaoDanh); + + sc.close(); + } + +} diff --git a/Bai5/Bai5/.classpath b/Bai5/Bai5/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai5/Bai5/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai5/Bai5/.project b/Bai5/Bai5/.project new file mode 100644 index 0000000..d344083 --- /dev/null +++ b/Bai5/Bai5/.project @@ -0,0 +1,28 @@ + + + Bai5 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272586 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs b/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai5/Bai5/bin/Class/HoDan.class b/Bai5/Bai5/bin/Class/HoDan.class new file mode 100644 index 0000000000000000000000000000000000000000..674cc313650e435beede3cf0049b9ccbad0d1931 GIT binary patch literal 2070 zcmbVN%W@l45It9tt%t{tD1Kn%B$E(`BtJxqv5D>2CN?1g#{?uCOu}O<51JwJjF3hN zsbZNQVU-PwKw-Ix6s%aWV8N%brhwBkk}WK+*l2F|?e5#>+;dyM{r%G~0Onvv5mM+| zuNd`u?v}e@I8j8799!jvYb!+SZfm9T3O%$eLm^VJ>z=~Ez0Dxo4_Q*^UA7(DTTuw7 zGusSXclXQ$!WhtyKwlgRLmFa;D-3Shj=9y?-!*GRW4B@|BsblXQQ0NjEPjEc~x3 znQg)GqJ|#y%4$MG6usoea*L)TIJ#O>h&g5Balv*hGH|j{g@jYK%&oFzn^gtPv5acb za-DL~X1UQ;lRmIQ$#5LAwj@2gj4M&R!g?LYJ+6D^zJ@e1yaKnuD;fz-v)$YsvgDB~ z)7W2%VUme)-epy>eKOO~s94H`Z&-K)ulm(z`gUD-2hG2GDKTZ4H<3l0v9n;`Mb%tSuP@#pm2#@Ql)f+Z0&v=mx1dr)b%2y~Xee zCqTS#q=^_lQ;7SHfNsA2OxzC-m~I%|OqXp#-=o+GG>npld*~zIWs{dHV`C_tIXO5I z+$^*wO`_m7Y9;fgEn^|!zxf%tA6(>f3v+gb5t7%(RY=~R|K(KSx0ex|H2l?Qt#M!R zJCHp@e|9MGGr|WL{N9g0BYwZy03sMfKZcN`PYW_|7Q?ip+DNO~H;j|BhO?7X(}x(% zjzkVHo*n5qKRaYX;;kr84~sA2V72Oo0!T@HZjX)_<7^5IG2x|sUzn~6Kmn?PqD~|=UCrKzIBMV zCnBFWkx$-k;=Lw5U_|yu3{E^pc!!)7d}EdsK70~V6ST&^{pVK!8-@@#Pl!N@BYlGO zog?J){Jp^0q$5i(vut{SZ5MGF2E7kxKg1QE5Iul!M93rD#YY4<$LG02vO@TnwfP_Q z7pKNNH>jc({@;mT`1-01|gBv`{Y{k})%FGK0yamU>sb z-|OYUCwbyoKMkMd`}}&r0b%-MUdwe~tY-23W-QGq=5>Li4?8oEC|4P?M>H!w$dKTGX_?NTfWIv^#{w7av>t{ZwJNF+R!}d{ z^pIj<)S*!xi7=*ZJT_Mifjug!5EQ6Sn3g_O%q{BqS#2>(Fp-3v(z0_}-jr)^GvF9z zL7>jVRAw$&IEJ2c5mJM;U5I0IvT&=4gE&OUT3U+HR%W_GsCaBapvsUW1!{L?pwO0~ zE%A$y)KZ4PUN77gGnvvXOV7t8pQCtO!LeO!NG=x~J*VOcw6VHfWJkPKn0EJc-n5*g zlh?IeJcM@2F~vgBo0=Uh*ipldrZuZS8b&9ME9lyib$6hOZk!$V6P%9sEDlX%&=bu@r%dBaIY5RE3`Uyp(m&RlJN0o0`#GckB|V zJR{-~s;S~S!n}xH(k-+s%?nZQn7Ij4&u#50;AUOLN+X)XYB|X|hgVeOT}QFxysqUX z3`a!~H|ZtQ(es*P=jAQ(dgT%y_x9s8xP{vamN@|``M18RcnzZwf8Hp%&2tSESIyL0ZgiudsWw-`5-(Uy~@#p@o~1yoXX75hlV z$C754hm*D&F0p^A;xl~C+J;t`a$)j5akls^`&HuD(Q7vo<1H;WCOfII$DGy2*fOWMVJN*^`lbgU_lzT;9NJVr+f;1>@A=4vM>gZBFa31_z!#e{$|}O=3Dp~MztrLZXCAJhOqB`E|@rb~5t0_RbQntOP`J;Na@! zJ&Df`$@I9Z$$qMI0JUgE1c%5=Vv1srm_~_e0!J{-y?GpSIrNm#ZF5+_0u!Fcd(T*;h>2em?U@k@3KuIOW|beXw<9JRI+lzORA$zD4zrpgQo{Z(riZmIeW z^gSW=2U-FpyfNkP4Xz>D+SMF9Rl+-7RJvjMM}*`7VgYxae)y=_Nf%BZuaZ>1mfgzXbpeu#BO;y7e_>zPgaRpzIw2xWl z@HOs`RtHYI%?$7#t#((4pew{Esy6u{=(aG&Hhx0|ZULLjs#G==%y66iZDGf&A3V;g K-%>aqzWWcO?;FJc literal 0 HcmV?d00001 diff --git a/Bai5/Bai5/bin/Class/Nguoi.class b/Bai5/Bai5/bin/Class/Nguoi.class new file mode 100644 index 0000000000000000000000000000000000000000..230518877bce9ae8faefff21f00ef4aee4814b66 GIT binary patch literal 2235 zcmZ`)?N%FA6x}xjCP@d{rhHr4Kx>6Sh_@*_wR`{{O5Nv9NT49BbwB2wd(J-l?0fR}KY#uO;5L3V5K%a{Qny;IY@xR6 zy9S~P7q+dRtZd!#YT0L-+jb>T=ym*(?I|SJx@X0p>3X%CLd>gKdqvlCcr`rV4cvP6 zp%vIXO?WlOF4P>?ZYcEKcRe?FpwKftQ&xzs_*FZB9t@aB;GDwwHP^EXyE~h9vt(`7 zZHeetta{mMy0UM7j0TR|Qs`eh2A!c6rcc9r6VPdknQ|NoLneCBC#w+?24b=rGZ9Ch zg6TO{qvZHrt>lt~;dU6EWwBy;p54remkC@oaODJn#l2Qw@0dtol1cl!v4;QHBh z5*Uz1+uF&+a7|$#USOn@6z2~#PA+(hsdPTsTNBu;1q6|RMGni@mA0*`BHF& z>u2G3vkEaRFsUP-j-8@ND3HaJLZnsU(Xk6h3@aE6BS8$@R~Xm%1jL>#x;u@!Ehnpf zbH@r|pu!T>Y9^o0?C~#w9F|03GqPGXu_B;*8&LXg!MD(<(TMC!MOwPnf$tp57e$3>g zFB!}q(q>(;Aw zGlmV8G5(~ZyfT&&DB~Lw-{LzyT&vNry{bay|I2&YYffDJV8YTm3;Zx-46LvjFPzkp zZDI>G9teA-wrN*R-Ij8uL|y%O*l9XSl2Si6Q5TPq)X=&m>~q+ybR?_uBUK}1>wR}pCxdS;v8Y|w&jjHAijEzXK_Z~74ZziYGe z922|-TtE~_j-aVF!bR@Ebpn?-ii0{WqnroDL3(zdi@ALar!)H)?fM%g7+{E&!|YZg z7{Dk!jA`HL@P6AjJ!#+)Z%{)QB!kl9m=tx0x7v|^;a*Z*c!kT!sRLY3&mJI60J49V zd)emG>A6GPBqI5Gr)zZ#+?3{Lg5wnex=Ls%cF9THz!aO$HQd2<4Kx*o>i}KAUECv> z34&TAya@lhSDJwD^Q+M0jfmYsk~z2=@g%BggCXJch`> zQU;2^z^4X^1_j9FQ~4$NyrYVrX)Xm=C&G*FnEBk5AZ!vA02GU0Z)bx zQ9X6>taJ2VFrVbG8qwCvcqP6j%;ohGB5cx zqKO-z4e)^ST%xyS?J<;BvO`uo^e7g|Ef#VrJqHq_-_2;!v(2{q74i6T`zZCoqfVy}ZQAU=ye zBodYQ06q#a>l6~Cyv%raX3v~CGye7a$4>xH@Ipg|!RR_sEabpaUPG3laK^uI%j0x+ z)IW3Vm|^LakRpD~uuyOG7_tY!siR{7IRlGWVpwep>3m51z7uwN-*XsB?ZD<zy1XF`+u#Z|NxDx*}g?sMP1CsKPf$p97Cak#*=M$8Mlw z136`G8!)j+QR(vG8!p`rw_Vl21ZtKib)cx;F>n_(QZPtJ&?&29>hdqEW!z_|DL6AC zJkt%#Q!Y(AFy$Z#gt@#vArH%%6G;A}JQ)Q^X86*QuJYdj<3fxmFToOyC`cGNa ziDh6f9bqi|L*e*cH;{v_QZCEG0ZpqsXDFm?WK(EPxAg9__i3o6JgXc{S?>f%XghC( z+K-%Cfn7x%n;=zaBY_Nk(LRyY=wy*+-ubA;U~c$MG*oxly6SsoSI6B9)m iT`4VSPC)Sxk0@^iRXnCYiIkxDQ#?yMcutWF_WuAFJ;3h( literal 0 HcmV?d00001 diff --git a/Bai5/Bai5/src/Class/HoDan.java b/Bai5/Bai5/src/Class/HoDan.java new file mode 100644 index 0000000..e0efa82 --- /dev/null +++ b/Bai5/Bai5/src/Class/HoDan.java @@ -0,0 +1,61 @@ +package Class; + +import java.util.Date; +import java.util.Scanner; + +public class HoDan extends Nguoi { + // thuoc tinh + private int soNguoi; + private int soNha; + private Nguoi[] list; // list la mang danh sach chua cac thanh vien trong ho + + // phuong thuc + // ham khoi tao khong doi so + public HoDan() { + list = new Nguoi[10]; + } + + // ham khoi tao co doi so + public HoDan(String hoTen, Date ngaySinh, String ngheNghiep, int soNguoi, int soNha) { + super(hoTen, ngaySinh, ngheNghiep); + this.soNguoi = soNguoi; + this.soNha = soNha; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap so nguoi: "); + soNguoi = sc.nextInt(); + sc.nextLine(); + System.out.print("\tNhap so nha: "); + soNha = sc.nextInt(); + sc.nextLine(); + System.out.println("\tNhap thong tin cho tung nguoi trong ho:"); + for (int i = 0; i < soNguoi; i++) { + System.out.println("Nguoi thu " + (i + 1) + " la:"); + list[i] = new Nguoi(); + list[i].nhapThongTin(sc); + } + } + + // hien thi + public void hienThiThongTin() { + System.out.println("\tSo nguoi: " + soNguoi); + System.out.println("\tSo nha: " + soNha); + System.out.println("\tThong tin cua tung nguoi trong gia dinh:"); + for (int i = 0; i < soNguoi; i++) { + System.out.println("Nguoi thu " + (i + 1) + " la:"); + list[i].hienThiThongTin(); + } + } + + // ham lay ra thanh vien trong ho dan + public Nguoi[] getList() { + return list; + } + + // ham lay ra so thanh vien trong ho gia dinh + public int getSoNguoi() { + return soNguoi; + } +} diff --git a/Bai5/Bai5/src/Class/KhuPho.java b/Bai5/Bai5/src/Class/KhuPho.java new file mode 100644 index 0000000..8cadfa8 --- /dev/null +++ b/Bai5/Bai5/src/Class/KhuPho.java @@ -0,0 +1,66 @@ +package Class; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Scanner; + +public class KhuPho { + // thuoc tinh + private ArrayList dshd; + + // phuong thuc + // ham khoi tao + public KhuPho() { + dshd = new ArrayList(10); + } + + // ham them 1 ho dan + public void themHoDan(HoDan hoDan) { + dshd.add(hoDan); + } + + // ham nhap vao danh sach ho dan + public void nhapDanhSach(Scanner sc) { + HoDan hoDan; + + System.out.print("Nhap vao so ho dan: "); + int soHoDan = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap vao thong tin cho tung ho dan:"); + for (int i = 0; i < soHoDan; i++) { + System.out.println("Ho dan thu " + (i + 1) + " la:"); + hoDan = new HoDan(); + hoDan.nhapThongTin(sc); + themHoDan(hoDan); + } + } + + // ham hien thi danh sach + public void hienThiDanhSach() { + int n = dshd.size(); + + for (int i = 0; i < n; i++) { + System.out.println("Ho dan thu " + (i + 1) + " la:"); + dshd.get(i).hienThiThongTin(); + } + } + + // ham tim kiem thong tin + public void timKiemThongTin() { + // lay ra duoc nam hien tai + Date now = new Date(); + int namHienTai = now.getYear() + 1900; + + Nguoi[] dstv = null; + + for (HoDan hoDan : dshd) { + dstv = hoDan.getList(); + for (int i = 0; i < hoDan.getSoNguoi(); i++) { + if (namHienTai - (dstv[i].getNgaySinh().getYear() + 1900) == 80) { + hoDan.hienThiThongTin(); + } + } + } + } +} diff --git a/Bai5/Bai5/src/Class/Nguoi.java b/Bai5/Bai5/src/Class/Nguoi.java new file mode 100644 index 0000000..cf27dae --- /dev/null +++ b/Bai5/Bai5/src/Class/Nguoi.java @@ -0,0 +1,73 @@ +package Class; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class Nguoi { + // thuoc tinh + private String hoTen; + private Date ngaySinh; + private String ngheNghiep; + + // phuong thuc + // ham khoi tao khong doi so + public Nguoi() { + + } + + // ham khoi tao co doi so + public Nguoi(String hoTen, Date ngaySinh, String ngheNghiep) { + this.hoTen = hoTen; + this.ngaySinh = ngaySinh; + this.ngheNghiep = ngheNghiep; + } + + // nhap cac thong tung nguoi trong ho gia dinh + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + System.out.print("\tNhap ngay sinh: "); + String strDate = sc.nextLine(); + ngaySinh = strToDate(strDate); + System.out.print("\tNhap nghe nghiep: "); + ngheNghiep = sc.nextLine(); + } + + // ham thuc hien chuyen string sang date + private Date strToDate(String strDate) { + Date date = null; + + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + try { + date = sdf.parse(strDate); + } catch (ParseException e) { + System.out.println("Loi dinh dang ngay thang!"); + } + + return date; + } + + // hien thi ra tung nguoi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + dateToString(ngaySinh)); + System.out.println("\tNghe nghiep: " + ngheNghiep); + } + + // ham chuyen dinh dang tu date sang String + private String dateToString(Date date) { + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + String strDate = sdf.format(date); + + return strDate; + } + + // ham lay thong tin ve ngay sinh + public Date getNgaySinh() { + return ngaySinh; + } +} diff --git a/Bai5/Bai5/src/Testing/Test.java b/Bai5/Bai5/src/Testing/Test.java new file mode 100644 index 0000000..d765353 --- /dev/null +++ b/Bai5/Bai5/src/Testing/Test.java @@ -0,0 +1,20 @@ +package Testing; + +import java.util.Scanner; + +import Class.KhuPho; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + KhuPho qlkp = new KhuPho(); + + qlkp.nhapDanhSach(sc); + + System.out.println("Danh sach ho dan co nguoi 80 tuoi la:"); + qlkp.timKiemThongTin(); + } + +} diff --git a/Bai6/Bai6/.classpath b/Bai6/Bai6/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai6/Bai6/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai6/Bai6/.project b/Bai6/Bai6/.project new file mode 100644 index 0000000..c3c00cd --- /dev/null +++ b/Bai6/Bai6/.project @@ -0,0 +1,28 @@ + + + Bai6 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272597 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs b/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai6/Bai6/bin/Class/KhachSan.class b/Bai6/Bai6/bin/Class/KhachSan.class new file mode 100644 index 0000000000000000000000000000000000000000..246c68af5ae725767aa33238c68dbf2544c3e579 GIT binary patch literal 2154 zcmZ`)ZC4vb7`>AOHiU&jkXC4EW3e^?+Vss zswV68^!2JNSBugy5E1CREjMMlCY?(9#>#E0>jHxX{h{I8we%IwlUoJ5?q>zM zigv}3e#5f_PCjiSTg`*Th+nl?PhUGN z7Ee;9U$xe?7^F!8$@VRZd1^rsIAUT1M@e0-u2Pp|tLQexvZ-Z?wnpXlB~b`W;#B3v zv~(zVxhill2-mt6%hGWyk9oTAJYFzxVqZUsTXo-BH*pe4W_KG*5Ol?M)AOF~_(k8d zh|=O{8%~pkqS;K2aa>ZKtAj zIEM=c&I|PKwJD%);ze8(FdXZSpH~p)j}zU{R5Cw$M%s1hbkysDTQnrV&py&`aE&%Q0Rs|~xhYI#vi(eJvs3LxQE8`R-4 zUQ=#5qu#EWcpZ6KQ*LZn4m*2<2Kx`W0FDx0rv(!=Nh+5yt77K_PPLn1N38$FP?7T{ z-qf1-Zfn1R;{Jn4+r)4aJ!)7mv54b=iAqYBlI_HJ29`_=VVJI~m)X@;#(kDzLv{BB zgu@@}6t+N5(U;}5S-BCMjRRHNa!OTu$DhjXWfQAltD?4VdD3@1W!gX(ogyEsXS-2> zZGf(h@0nuftBKoKqhzZ0Pxifa(PUMHw6}v84|Bj|r$~jpVd5h&y-}6*ISoT+@u)@V zjcSR^TbIJL!r3(Ov36m_@~39!^xBq*yK2qkTG5@W$gM!zPfdJ=&jq^q;hHVym9W~j z(?nF!eE1q)@HJL+8(!I(vDFpRqb|-G&EX45ri`4ym-vd$VeV7p+hpw3 RGKz4EzHqO|B8fq|&PSYKAEbplTz(GE&A=LMAts=#|AaJ-#*;MWvV#qXUToNUAKYuR$x^88v( zAzt&GfnMbmM(=sP7v5JG$t>?GM7M%{H;EBUnizwrFj@3`x70bui=WB-eTFQ%H z!9)zBa#}KBATB4%L;^_#)2}Tdq33@3wNwyOQ8F6R+b+0&gH= z;7vjw;_5{^bPr4{!zM35Csdf}1NMUK4tWg8rt2K!;<%wOl_)W$)ebD5g|Na_uwf-} z6K@&FQmfsbwlncI)|g^bT+#PA3<<{DxMScQg^Sw7a0({g#kzvwyFZ2nalzsh#9+fj z4)<7O(MaVKrZdZD$&P~+PxXOI!&ptBY{QCUlkxg;_Q{c0Tt76i1vX4lT<3$1?ghrB zDAKMn(SDR+n5_O}-E;j)-8(9YFkdk77^Z!_f^d3cx<6CxQ;_)z%+t?FdBy1s*|9`-=tGQwMWVXk6rK7>* zCd)ymRdpYEGLYj(-@{E|lU>bz;2$!Ah|CF35t$Obb4Iw2@&$*R>o{+>xGU~4`w$bq z>t`3ZCTRvfh++~Kd6MURgcPQ@i-T#d;^1e7GPqmfz+UNM#$M=R&R*=|vOOQ|V$q(9 zb&)>ty`QBM31G&)NsD9Ktn#i%|> zk}N+Iv((U5%y*^-p%7|Ht_)-5uK7z7@+)#d`Nyf_2h2hn*fOJqS>(_`I)J?BUDPif{UgbPrBnae{i5ctLzo+`uAMafcJ| z4B4Uj?i|;5AL|2LS?+=>COCfOAp&U-=_2VKN$=I>aFIVYjvO1Oe|yDv{aoYk^sCx` D3oBo0 literal 0 HcmV?d00001 diff --git a/Bai6/Bai6/bin/Class/Nguoi.class b/Bai6/Bai6/bin/Class/Nguoi.class new file mode 100644 index 0000000000000000000000000000000000000000..b25d26a6c5518599f89000070ba13df16130a801 GIT binary patch literal 2103 zcmZ`)ZBrXn6n-uQHl#~wDK7;}8z@o;fz*~lC0J{DvDhR<6H&ysCD|rR!){DAPWkFT z@K^Z7ajYX@#?JTy{88$2?uM5Dg_*tga?X9ubIy70;h%s1`WwI;d;@I?mzK*`t(M3X z>z-pEq;O@|`q4_1Ew`9>zO!rReT9yam$O}k-qeXL>sKAOm{bV6MQcCnxFuc<>~-HM zCsr)qrZu#j&a5b?b%o9)$94Qi3hk3qn_}?_b_DI{F>wi|LQl$Z?M!`d$FAnAow6MUG;z`*em8?2Vk zn%UM~GK_JB%Uu~pik7^nZ@Y`p2qrLT;EuvIUE|g(CZ-T$A1Z=E*b8!<+KeEMSpzc) zS2e_G&L$GLE4{K``BG+uzR9Wc1qB`6w*T6^Ymrl{=Mp{;Wq?l^;O=k_>M=(gbKPg?X|)Sg&RR87xJWN z6^l50%B2;H4&7Pb%D+rglJWu!e9@{n{RRzeQBEf<4|>y6a%?wOa*niY;A@3J?WNy# z@P41vopQmhhVd;s+x7HVjN4d^U>lZ+9k3ytR;6OQ1%;WnclKS@9+Aul zhVdcm+QwfFnsX8*Fd&eshTLVt=B)f$tkAkoA$F7#Ic{ za9R!Jz%bN+8yHT+(5oB%fMn)z4-0sPho?lAYNn;|1D2Y#OmNi#B!{72Ni0yQNEvjx KNTF5jRr?=g3A8-` literal 0 HcmV?d00001 diff --git a/Bai6/Bai6/bin/Testing/Test.class b/Bai6/Bai6/bin/Testing/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..69991530baf0b373be1a9fcf3fdf783e52fca7a5 GIT binary patch literal 1150 zcmZuwYflqF6g^W4+m;ndc`7IiinhEeh!0*xX+0TrpN3^a7q`2$-4gvrew7bx zB8fl1A7wn#qJWT1X7wYC};=>=mo3l+wM_P?HYmt(PMcclaA!s z&cU%|`T`v*wrl$-fwp*JPav4~4y_2<5Z2L-4uS5R?ONNl(t%Ye$OFd`h~+#}I(xEW zEBpK~=ojs(Kv(W^&1L2*N!t||h=0so)Xw`A!dg!3Y3LE?X*z1Y?IiQ2bX}_wMlbp` z^j!g*|628}l8ylk3ItTr{#HucOJ?12&1Y6imX;%k;*!; z=|5T(1xX!`F(;t8))zmkVmaWfh9?4p|4(AQW;=&gC4{G(?&@mFD0uEs6OQ3Xg=ikn z6{9nXokbl>;ABGzbAgaK ds; + + // phuong thuc + // ham khoi tao + public KhachSan() { + ds = new ArrayList(10); + } + + // ham them khach tro vao khach san + public void themKhachTro(KhachTro kt) { + ds.add(kt); + } + + // ham nhap danh sach + public void nhapDanhSach(Scanner sc) { + KhachTro khach; + + System.out.print("Nhap vao so luong khach: "); + int n = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap vao thong tin khach tro:"); + for (int i = 0; i < n; i++) { + System.out.println("Khach tro thu " + (i + 1) + " la:"); + khach = new KhachTro(); + khach.nhapThongTin(sc); + themKhachTro(khach); + } + } + + // ham hien thi + public void hienThiDanhSach() { + for (KhachTro khach : ds) { + khach.hienThiThongTin(); + } + } + + // ham tinh tien + public double tinhTien(int CMND) { + double tien = 0; + + for (KhachTro khach : ds) { + if (khach.getCMND() == CMND) { + tien = khach.getSoNgayTro() * khach.getGiaPhong(); + } + } + + return tien; + } +} diff --git a/Bai6/Bai6/src/Class/KhachTro.java b/Bai6/Bai6/src/Class/KhachTro.java new file mode 100644 index 0000000..d49a4a0 --- /dev/null +++ b/Bai6/Bai6/src/Class/KhachTro.java @@ -0,0 +1,58 @@ +package Class; + +import java.util.Scanner; + +public class KhachTro extends Nguoi { + // thuoc tinh + private int soNgayTro; + private String loaiPhong; + private double giaPhong; + + // phuong thuc + // ham khoi tao khong doi so + public KhachTro() { + + } + + // ham khoi tao co doi so + public KhachTro(String hoTen, int CMND, int soNgayTro, String loaiPhong, double giaPhong) { + this.hoTen = hoTen; + this.CMND = CMND; + this.soNgayTro = soNgayTro; + this.loaiPhong = loaiPhong; + this.giaPhong = giaPhong; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + + System.out.print("\tNhap so ngay tro: "); + soNgayTro = sc.nextInt(); + sc.nextLine(); + System.out.print("\tNhap loai phong: "); + loaiPhong = sc.nextLine(); + System.out.print("\tNhap gia phong: "); + giaPhong = sc.nextDouble(); + sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + + System.out.println("\tSo ngay tro: " + soNgayTro); + System.out.println("\tLoai phong: " + loaiPhong); + System.out.println("\tGia phong: " + giaPhong); + } + + // ham lay ra thong tin so ngay tro + public int getSoNgayTro() { + return soNgayTro; + } + + // ham lay thong tin gia phong + public double getGiaPhong() { + return giaPhong; + } +} diff --git a/Bai6/Bai6/src/Class/Nguoi.java b/Bai6/Bai6/src/Class/Nguoi.java new file mode 100644 index 0000000..ce4cf62 --- /dev/null +++ b/Bai6/Bai6/src/Class/Nguoi.java @@ -0,0 +1,62 @@ +package Class; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class Nguoi { + // thuoc tinh + protected String hoTen; + protected Date ngaySinh; + protected int CMND; + + // phuong thuc + // ham khoi tao khong doi so + public Nguoi() { + + } + + // ham khoi tao co doi so + public Nguoi(String hoTen, Date ngaySinh, int CMND) { + this.hoTen = hoTen; + this.ngaySinh = ngaySinh; + this.CMND = CMND; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + System.out.print("\tNhap ngay sinh: "); + String strDate = sc.nextLine(); + ngaySinh = strToDate(strDate); + System.out.print("\tNhap CMND: "); + CMND = sc.nextInt(); + } + + private Date strToDate(String strDate) { + Date date = null; + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + try { + date = sdf.parse(strDate); + } catch (ParseException e) { + System.out.println("Loi dinh dang ngay thang!"); + } + + return date; + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + ngaySinh); + System.out.println("\tCMND: " + CMND); + } + + // ham lay ra thong tin CMND + public int getCMND() { + return CMND; + } +} diff --git a/Bai6/Bai6/src/Testing/Test.java b/Bai6/Bai6/src/Testing/Test.java new file mode 100644 index 0000000..e9d494d --- /dev/null +++ b/Bai6/Bai6/src/Testing/Test.java @@ -0,0 +1,24 @@ +package Testing; + +import java.util.Scanner; + +import Class.KhachSan; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + KhachSan ql = new KhachSan(); + + ql.nhapDanhSach(sc); + + System.out.print("Nhap vao khach tro can tinh tien: "); + int cmnd = sc.nextInt(); + + System.out.println("==> Tong tien la: " + ql.tinhTien(cmnd)); + + sc.close(); + } + +} diff --git a/Bai7/Bai7/.classpath b/Bai7/Bai7/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai7/Bai7/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai7/Bai7/.project b/Bai7/Bai7/.project new file mode 100644 index 0000000..35ffd2f --- /dev/null +++ b/Bai7/Bai7/.project @@ -0,0 +1,28 @@ + + + Bai7 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272605 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs b/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai7/Bai7/bin/Class/HocSinh.class b/Bai7/Bai7/bin/Class/HocSinh.class new file mode 100644 index 0000000000000000000000000000000000000000..5f2738ff4796676658cfba07824b3d3130b6d767 GIT binary patch literal 1524 zcmbVMU2hXd6g}fOUfWC(u)!pzPzNZ)>m+U=q-_kLC44p^1Z*PlxHv2Cg0pMc>#BL{ zQy=t!h2$`a!Fvkb3Kde5f$__Q0&E+kW6j z>wL6O-c?9$gnMol6PVJ-AgeI5zF)s;5nU!7Y40{ zA1D-twEB_XuGX7Q5V+l1c~>$oX6Y| zt2>l9qR_6hUrS?wMagV4W{JgED`jD0(LzNbZ{R-l*I2?bbLt2LF+Zc3aQhlJEPSJI z#z2fy*SLulg>>Nl5=p_R(?a>A%xSDLpO}^?Q}V**S}Be16sCvPgV?5!=&?)kF~)c( z)^x`6-Js$5ALSI)?r7AIwQ!dO857L(-Mzlw-gCQY{Ky8(Y{h!4V?$bOIg52X(0GVP zymUGpH`r5H`kVqM@)_dR1mcOtPey_$jGJ8)-_m$0!dgbyc96z1Da+dzH2naxqw zsg@g&phC7D_Pb5@p)W13*+MdF%aR%9*=iG<#|b2)^SDb$- zk&Sq*+La@G`4{GM*9R!ul>w?GCFfhm=UF*_dwd>adYRb31xCF{6)urSiMx3Y*AB-{{CX--6Fckd8 N*yG93 z$5Id!IKOZFWTfkcT}?mR+c(RuK&a*vO;P`&Sz9`d?QJxtEfS>&1g12EFe-P`8We=(ZdOACqXL>; zGaAL3V^@n7i->j8cqJCfhHab8jEpjmD+(?Tu~#^3x#oce9dQ=zv`OTY55aQM+horr zho*6m3FBRXiAbKA^qQl)roFDKxQh1_TobtHaX###VF?NLr6Hp*>>0%;N-CC-Qm`U$ z!3!~nS;H#QvUlc7SMn|}xs*7~PZ;mh+eaqbthd-_2~OaqMhSf&5NWy1q9eO4uy_`Z zx4RI=8fo%lQXKjVs$*Rj2(-#9cEI|CUW$l0WCjKI1m?VATmnxQtb<0~ls8*W^T2S! zpuE&dC6&vi4*5?-1`njX5_0!Y!-hm0Y8cIy8O9@aIqO(@g*E9F>RtCrbZgwkCI6pj zcr0mFJeuo#FP{p`^wV$4IFDYI&4z0^6i2Y)u`trA{3vkAujEXe)TgUwD?KuD!;k=t2jJ$>k1`1R&4Xd6vgqGP!b$ z8$=|3z1_DO0Jq@rGtcj30@4XB&Y8G?Ygpu{xr*D|NfLBFT@UCQ?%*!L%oEf);RX1g zbEOOKH(JZ0<0AJ4nce7z$GD$Q5!1)HUopNOlz28f*jjnzIYi0M6S_$D=e$NG7;c#y zuafgLIlGQ4Y?lOb%MaWG68F+`4AJ5#%LveG3R&bBZ<^;ko{{5idd?#7uWSQFpkPNq zLE&)W_KEzv@p(@bKhs<`AWM*MP}+@td5o`;e_*nMuRHjjs825T{EJuzmEnu3e=*bZ z=!+rhHT(|2+{Fz-e@YB}k!5=#vskt-GPz1TA!3+$#f`7hQSZn51J0qI^FE%R;T(J0 MdGk!?x|ibMKd^?qYXATM literal 0 HcmV?d00001 diff --git a/Bai7/Bai7/bin/Class/QLHS.class b/Bai7/Bai7/bin/Class/QLHS.class new file mode 100644 index 0000000000000000000000000000000000000000..3e2954f68e4ba07855170b9a16000f60150b3109 GIT binary patch literal 2517 zcmZ`*TUQfT6#h;Um=Fe#Ab26#RI3f)<`tDh1f`bL5TrpY_T~_#%xIXw$;67i+S>cQ z4_&K$s!u-m7FO$8U48bcf1zvjZ?yJ1lYs=Z4>>t!pL6#9_P4)%lKcPu_B((h_*y|g zAabUtl}dxt*@?V@kieEJ+I4NPs9B4HQ}b8!f-4YOC>bSz&aAgpcFp48nB!;*l7AX-#3A)=s7 zpyLtYB4|asJQC%dM5br92?ASHG@wzSEo)kOuDmp_J2TpRk#M3}yPy?kHOG`|-xzWY zlj*2FDw(+iqJ&9ZbSC9`<~`xWflP=@?U$<>!sJc$Iu+htb7FNJ9jo_9>k z&AX1SEv3Rp3dC{@6~C_8@sb@cmThY>ZrFu*iNp`bBk03`g8nsfH#$%;hywx*%hKnj z92vs276~zeLpY+~ut0mQK7Ix&j$%kavGf~mM!H~eGhrMT=<`syhJ@pqR=i-?>#*Xk zBh3q>Cte~y!xH7Nij)MScwmZ_f|CNL!MxejG=4*WXuMc@Mt6~y4 zfv{^=&r_?3hr^~6oEK=>&?FH|p+ydP6*JgFxk?GmNCIa}D?-)Js@Q>@lw7I6a@O_T znw$iL#ZQJGlkW4bR=7GzAJx`qGfdr@G0ZhpN{zp);<7AYsAS$`H@0G4MFC_hxTt%A z*uYu!c}Pi+uc%l=gv$4wuHmG`HJ8qr`clo(mB>6qny0H)TvbuT68SP+-O*gzk&WW> z<#kHNx2Kw6p=52<@YE9E@=>>)lZK}#bs!E0sjRomPLUJ*W1@wp7$$k17v)C7xi zjO6XIQ_#oB?Ab$v`Ao+aqTj45zus7!;OiME@;|OsEM3bvfllRa% zwGq0r?DPDjsHFj2udp1Fsqxm8S0_VMPk$-W9M+zyG((5^cV?n`Jv$Rv{t z4yF-iA}xr~whP_ZjS~bkMmT4&7w2f3!9EZAkt(Ql=ofGi&k^z%Z_6YC{GPxZF46yX zz824O7QzdR(Sg7Nx^7S)6h60t^mD|E>ovK`YtaaW;@sWpA+CIi7#IlW5lNAVh zm^&rg{0l+0N%t+bfej?Q1P=HKe8Wr9>42X=?k-~eYw#y~DVR^IcsbL#;lcf@Ms5}E zFeQ^>*ff9ThtW^KvQMhS4y?l+z!wC`pI@~3GLe$lDnT|Q*zzmKn(p1LnR^Y!?1Q@H!A$ZwHZ<+&*JV8 zZwPh1zKjNr@EHb6-JAu&t8pP2#xkEu9qw|_AX$akBMnK0WGfH`!p)T}E~VW_AdOKC zBmW34pZkGbGcbm6hKK?kZ9@t#cOdIwK&Upa6?6>awi17bVItErMG@a+(2Fkj{oKdW zep$yP5^9+;U}BmIkq)o#a_N-0H}4IqbiOk z49ka3D66L9S*9_n07?dzTtI;x6 l*61H7V7#TtZ1dtJcIeFj#b2RFs?wCbi`T6p_b3vNo%Z literal 0 HcmV?d00001 diff --git a/Bai7/Bai7/src/Class/HocSinh.java b/Bai7/Bai7/src/Class/HocSinh.java new file mode 100644 index 0000000..bb12ffd --- /dev/null +++ b/Bai7/Bai7/src/Class/HocSinh.java @@ -0,0 +1,52 @@ +package Class; + +import java.util.Scanner; + +public class HocSinh extends Nguoi { + // thuoc tinh + private String lop; + private String khoHoc; + private String kyHoc; + + // phuong thuc + // ham khoi tao khong doi so + public HocSinh() { + + } + + // ham khoi tao co doi so + public HocSinh(String hoTen, String lop, String khoaHoc, String kyHoc) { + this.hoTen = hoTen; + this.lop = lop; + this.khoHoc = khoaHoc; + this.kyHoc = kyHoc; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + + System.out.print("\tNhap lop: "); + lop = sc.nextLine(); + + System.out.print("\tNhap khoa hoc: "); + khoHoc = sc.nextLine(); + + System.out.print("\tNhap ky hoc: "); + kyHoc = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + + System.out.println("\tLop: " + lop); + System.out.println("\tKhoa hoc: " + khoHoc); + System.out.println("\tKy hoc: " + kyHoc); + } + + // ham lay ra thong tin ve lop + public String getLop() { + return lop; + } +} diff --git a/Bai7/Bai7/src/Class/Nguoi.java b/Bai7/Bai7/src/Class/Nguoi.java new file mode 100644 index 0000000..d84603f --- /dev/null +++ b/Bai7/Bai7/src/Class/Nguoi.java @@ -0,0 +1,70 @@ +package Class; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class Nguoi { + // thuoc tinh + protected String hoTen; + protected Date ngaySinh; + protected String queQuan; + + // phuong thuc + // ham khoi tao khong doi so + public Nguoi() { + + } + + // ham khoi tao co doi so + public Nguoi(String hoTen, Date ngaySinh, String queQuan) { + this.hoTen = hoTen; + this.ngaySinh = ngaySinh; + this.queQuan = queQuan; + } + + // ham nhap vao thong tin + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + + System.out.print("\tNhap ngay sinh: "); + String strDate = sc.nextLine(); + ngaySinh = strToDate(strDate); + + System.out.print("\tNhap que quan: "); + queQuan = sc.nextLine(); + } + + private Date strToDate(String strDate) { + Date date = null; + + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + try { + date = sdf.parse(strDate); + } catch (ParseException e) { + System.out.println("Loi dinh dang ngay thang!"); + } + + return date; + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + ngaySinh); + System.out.println("\tQue quan: " + queQuan); + } + + // ham lay ra que quan + public String getQueQuan() { + return queQuan; + } + + // ham lay ra thong tin ve ngay sinh + public Date getNgaySinh() { + return ngaySinh; + } +} diff --git a/Bai7/Bai7/src/Class/QLHS.java b/Bai7/Bai7/src/Class/QLHS.java new file mode 100644 index 0000000..95a4c52 --- /dev/null +++ b/Bai7/Bai7/src/Class/QLHS.java @@ -0,0 +1,64 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QLHS { + // thuoc tinh + private ArrayList dshs; + + // phuong thuc + // ham khoi tao + public QLHS() { + dshs = new ArrayList(10); + } + + // ham them hoc sinh + public void themHS(HocSinh hs) { + dshs.add(hs); + } + + // ham nhap danh sach + public void nhapDanhSachHS(Scanner sc) { + HocSinh hs; + + System.out.print("Nhap vao so luong hoc sinh: "); + int n = sc.nextInt(); + + System.out.println("Nhap thong tin cho hoc sinh trong danh sach:"); + for (int i = 0; i < n; i++) { + System.out.println("\tHoc sinh thu " + (i + 1) + " la:"); + + hs = new HocSinh(); + hs.nhapThongTin(sc); + + themHS(hs); + } + } + + // ham hien thi + public void hienThiDanhSach() { + int n = dshs.size(); + for (int i = 0; i < n; i++) { + System.out.println("\tHoc sinh thu " + (i + 1) + " la:"); + dshs.get(i).hienThiThongTin(); + } + } + + // ham tim kiem thong tin + public void timKiemThongTin(int nam, String que) { + for (HocSinh hs : dshs) { + if ((hs.getNgaySinh().getYear() + 1900 == nam) && (que.equals(hs.getQueQuan()))) { + hs.hienThiThongTin(); + } + } + } + + public void timKiemThongTin(String lop) { + for (HocSinh hs : dshs) { + if (lop.equals(hs.getLop())) { + hs.hienThiThongTin(); + } + } + } +} diff --git a/Bai7/Bai7/src/Testing/Test.java b/Bai7/Bai7/src/Testing/Test.java new file mode 100644 index 0000000..1f5515e --- /dev/null +++ b/Bai7/Bai7/src/Testing/Test.java @@ -0,0 +1,25 @@ +package Testing; + +import java.util.Scanner; + +import Class.QLHS; + +public class Test { + + public static void main(String[] args) { + Scanner sc=new Scanner(System.in); + + QLHS list=new QLHS(); + + list.nhapDanhSachHS(sc); + + System.out.print("Nhung hoc sinh sinh nam 1985 va que Thai Nguyen la:"); + list.timKiemThongTin(1985, "Thai Nguyen"); + + System.out.println("Nhung hoc sinh hoc lop 10A1 la:"); + list.timKiemThongTin("10A1"); + + sc.close(); + } + +} diff --git a/Bai8/Bai8/.classpath b/Bai8/Bai8/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai8/Bai8/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai8/Bai8/.project b/Bai8/Bai8/.project new file mode 100644 index 0000000..1279f85 --- /dev/null +++ b/Bai8/Bai8/.project @@ -0,0 +1,28 @@ + + + Bai8 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272615 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs b/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai8/Bai8/bin/Class/CBGV.class b/Bai8/Bai8/bin/Class/CBGV.class new file mode 100644 index 0000000000000000000000000000000000000000..c4179f3f7f9e612afcfedb2b49396cb016836029 GIT binary patch literal 1419 zcmZuwYg5xe6g^v@O-evS9zIa3qLvn@f{L_0kXC$EL|cn|3? z4J0uvaExKrX1Kp=wW{W>YYB{({krMa%$6h1UE^S2J8c1@+y__S(X-8F)n@&w;|WZq z%WuthW-bgIH&>~fo@ccRb2V9R%D@Rs=s1bf37irbQ-QAOHFA{??ZDbMa0W9(>4$7$ zGRoulxviGt1(l#>nfnC|=ZH?MhCh9!Z~sEJ6rd`f1zVIYCHhFfGc@=84;-)#dL;xa04Ku264)~>VL|FBI# zZO8Jew)0mO$^Lx<_jA6zbJS}q<+=ns;82PNij&V)$Ixxy~WBkBS6@=p$=ZT_Vf~!n$ zz;ZHnJCi-YE3*78*SV}TzG1Zw zX-SovV7V!bU>cM1mGQgCCzZhr=kgp@a31$be~GW5hFJxDDuUOAPM|2@4#5jKEZrtP zvQgQfLl*84?hmZ(jISS{B=K~x(ZSOWp8s`hMULeoj#rUm<%pviIaYg)ep{!NC}{%7 y;4HGZg?Wz70&FZEV&3U7Ut?Uve2$Gp(tXA1C!&u*N*7ngr9+p8dY89V)SEwx0UP=N literal 0 HcmV?d00001 diff --git a/Bai8/Bai8/bin/Class/Nguoi.class b/Bai8/Bai8/bin/Class/Nguoi.class new file mode 100644 index 0000000000000000000000000000000000000000..1aefa9149b0411bf3a2dc129ce8e1230f5c6ecfc GIT binary patch literal 1368 zcma)5ZBNrs6n-unv@1nmZ-Bg5RB$UV14NV!Q9%)9nUXC_{8&b_mXvmEt&tCY@gHeq zB%1gG{87ep+p!JD2eV}No}PQ3^E}Tv_xGP4zW}TwFQAWMaM#irjZC5HIi`Rx!^nyD zQOj7GUCq2ZI?*dGL%-pabekcX@8pVZ-L$JY2GOo+=S9;t7=$xVKlC&@Ik08grn}7$ zN~OyT;a%rgmk`2`j0hx#;k;?<1@H7oua~qVOXt{5MYGCU-Q;oWW7sv!2E$OkizJoY zO!X4^pD*ch1PpN*{TSf8qzob0jmr=*z#!X(Rx25fT`id;BiSnCxu%sVRy5nz>p6}x zg&6_U*UT!OH(dQx#vLdm+wsV^L_o@PGVjSOmn_q@)0~LA47VZ$s-zf>;_7x*k#HaL z0_GTEzQxzC$asJhwV}pQ2=)f~>9PbBivkuHMtz8G&N7y;%v+^@a=G(lLMq+sn1~g+ z9WdivRT|XRtRiBKlm?%v!^#=8I7=e?8WrLjz;sum4hHhzwN~aa(qrw5;pKu#x|bOL}|5}ZXYu&-K4%pOA9*3AzsMX@#VWtFtyz6 zmoi>)Qw85t%NFsP+8-%&%YH-8BXZcKSSmVRy`t}#d}1a4%`9_Kn5Ah7(W?p}%!iA1 zVLn>^N`vLEq!ALG8>HwVt&G-w^%C+|+VtTT{Y$h0Lv(qVet;Yt!U#qw;s8chcbu&5QH literal 0 HcmV?d00001 diff --git a/Bai8/Bai8/bin/Class/QuanLy.class b/Bai8/Bai8/bin/Class/QuanLy.class new file mode 100644 index 0000000000000000000000000000000000000000..4e559c059ec46151a079b738c9b4fe0d2835d2a6 GIT binary patch literal 2041 zcmZ`(TUQ%Z7~Llc9Tca#8lOIge1bN_|!`WM7~CKD2BeaOk2%eTM%?Qfs+K2TWBuJ!aGv8QRroF0R1lLGd&*i8@v{q)5Mv2(IKucD)mTYR;48W;X(2rJhtB}&O z1%ZA)+7mLx5X*29vX~d~vVxZ`H6V3Tc8!vTn}{;GU12Z$HkfvN%P}oCY9)AH+%hIg?> z59&uphQ(%HrIY@{$H$_q>-1WrsFTMcHe~Fkz+`j(>-zjJhK$_OaL<#$wQJ`Uqy*H) zy-=}@4mqSX?Ba%RnwjlQR05JS9+xp(eKtVyCx2nOWBUHK_l240}9K|Y2| zBwrE!E1U(;${8OvNZs4HvVsu5fbiHUw6QaE?scoD=>7%0KYHi;ICgqS8c%khhqHdJ zX|*T};Car3Y@m<0#4G`>sbfE*cf5+>-3F5C?Sz@X*F)*Ao%B%{gX@S8N09#wAMbDG zZ6V(NPZ$lysu(BctpyIR@5+@#6>kM+Lys}b*%=o1!b_)E=?jJKSFsv?uZm<9cX{Rv z+k2R7qeAT29Gc|S>HSA*_ACmhj5o9$1{%_zTe9Rmpn8zpl3gJ^m_9Af311$=K!UshN z$PxE1n)3x`vWcTo$}04Y$LN{(73}pN*iN#LL(X_JzB~V`QA3#MK$P{w*p(>RjyGvN z>htX5DTm30$D~IxX-AMu=#vK^Wq~qWj?yHL{1(K09&?m?cra9FvN>5r<>t5FL*d7v zT=zKr+2GXgX%uJfY395|<>J(O#^V+7N|bxjN#M>2WZ?rOAsGfehGEH&79_)9jp6{$ Ke97|xeDyELx~3ig literal 0 HcmV?d00001 diff --git a/Bai8/Bai8/bin/Testing/Test.class b/Bai8/Bai8/bin/Testing/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..a72e60052591cf5ba170c9f909d75da58c0f7eb7 GIT binary patch literal 916 zcmZuvYikox5Ir|dvdwl)^J-14)~&B5P0aeJTAMaSS_E-@krF6^aI-GSmVLy12>mAF zAF>}3u;35yM~QPc)kMgbJ3Dvoo;l~t{QCXlCx9*NOGq#%M`jROZch_YLXshO!asA( z=5+U_dtw?PLweV8t+2%~SE+Uwk_X;LQ^p)J3Q|ZjEb5kPzK)!(=^yc~Z88*e&){~4 z`oBO%X_j|)*~*;?D+u50=k6tN_s z^dI5&X%L!@f@NH0NC?oSF{I^bFWf;C5~|6ari>g`1oh=2@Km=SxjmKSs$EYtJk^do%3FKtwo2xhk!tfD8CBFIY%&yMi%94cq=Gu`GDri_ z#TIs4FpS6h&*Jp658uAfQb1_Cuiyb5(odn~ytGV*=2JPWc7$b*6g(F5P8qfr(3F$h z@6kYuGv-G22L_d97(%5_wpfE{YiSMSwio$^`P>oz?pm>S046<0H8}aj3f)t?jbL5WCP#B@CpJVlSgln(r zwISBdaHDW%h)TVL#t`@DYHQMCEyj?kheET>qD ds; + + // phuong thuc + // ham khoi tao + public QuanLy() { + ds = new ArrayList(10); + } + + // ham them can bo vao danh sach + public void themCBGV(CBGV canBo) { + ds.add(canBo); + } + + // ham nhap vao danh sach + public void nhapDanhSach(Scanner sc) { + CBGV canBo; + + System.out.print("Nhap vao so luong can bo: "); + int n = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap vao danh sach:"); + for (int i = 0; i < n; i++) { + System.out.println("Can bo thu " + (i + 1) + " la:"); + canBo = new CBGV(); + canBo.nhapThongTin(sc); + themCBGV(canBo); + } + } + + // ham hien thi danh sach + public void hienThiDanhSach() { + for (CBGV cb : ds) { + cb.hienThiThongTin(); + } + } + + // ham tim kiem + public void timKiem(double luong) { + for (CBGV cb : ds) { + if (cb.getLuongThucLinh() >= luong) { + cb.hienThiThongTin(); + } + } + } +} diff --git a/Bai8/Bai8/src/Testing/Test.java b/Bai8/Bai8/src/Testing/Test.java new file mode 100644 index 0000000..c5c796d --- /dev/null +++ b/Bai8/Bai8/src/Testing/Test.java @@ -0,0 +1,22 @@ +package Testing; + +import java.util.Scanner; + +import Class.QuanLy; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QuanLy ql = new QuanLy(); + + ql.nhapDanhSach(sc); + + System.out.println("Danh sach nhung can bo co luong >= 8 trieu la:"); + ql.timKiem(8000000); + + sc.close(); + } + +} diff --git a/Bai9/Bai9/.classpath b/Bai9/Bai9/.classpath new file mode 100644 index 0000000..51a8bba --- /dev/null +++ b/Bai9/Bai9/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/Bai9/Bai9/.project b/Bai9/Bai9/.project new file mode 100644 index 0000000..b972449 --- /dev/null +++ b/Bai9/Bai9/.project @@ -0,0 +1,28 @@ + + + Bai9 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1671125272630 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs b/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ec1937b --- /dev/null +++ b/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai9/Bai9/bin/Class/QuanLy.class b/Bai9/Bai9/bin/Class/QuanLy.class new file mode 100644 index 0000000000000000000000000000000000000000..3c303c46c1414123d80ffe21fd0efd445bf61d0d GIT binary patch literal 1988 zcmZ`(U0WMP7(J7OZV1a)5NZpQShXf8kX8|uAW}dqHldV65d7+pY_m&~4Q@7A{JQd2 zc%xqR+OO~^&*S5Dul*bT1@X*gLjdc|?9A-E=RN1V@63~be*Xi&6u#CF5YQLPvQ|so zt4lj`pdlpCw=4H$sx0kN>h8|2QE&wU#hSoi#`{rst#ay??zE1GMU1%OQaaV%b3#e zia>w6QoaHmuVR`$*v2DwMM1F4D=Of19dBSpAgunVda-=*#3>hj_%LQk?L-vMP2}VB&Nmv>f_h3>CSiR zZid!h9Ts-!nyUHvdN-e#v{G5tQ32U@mJIi{v`I!?!_(=Oq-*f#9vlsy@(Q<8sXsbu zUehsLEfr*4$37ywhQ832cZ%*K9S8WFU1ZAIs>h5?%F7$%EfI+1s&%JeEL-Xw>1sX_ zlPVvcqwhh!pmbfmJN#-~1rSDvbG}|2ySTIDt$}Fr5PI?mJzIT|L-hTMfgio|gB*K2 zB%LR_(a+To_jJZH3K#J#zd{w*M_gc*0QVxvUoddJf#Jw_K6tno4vk*REXq>w| z^_jr8$A7i84S77{)S18plDLUDW;jzCnsrF~8U`_fFGx&yEGH2>rY%9TWDh+6j%k8g SX;}By!Bc;E>PsR9@YTO{53)i4 literal 0 HcmV?d00001 diff --git a/Bai9/Bai9/bin/Class/SinhVien.class b/Bai9/Bai9/bin/Class/SinhVien.class new file mode 100644 index 0000000000000000000000000000000000000000..3abe5550f1e33e043ee8328968abad25f5078bb2 GIT binary patch literal 1526 zcmbVL*-{!&5It8>mQ2(rB9e_P8Wxqrm`$>{WEaf>MO7Y0yd`773E#dT@Ay6^XE`3g9pZWsH3~YWuI~w)@vb=*%T#2bQDPAub}t3C zbhJ#YLfJaf*N=zn#>t^uYg&~ZSr3526%4-Y2$aQ&nyqvQS*#gY$5T$BS*uBVM_~Rm zN%{(GLuVDla|185Ca&WRyK2EJ1Fx0Reyw!H4j{*w2yXROyv0I-nHpUNpsvqGT#_1`53H~a8PkcE<8&d$O^dZ8jxkE%!^M{D0rhSKqbx~uQ zzywjl+=@x!M~E|pX+(9FB@d~cg_yb&l{uz1OLK~;&C;dD)MgP&-~ukT*?i_3#eDS} zE{$JrVK$X+fqcTsU+nr37`(gai4?IbIN4SO67M`{6@+h$31)_a{O)n7X m3%v0Hu}+|?eMD=Urq**<JSUBSV literal 0 HcmV?d00001 diff --git a/Bai9/Bai9/bin/Class/TheMuon.class b/Bai9/Bai9/bin/Class/TheMuon.class new file mode 100644 index 0000000000000000000000000000000000000000..131a56f3ff254668f95dd17fd7b41e95444399ab GIT binary patch literal 2328 zcmaJ?YgZFj6x}xlXA%b=5dq^XSRWw}gNWLK^@UKV1Zk6E?R!Y3$!Ic@CKD@t_t*HX z%XVp4tFG0x`n5l*?LKz`1hM7A+|6F_Bs6Z_wRoIn8MEnA`1PpHM`Zy6{}9Z z?Ry5I3j4#K3a(dObsbM(Z_AfU1+}PPdKG&;JRV$nXg{`d?ZB<&?%07dL({756`Qv9 zS#X`ULLxM(*E3zN8{V0g}xU{N4gkVSF0Y~c#7O1XI>)le8nkM2&Q ziMNOwk``rb(N>tTa1C!O#9BeK=!-xU&b*FcPgb>zOx#e2U%HsRIGLTCn4FN3+_DgZ zX=1iFMO7*+OwpW$dC7#KGf`u)BCQg0)&sp+Fok_2w7jL_c=trv8dy?D>LdjWJ6CY) zjhZ8z=KW^f4oobQSh<|d=dFo)@%A(V)K& z*ri8#YFV1cz~?&!s=LwvyLSJ!K*D+*V2ZtB)!l3Y(R$g!8u|^8*pRmGk=yOITPr(F z6IDJDEBL8~)M!f-4p!oD@W?_9b&dhM(Qv#n157XO)>ap5Mm&5A4K2sOXSZ;Om}s&; zV^YQ*^gw_)bh5oNySMhxDFrkC{eX$DS=QKs?WKaIJ)JVKE@!ge6qti=1^K&IkV7i} zgG}*PoPfZ3CMGr;sCQz<3x2yjN&dL6H2da2EB4l zaotNx4o-ge^K^-;;@X$lz=2=2*&%-8bO#O*?l2PES)mb613U@95q<@rM$0JI0RhMy zdx62s_zMhYvM-R_#v3FlV33wW?9E|%9wk;%V`oDDE;f;L077a&hagM_WXLi=mLDg& zFaOE2yqwRBZQ$f@NF~m7kj{*CaDgniOx>3s-{g;S$Y(O+8<-}y#P#J&Cad>1#o~4c zcf@UK2jxiy37jOE6tgwLfKQX~8Gg^=JkDVPX=ZPfb88HDI9r#H?FlEp6;2-SV1bmy zXOTff=#|8~I-H11y>2+aFdRwJh|0gj-3N*M2JS6qN$b7*Q}je418wb3xmUpTmA2lo!#aBl;%<}mm(;U=u0>c5|s^}pJT9thaGrizIpLg zcrn~TYv;w|@Z#pKiznelvV(6zk8NdzvELwpTU5qvMm~#sEJzh|I`&YxZZ~#?@9{&I dbdGB%{pYy(jO-&inbIF%f?g;4AGOs_{{n<6?JocT literal 0 HcmV?d00001 diff --git a/Bai9/Bai9/bin/Testing/Test.class b/Bai9/Bai9/bin/Testing/Test.class new file mode 100644 index 0000000000000000000000000000000000000000..b2afd4551f2713c465d311041c9e5c71da0befa3 GIT binary patch literal 915 zcmZuw*>2N76g`tBb>o^gOIreg;IbxdsM(jM;w2RllG&6fQpMB6jOwWzJ9vrIC%%b3 zBodYQ06q$F$7xBB@-la3?)aR0&$<5n=jSf~&v2k2!(enp6iffuQc**ep>V=S-10cx zee9nICuUeakiLxHFf7#@J%(&M_$qWPA#WguWrlTI`r<<}=!>w+`<`GZ*@45o9uK8D zUtDHmS4IqL_B>~c@CID^3|sXt_Kdp|hg4Rp(bG_5D5i-dmY&sdxbKTFk1{qjZ2VVn z=QN7Nz`z!+GGr9!<`hx});oWg#DpsNprxaLYpVF`43+xACyMw6>C^Uj6j`4W?%St2 zs>rM5mH`vnl=WRcJmkLH;f||1m_p6hNgb$C?-;m?d!%5Hkf5`wK2evKRjuFwLsP+- z5#gDUq}@mg-;6^(y&Cbrbdo@tu}cQ+>u6wC!wy3^6^PoL12oXYLk4ZAI6NiBMSZEc z{{&VISq2^{C#x>ebzOPcQ#a&oqU$O)CE61MPu07e;{_4z%v`(u^ zgC4BXYD^zcyh5iu*04@D>f`SOsX!a&C>))kG(p8aNA+leo9~;uW7N)YyL5kydUK3D zIzOHf)KUPQ2n@1z4HZ(xM3EdWqmGS~*qnmXkM^8MR#C$Xyd>%}4d*MoPCMDBOa`sL Dn2O9k literal 0 HcmV?d00001 diff --git a/Bai9/Bai9/src/Class/QuanLy.java b/Bai9/Bai9/src/Class/QuanLy.java new file mode 100644 index 0000000..d15ed92 --- /dev/null +++ b/Bai9/Bai9/src/Class/QuanLy.java @@ -0,0 +1,46 @@ +package Class; + +import java.util.ArrayList; +import java.util.Scanner; + +public class QuanLy { + // thuoc tinh + private ArrayList ds; + + // phuong thuc + // ham khoi tao khong doi so + public QuanLy() { + ds = new ArrayList(10); + } + + // ham them the muon vao danh sach + public void themTheMuon(TheMuon theMuon) { + ds.add(theMuon); + } + + // ham nhap vao danh sach + public void nhapDanhSach(Scanner sc) { + TheMuon theMuon; + + System.out.print("Nhap vao so luong the muon: "); + int n = sc.nextInt(); + sc.nextLine(); + + System.out.println("Nhap vao danh sach:"); + for (int i = 0; i < n; i++) { + System.out.println("The muon thu " + (i + 1) + " la:"); + theMuon = new TheMuon(); + theMuon.nhapThongTin(sc); + themTheMuon(theMuon); + } + } + + // ham hien thi danh sach + public void hienThiDanhSachTraCuoiThang() { + for (TheMuon the : ds) { + if (the.getHanTra().getDate() == 31 || the.getHanTra().getDate() == 30) { + the.hienThiThongTin(); + } + } + } +} diff --git a/Bai9/Bai9/src/Class/SinhVien.java b/Bai9/Bai9/src/Class/SinhVien.java new file mode 100644 index 0000000..3fdbd60 --- /dev/null +++ b/Bai9/Bai9/src/Class/SinhVien.java @@ -0,0 +1,48 @@ +package Class; + +import java.util.Scanner; + +public class SinhVien { + // thuoc tinh + protected String hoTen; + protected String maSV; + protected String ngaySinh; + protected String lop; + + // phuong thuc + // ham khoi tao khong doi so + public SinhVien() { + + } + + // ham khoi tao co doi so + public SinhVien(String hoTen, String maSV, String ngaySinh, String lop) { + this.hoTen = hoTen; + this.maSV = maSV; + this.ngaySinh = ngaySinh; + this.lop = lop; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + System.out.print("\tNhap ho ten: "); + hoTen = sc.nextLine(); + + System.out.print("\tNhap ma sinh vien: "); + maSV = sc.nextLine(); + + System.out.print("\tNhap ngay sinh: "); + ngaySinh = sc.nextLine(); + + System.out.print("\tNhap lop: "); + lop = sc.nextLine(); + } + + // ham hien thi + public void hienThiThongTin() { + System.out.println("\tHo ten: " + hoTen); + System.out.println("\tNgay sinh: " + ngaySinh); + System.out.println("\tMa sinh vien: " + maSV); + System.out.println("\tLop: " + lop); + } +} diff --git a/Bai9/Bai9/src/Class/TheMuon.java b/Bai9/Bai9/src/Class/TheMuon.java new file mode 100644 index 0000000..1ab7820 --- /dev/null +++ b/Bai9/Bai9/src/Class/TheMuon.java @@ -0,0 +1,75 @@ +package Class; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class TheMuon extends SinhVien { + // thuoc tinh + private int soMuon; + private Date ngayMuon; + private Date hanTra; + private String soHieu; + + // phuong thuc + // ham khoi tao khong doi so + public TheMuon() { + + } + + // ham khoi tao co doi so + public TheMuon(int soMuon, Date ngayMuon, String soHieu) { + this.soMuon = soMuon; + this.ngayMuon = ngayMuon; + this.soHieu = soHieu; + } + + // ham nhap + public void nhapThongTin(Scanner sc) { + super.nhapThongTin(sc); + + System.out.print("\tNhap so muon: "); + soMuon = sc.nextInt(); + sc.nextLine(); + + System.out.print("\tNhap ngay muon: "); + String strNgayMuon = sc.nextLine(); + ngayMuon = strToDate(strNgayMuon); + + String strNgayTra = "31-12-2020"; + hanTra = strToDate(strNgayTra); + + System.out.println("\tNhap so hieu: "); + soHieu = sc.nextLine(); + } + + private Date strToDate(String strNgayMuon) { + Date date = null; + + SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); + + try { + date = sdf.parse(strNgayMuon); + } catch (ParseException e) { + System.out.println("Loi dinh dang ngay thang!"); + } + + return date; + } + + // ham hien thi + public void hienThiThongTin() { + super.hienThiThongTin(); + + System.out.println("\tSo phieu muon: " + soMuon); + System.out.println("\tNgay muon: " + ngayMuon); + System.out.println("\tHan tra: " + hanTra); + System.out.println("\tSo hieu: " + soHieu); + } + + // ham lay ra thong tin ve han tra + public Date getHanTra() { + return hanTra; + } +} diff --git a/Bai9/Bai9/src/Testing/Test.java b/Bai9/Bai9/src/Testing/Test.java new file mode 100644 index 0000000..63eb244 --- /dev/null +++ b/Bai9/Bai9/src/Testing/Test.java @@ -0,0 +1,22 @@ +package Testing; + +import java.util.Scanner; + +import Class.QuanLy; + +public class Test { + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + QuanLy ql = new QuanLy(); + + ql.nhapDanhSach(sc); + + System.out.println("Danh sach sinh vien tra sach vao cuoi thang:"); + ql.hienThiDanhSachTraCuoiThang(); + + sc.close(); + } + +} diff --git a/README.md b/README.md deleted file mode 100644 index d8e4fba..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Bài tập về OOP - -[shareprogramming.net](https://shareprogramming.net/) \ No newline at end of file diff --git a/exercise_oop_account/Account.java b/exercise_oop_account/Account.java deleted file mode 100644 index 96b3f83..0000000 --- a/exercise_oop_account/Account.java +++ /dev/null @@ -1,41 +0,0 @@ -public class Account { - private int id; - private String name; - private int balance; - - public Account(int id, String name, int balance) { - this.id = id; - this.name = name; - this.balance = balance; - } - - public String getName() { - return name; - } - - public int getBalance() { - return balance; - } - - public void credit(int amount) { - this.balance += amount; - } - - public void debit(int amount) { - if (amount > this.balance) { - System.out.println("Thanh Toan khong thanh cong"); - } else { - this.balance -= amount; - } - } - - public void tranferTo(Account account, int amount) { - if (amount > this.balance) { - System.out.println("Chuyen tien khong thanh cong"); - } else { - // Tru tien tai khoan chuyen - this.balance -= amount; - account.credit(amount); - } - } -} diff --git a/exercise_oop_account/Main.java b/exercise_oop_account/Main.java deleted file mode 100644 index 1c15ee1..0000000 --- a/exercise_oop_account/Main.java +++ /dev/null @@ -1,35 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Account a = new Account(1, "A", 50); - Account b = new Account(1, "B", 10); - - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - - // Cong tien vao tai khoan - a.credit(30); - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - - // Tru tien vao tai khoan - a.debit(20); - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - - // Tru tien vao tai khoan khong hop le - a.debit(1000); - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - - // Chuyen tien cho b - a.tranferTo(b, 10); - System.out.println("Balance A: " + a.getBalance()); - System.out.println("Balance B: " + b.getBalance()); - System.out.println(); - } -} diff --git a/exercise_oop_composition_book_author/exercise_oop_composition_book_author.iml b/exercise_oop_composition_book_author/exercise_oop_composition_book_author.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_composition_book_author/exercise_oop_composition_book_author.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_composition_book_author/src/Author.java b/exercise_oop_composition_book_author/src/Author.java deleted file mode 100644 index 582797d..0000000 --- a/exercise_oop_composition_book_author/src/Author.java +++ /dev/null @@ -1,38 +0,0 @@ -public class Author { - private String name; - private String email; - private String gender; - private int age; - - public Author(String name, String email, String gender, int age) { - this.name = name; - this.email = email; - this.gender = gender; - this.age = age; - } - - public String getName() { - return name; - } - - public String getEmail() { - return email; - } - - public String getGender() { - return gender; - } - - public int getAge() { - return age; - } - - public String toString() { - return "Author{" + - "name='" + name + '\'' + - ", email='" + email + '\'' + - ", gender='" + gender + '\'' + - ", age=" + age + - '}'; - } -} diff --git a/exercise_oop_composition_book_author/src/Book.java b/exercise_oop_composition_book_author/src/Book.java deleted file mode 100644 index 8d3011a..0000000 --- a/exercise_oop_composition_book_author/src/Book.java +++ /dev/null @@ -1,39 +0,0 @@ - -public class Book { - private String name; - private Author author; - private double price; - private int count; - - public Book(String name, Author author, double price, int count) { - this.name = name; - this.author = author; - this.price = price; - this.count = count; - } - - public String getName() { - return name; - } - - public Author getAuthor() { - return author; - } - - public double getPrice() { - return price; - } - - public int count() { - return count; - } - - public String toString() { - return "Book{" + - "name='" + name + '\'' + - ", author=" + author.getName() + - ", price=" + price + - ", count=" + count + - '}'; - } -} diff --git a/exercise_oop_composition_book_author/src/Main.java b/exercise_oop_composition_book_author/src/Main.java deleted file mode 100644 index 27938f4..0000000 --- a/exercise_oop_composition_book_author/src/Main.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Author author = new Author("shareprogramming.net", "nthanhhai2909@gmail.com", "male", 23); - Book book = new Book("Java OOP", author, 10, 100); - System.out.println(book.toString()); - } -} diff --git a/exercise_oop_composition_student_address/exercise_oop_composition_student_address.iml b/exercise_oop_composition_student_address/exercise_oop_composition_student_address.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_composition_student_address/exercise_oop_composition_student_address.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_composition_student_address/src/Address.java b/exercise_oop_composition_student_address/src/Address.java deleted file mode 100644 index fe2232e..0000000 --- a/exercise_oop_composition_student_address/src/Address.java +++ /dev/null @@ -1,39 +0,0 @@ - -public class Address { - private String country; - private String city; - private String district; - private String street; - - public Address(String country, String city, String district, String street) { - this.country = country; - this.city = city; - this.district = district; - this.street = street; - } - - public String getCountry() { - return country; - } - - public String getCity() { - return city; - } - - public String getDistrict() { - return district; - } - - public String getStreet() { - return street; - } - - public String toString() { - return "Address{" + - "country='" + country + '\'' + - ", city='" + city + '\'' + - ", district='" + district + '\'' + - ", street='" + street + '\'' + - '}'; - } -} diff --git a/exercise_oop_composition_student_address/src/Main.java b/exercise_oop_composition_student_address/src/Main.java deleted file mode 100644 index 3b72307..0000000 --- a/exercise_oop_composition_student_address/src/Main.java +++ /dev/null @@ -1,13 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Address address = new Address("VN", "HCM", "Q7", "428 LE VAN LUONG"); - Student student = new Student(); - student.setName("HGA"); - student.setAddress(address); - student.setAge(23); - student.setScore(5); - System.out.println(student.toString()); - System.out.println("Xep loai: " + student.getRating()); - } -} diff --git a/exercise_oop_composition_student_address/src/Student.java b/exercise_oop_composition_student_address/src/Student.java deleted file mode 100644 index b2059e3..0000000 --- a/exercise_oop_composition_student_address/src/Student.java +++ /dev/null @@ -1,58 +0,0 @@ - -public class Student { - private String name; - private int age; - private double score; - private Address address; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public double getScore() { - return score; - } - - public void setScore(double score) { - this.score = score; - } - - public Address getAddress() { - return address; - } - - public void setAddress(Address address) { - this.address = address; - } - - public String getRating() { - if (this.score < 5.0) { - return "bad"; - } else if (this.score >= 5.0 && this.score < 8.0) { - return "medium"; - } else { - return "good"; - } - } - - public String toString() { - return "Student{" + - "name='" + name + '\'' + - ", age=" + age + - ", score=" + score + - ", address=" + address.toString() + - '}'; - } -} diff --git a/exercise_oop_date/exercise_oop_date.iml b/exercise_oop_date/exercise_oop_date.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_date/exercise_oop_date.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_date/src/Date.java b/exercise_oop_date/src/Date.java deleted file mode 100644 index 5098c1b..0000000 --- a/exercise_oop_date/src/Date.java +++ /dev/null @@ -1,56 +0,0 @@ - -public class Date { - private int day; - private int month; - private int year; - - public Date(int day, int month, int year) { - this.day = day; - this.month = month; - this.year = year; - } - - public int getDay() { - return day; - } - - public void setDay(int day) { - this.day = day; - } - - public int getMonth() { - return month; - } - - public void setMonth(int month) { - this.month = month; - } - - public int getYear() { - return year; - } - - public void setYear(int year) { - this.year = year; - } - - public String toString() { - return "Date{" + - "day=" + day + - ", month=" + month + - ", year=" + year + - '}'; - } - - public boolean isLeapYear() { - if (this.year % 400 == 0) - return true; - - // Nếu số năm chia hết cho 4 và không chia hết cho 100, - // đó không là 1 năm nhuận - if (this.year % 4 == 0 && this.year % 100 != 0) - return true; - - return false; - } -} diff --git a/exercise_oop_date/src/Main.java b/exercise_oop_date/src/Main.java deleted file mode 100644 index 84e4055..0000000 --- a/exercise_oop_date/src/Main.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Date date = new Date(12, 3, 2016); - System.out.println(date.toString()); - System.out.println(date.isLeapYear()); - } -} diff --git a/exercise_oop_employee/exercise_oop_employee.iml b/exercise_oop_employee/exercise_oop_employee.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_employee/exercise_oop_employee.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_employee/src/Employee.java b/exercise_oop_employee/src/Employee.java deleted file mode 100644 index 33e82b3..0000000 --- a/exercise_oop_employee/src/Employee.java +++ /dev/null @@ -1,51 +0,0 @@ -public class Employee { - private int id; - private String lastName; - private String firstName; - private int salary; - - public Employee(int id, String lastName, String firstName, int salary) { - this.id = id; - this.lastName = lastName; - this.firstName = firstName; - this.salary = salary; - } - - public int getId() { - return id; - } - - public String getLastName() { - return lastName; - } - - public String getFirstName() { - return firstName; - } - - public int getSalary() { - return salary; - } - - public void setSalary(int salary) { - this.salary = salary; - } - - public String getFullName() { - return this.lastName + " " + this.firstName; - } - - public int getAnnualSalary() { - return this.salary * 12; - } - - public int upToSalary(int percent) { - return this.salary + (this.salary * percent)/100; - } - - public String toString() { - return this.getFullName() + " - " + "salary: " + this.salary; - } -} - - diff --git a/exercise_oop_employee/src/Main.java b/exercise_oop_employee/src/Main.java deleted file mode 100644 index 342c48f..0000000 --- a/exercise_oop_employee/src/Main.java +++ /dev/null @@ -1,10 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Employee employee = new Employee(1, "Nguyen", "Sin", 10000000); - System.out.println(employee.getFullName()); - System.out.println(employee.getAnnualSalary()); - System.out.println(employee.toString()); - System.out.println("Salary up to: " + employee.upToSalary(10)); - } -} diff --git a/exercise_oop_inheritance_circle_cylinder/exercise_oop_inheritance_circle_cylinder.iml b/exercise_oop_inheritance_circle_cylinder/exercise_oop_inheritance_circle_cylinder.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_inheritance_circle_cylinder/exercise_oop_inheritance_circle_cylinder.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_inheritance_circle_cylinder/src/Circle.java b/exercise_oop_inheritance_circle_cylinder/src/Circle.java deleted file mode 100644 index bb6a581..0000000 --- a/exercise_oop_inheritance_circle_cylinder/src/Circle.java +++ /dev/null @@ -1,36 +0,0 @@ -public class Circle { - private double radius; - private String color; - - public Circle(double radius, String color) { - this.radius = radius; - this.color = color; - } - - public double getRadius() { - return radius; - } - - public void setRadius(double radius) { - this.radius = radius; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public double getArea() { - return this.radius * this.radius * Math.PI; - } - - public String toString() { - return "Circle{" + - "radius=" + radius + - ", color='" + color + '\'' + - '}'; - } -} diff --git a/exercise_oop_inheritance_circle_cylinder/src/Cylinder.java b/exercise_oop_inheritance_circle_cylinder/src/Cylinder.java deleted file mode 100644 index 5cda15a..0000000 --- a/exercise_oop_inheritance_circle_cylinder/src/Cylinder.java +++ /dev/null @@ -1,21 +0,0 @@ -public class Cylinder extends Circle { - private double heigth; - - public Cylinder(double radius, String color, double heigth) { - super(radius, color); - this.heigth = heigth; - } - - public double getHeigth() { - return heigth; - } - - public void setHeigth(double heigth) { - this.heigth = heigth; - } - - public double getVolumer() { - return super.getArea() * this.heigth; - } - -} diff --git a/exercise_oop_inheritance_circle_cylinder/src/Main.java b/exercise_oop_inheritance_circle_cylinder/src/Main.java deleted file mode 100644 index 51647e6..0000000 --- a/exercise_oop_inheritance_circle_cylinder/src/Main.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Circle cylinder = new Cylinder(2.4, "red", 10); - System.out.println("Area: " + cylinder.getArea()); - System.out.println("Volume: " + ((Cylinder) cylinder).getVolumer()); - } -} diff --git a/exercise_oop_inheritance_person_student_staff/exercise_oop_inheritance_person_student_staff.iml b/exercise_oop_inheritance_person_student_staff/exercise_oop_inheritance_person_student_staff.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_inheritance_person_student_staff/exercise_oop_inheritance_person_student_staff.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_inheritance_person_student_staff/src/Main.java b/exercise_oop_inheritance_person_student_staff/src/Main.java deleted file mode 100644 index 88e73ab..0000000 --- a/exercise_oop_inheritance_person_student_staff/src/Main.java +++ /dev/null @@ -1,10 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Person student = new Student("H", "DN", "CHINH QUY", 3, 6.7); - Person staff = new Staff("D", "BT", "KHTN", 12.5); - System.out.println(((Student) student).getRating()); - System.out.println(((Staff) staff).upToSalary(40)); - - } -} diff --git a/exercise_oop_inheritance_person_student_staff/src/Person.java b/exercise_oop_inheritance_person_student_staff/src/Person.java deleted file mode 100644 index f5176ef..0000000 --- a/exercise_oop_inheritance_person_student_staff/src/Person.java +++ /dev/null @@ -1,17 +0,0 @@ -public class Person { - private String name; - private String address; - - public Person(String name, String address) { - this.name = name; - this.address = address; - } - - public String getAddress() { - return address; - } - - public String getName() { - return name; - } -} diff --git a/exercise_oop_inheritance_person_student_staff/src/Staff.java b/exercise_oop_inheritance_person_student_staff/src/Staff.java deleted file mode 100644 index e1d1a9b..0000000 --- a/exercise_oop_inheritance_person_student_staff/src/Staff.java +++ /dev/null @@ -1,31 +0,0 @@ -public class Staff extends Person { - - private String school; - private double salary; - - public Staff(String name, String address, String school, double salary) { - super(name, address); - this.school = school; - this.salary = salary; - } - - public String getSchool() { - return school; - } - - public void setSchool(String school) { - this.school = school; - } - - public double getSalary() { - return salary; - } - - public void setSalary(double salary) { - this.salary = salary; - } - - public double upToSalary(int percent) { - return this.salary + (this.salary * percent) / 100; - } -} diff --git a/exercise_oop_inheritance_person_student_staff/src/Student.java b/exercise_oop_inheritance_person_student_staff/src/Student.java deleted file mode 100644 index 1a125de..0000000 --- a/exercise_oop_inheritance_person_student_staff/src/Student.java +++ /dev/null @@ -1,47 +0,0 @@ -public class Student extends Person{ - private String program; - private int year; - private double score; - - public Student(String name, String address, String program, int year, double score) { - super(name, address); - this.program = program; - this.year = year; - this.score = score; - } - - public String getProgram() { - return program; - } - - public void setProgram(String program) { - this.program = program; - } - - public int getYear() { - return year; - } - - public void setYear(int year) { - this.year = year; - } - - public double getScore() { - return score; - } - - public void setScore(double score) { - this.score = score; - } - - public String getRating() { - if (this.score < 5) { - return "bad"; - } else if (this.score >= 5 && this.score <8) { - return "medium"; - } else { - return "good"; - } - } - -} diff --git a/exercise_oop_polymorphism_interface_moveable/exercise_oop_polymorphism_interface_moveable.iml b/exercise_oop_polymorphism_interface_moveable/exercise_oop_polymorphism_interface_moveable.iml deleted file mode 100644 index c90834f..0000000 --- a/exercise_oop_polymorphism_interface_moveable/exercise_oop_polymorphism_interface_moveable.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exercise_oop_polymorphism_interface_moveable/src/Main.java b/exercise_oop_polymorphism_interface_moveable/src/Main.java deleted file mode 100644 index e07f4eb..0000000 --- a/exercise_oop_polymorphism_interface_moveable/src/Main.java +++ /dev/null @@ -1,16 +0,0 @@ -public class Main { - - public static void main(String[] args) { - MoveablePoint moveablePoint = new MoveablePoint(10, 5, 1,1); - MoveableCircle moveableCircle = new MoveableCircle(moveablePoint, 4); - System.out.println(moveableCircle.toString()); - moveableCircle.moveRight(); - System.out.println(moveableCircle.toString()); - moveableCircle.moveUp(); - System.out.println(moveableCircle.toString()); - moveableCircle.moveLeft(); - System.out.println(moveableCircle.toString()); - moveableCircle.moveDown(); - System.out.println(moveableCircle.toString()); - } -} diff --git a/exercise_oop_polymorphism_interface_moveable/src/Moveable.java b/exercise_oop_polymorphism_interface_moveable/src/Moveable.java deleted file mode 100644 index 9cda3d9..0000000 --- a/exercise_oop_polymorphism_interface_moveable/src/Moveable.java +++ /dev/null @@ -1,6 +0,0 @@ -public interface Moveable { - void moveUp(); - void moveDown(); - void moveLeft(); - void moveRight(); -} diff --git a/exercise_oop_polymorphism_interface_moveable/src/MoveableCircle.java b/exercise_oop_polymorphism_interface_moveable/src/MoveableCircle.java deleted file mode 100644 index 037c7db..0000000 --- a/exercise_oop_polymorphism_interface_moveable/src/MoveableCircle.java +++ /dev/null @@ -1,35 +0,0 @@ -public class MoveableCircle implements Moveable{ - - private MoveablePoint center; - private double radius; - - public MoveableCircle(MoveablePoint center, double radius) { - this.center = center; - this.radius = radius; - } - - @Override - public void moveUp() { - this.center.setX(this.center.getX() + this.center.getxSpeed()); - } - - @Override - public void moveDown() { - this.center.setX(this.center.getX() - this.center.getxSpeed()); - } - - @Override - public void moveLeft() { - this.center.setY(this.center.getY() - this.center.getySpeed()); - } - - @Override - public void moveRight() { - this.center.setY(this.center.getY() + this.center.getySpeed()); - } - - @Override - public String toString() { - return "Center: " + "(" + this.center.getX() + ", "+ this.center.getY() + ")"; - } -} diff --git a/exercise_oop_polymorphism_interface_moveable/src/MoveablePoint.java b/exercise_oop_polymorphism_interface_moveable/src/MoveablePoint.java deleted file mode 100644 index 8543190..0000000 --- a/exercise_oop_polymorphism_interface_moveable/src/MoveablePoint.java +++ /dev/null @@ -1,76 +0,0 @@ -public class MoveablePoint implements Moveable { - private int x; - private int y; - private int xSpeed; - private int ySpeed; - - public MoveablePoint(int x, int y, int xSpeed, int ySpeed) { - this.x = x; - this.y = y; - this.xSpeed = xSpeed; - this.ySpeed = ySpeed; - } - - @Override - public void moveUp() { - this.x += this.xSpeed; - - } - - @Override - public void moveDown() { - this.x -= this.xSpeed; - } - - @Override - public void moveLeft() { - this.y -= this.ySpeed; - } - - @Override - public void moveRight() { - this.y += this.ySpeed; - } - - public int getX() { - return x; - } - - public void setX(int x) { - this.x = x; - } - - public int getY() { - return y; - } - - public void setY(int y) { - this.y = y; - } - - public int getxSpeed() { - return xSpeed; - } - - public void setxSpeed(int xSpeed) { - this.xSpeed = xSpeed; - } - - public int getySpeed() { - return ySpeed; - } - - public void setySpeed(int ySpeed) { - this.ySpeed = ySpeed; - } - - @Override - public String toString() { - return "MoveablePoint{" + - "x=" + x + - ", y=" + y + - ", xSpeed=" + xSpeed + - ", ySpeed=" + ySpeed + - '}'; - } -} diff --git a/exercise_polymorphism/Circle.java b/exercise_polymorphism/Circle.java deleted file mode 100644 index 5d0e6a4..0000000 --- a/exercise_polymorphism/Circle.java +++ /dev/null @@ -1,38 +0,0 @@ -public class Circle extends Shape { - private double radius; - - public Circle() { - } - - public Circle(double radius) { - this.radius = radius; - } - - public Circle(String color, boolean filled, double radius) { - super(color, filled); - this.radius = radius; - } - - public double getRadius() { - return radius; - } - - public void setRadius(double radius) { - this.radius = radius; - } - - @Override - public double getArea() { - return Math.PI * this.radius * this.radius; - } - - @Override - public double getPerimeter() { - return this.radius * 2 * Math.PI; - } - - @Override - public String toString() { - return this.radius + " - " + this.color + " - " + this.filled; - } -} diff --git a/exercise_polymorphism/Main.java b/exercise_polymorphism/Main.java deleted file mode 100644 index 722548b..0000000 --- a/exercise_polymorphism/Main.java +++ /dev/null @@ -1,53 +0,0 @@ -public class Main { - - public static void main(String[] args) { - Shape s1 = new Circle("RED", true, 5.5); - System.out.println(s1); - System.out.println(s1.getArea()); // which version? - System.out.println(s1.getPerimeter()); // which version? - System.out.println(s1.getColor()); - System.out.println(s1.isFilled()); - System.out.println(((Circle) s1).getRadius()); - - Circle c1 = (Circle)s1; - System.out.println(c1); - System.out.println(c1.getArea()); - System.out.println(c1.getPerimeter()); - System.out.println(c1.getColor()); - System.out.println(c1.isFilled()); - System.out.println(c1.getRadius()); - - Shape s3 = new Rectangle("RED", false, 4.5, 7.5); - System.out.println(s3); - System.out.println(s3.getArea()); - System.out.println(s3.getPerimeter()); - System.out.println(s3.getColor()); - System.out.println(((Rectangle) s3).getLength()); - - Rectangle r1 = (Rectangle)s3; - System.out.println(r1); - System.out.println(r1.getArea()); - System.out.println(r1.getColor()); - System.out.println(r1.getLength()); - - Shape s4 = new Square(6.6); - System.out.println(s4); - System.out.println(s4.getArea()); - System.out.println(s4.getColor()); - System.out.println(((Square) s4).getWidth()); - - Rectangle r2 = (Rectangle)s4; - System.out.println(r2); - System.out.println(r2.getArea()); - System.out.println(r2.getColor()); - System.out.println(r2.getWidth()); - System.out.println(r2.getLength()); - - Square sq1 = (Square)r2; - System.out.println(sq1); - System.out.println(sq1.getArea()); - System.out.println(sq1.getColor()); - System.out.println(sq1.getWidth()); - System.out.println(sq1.getLength()); - } -} diff --git a/exercise_polymorphism/Rectangle.java b/exercise_polymorphism/Rectangle.java deleted file mode 100644 index 1c3ddaa..0000000 --- a/exercise_polymorphism/Rectangle.java +++ /dev/null @@ -1,50 +0,0 @@ -public class Rectangle extends Shape{ - - protected double width; - protected double length; - - public Rectangle() { - } - - public Rectangle(double width, double length) { - this.width = width; - this.length = length; - } - - public Rectangle(String color, boolean filled, double width, double length) { - super(color, filled); - this.width = width; - this.length = length; - } - - public double getWidth() { - return width; - } - - public void setWidth(double width) { - this.width = width; - } - - public double getLength() { - return length; - } - - public void setLength(double length) { - this.length = length; - } - - @Override - public double getArea() { - return this.width * this.length; - } - - @Override - public double getPerimeter() { - return this.width + this.length; - } - - @Override - public String toString() { - return this.width + " - " + this.length + " - " + this.color + " - " + this.filled; - } -} diff --git a/exercise_polymorphism/Shape.java b/exercise_polymorphism/Shape.java deleted file mode 100644 index 6e5e840..0000000 --- a/exercise_polymorphism/Shape.java +++ /dev/null @@ -1,32 +0,0 @@ -public abstract class Shape { - protected String color; - protected boolean filled; - - public Shape() {} - - public Shape(String color, boolean filled) { - this.color = color; - this.filled = filled; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public boolean isFilled() { - return filled; - } - - public void setFilled(boolean filled) { - this.filled = filled; - } - - public abstract double getArea(); - public abstract double getPerimeter(); - public abstract String toString(); - -} diff --git a/exercise_polymorphism/Square.java b/exercise_polymorphism/Square.java deleted file mode 100644 index 39a15e9..0000000 --- a/exercise_polymorphism/Square.java +++ /dev/null @@ -1,12 +0,0 @@ -public class Square extends Rectangle { - public Square() { - } - - public Square(double side) { - super(side, side); - } - - public Square(String color, boolean filled, double side) { - super(color, filled, side, side); - } -} diff --git a/exerciseoop_class-object_cricle/exerciseoop_class-object_cricle.iml b/exerciseoop_class-object_cricle/exerciseoop_class-object_cricle.iml deleted file mode 100644 index c90834f..0000000 --- a/exerciseoop_class-object_cricle/exerciseoop_class-object_cricle.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exerciseoop_class-object_cricle/src/com/company/Circle.java b/exerciseoop_class-object_cricle/src/com/company/Circle.java deleted file mode 100644 index c83d198..0000000 --- a/exerciseoop_class-object_cricle/src/com/company/Circle.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.company; - -public class Circle { - private double radius; - private String color; - - public Circle() { - this.radius = 1.0; - this.color = "red"; - } - - public Circle(double radius) { - this.radius = radius; - this.color = "red"; - } - - public Circle(double radius, String color) { - this.radius = radius; - this.color = color; - } - - public double getRadius() { - return radius; - } - - public void setRadius(double radius) { - this.radius = radius; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public double getArea() { - return this.radius * this.radius * Math.PI; - } - - public String toString() { - return "Radius: " + this.radius + " - Color: " + this.color; - } -} diff --git a/exerciseoop_class-object_cricle/src/com/company/Main.java b/exerciseoop_class-object_cricle/src/com/company/Main.java deleted file mode 100644 index 304d1d5..0000000 --- a/exerciseoop_class-object_cricle/src/com/company/Main.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.company; - -public class Main { - - public static void main(String[] args) { - // Test default constructor - Circle circle1 = new Circle(); - display(circle1); - - // Test constructor has 1 parameter radius - Circle circle2 = new Circle(2.0); - display(circle2); - - // Test constructor has 2 parameter radius, color - Circle circle3 = new Circle(2.0, "blue"); - display(circle3); - - // Test getter setter - Circle circle4 = new Circle(); - circle4.setColor("Green"); - circle4.setRadius(3.0); - display(circle4); - - - - } - - public static void display(Circle circle) { - System.out.println(circle.toString()); - System.out.println("Area: " + circle.getArea()); - System.out.println(); - } -} \ No newline at end of file diff --git a/exerciseoop_class-object_rectangle/exerciseoop_class-object_rectangle.iml b/exerciseoop_class-object_rectangle/exerciseoop_class-object_rectangle.iml deleted file mode 100644 index c90834f..0000000 --- a/exerciseoop_class-object_rectangle/exerciseoop_class-object_rectangle.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/exerciseoop_class-object_rectangle/src/com/company/Main.java b/exerciseoop_class-object_rectangle/src/com/company/Main.java deleted file mode 100644 index 2765487..0000000 --- a/exerciseoop_class-object_rectangle/src/com/company/Main.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.company; - -public class Main { - - public static void main(String[] args) { - Rectangle rectangle1 = new Rectangle(); - rectangle1.setLength(10); - rectangle1.setWidth(13); - System.out.println(rectangle1.toString()); - System.out.println("Area: " + rectangle1.getArea()); - } -} diff --git a/exerciseoop_class-object_rectangle/src/com/company/Rectangle.java b/exerciseoop_class-object_rectangle/src/com/company/Rectangle.java deleted file mode 100644 index 176f3d1..0000000 --- a/exerciseoop_class-object_rectangle/src/com/company/Rectangle.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.company; - -public class Rectangle { - private int length; - private int width; - - public Rectangle() {} - - public Rectangle(int length, int width) { - this.length = length; - this.width = width; - } - - public int getLength() { - return length; - } - - public void setLength(int length) { - this.length = length; - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getArea() { - return this.length * this.width; - } - - public String toString() { - return "Length: " + this.length + " - Width: " + this.width; - } -} diff --git a/oop-b14/oop-b14.iml b/oop-b14/oop-b14.iml deleted file mode 100644 index e7b98ac..0000000 --- a/oop-b14/oop-b14.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/oop-b14/src/Main.java b/oop-b14/src/Main.java deleted file mode 100644 index c0830d8..0000000 --- a/oop-b14/src/Main.java +++ /dev/null @@ -1,33 +0,0 @@ -import entity.GoodStudent; -import entity.NormalStudent; - -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.stream.Collectors; - -public class Main { - public static void main(String[] args) { - // DEMO cho câu 14 yêu cầu 3 - List goodStudent = Arrays.asList( - new GoodStudent("Nguyễn Văn D","", "", "", "", "", 7.3f, ""), - new GoodStudent("Nguyễn Văn B","", "", "", "", "", 7.2f, ""), - new GoodStudent("Nguyễn Văn A", "", "", "", "", "", 7.2f, ""), - new GoodStudent("Nguyễn Văn C","", "", "", "", "", 7.3f, "") - ); - System.out.println("abc"); - List lgs = getSortedGoodStudentList(goodStudent).subList(0, 2); - lgs.forEach(System.out::println); - } - - - public static List getSortedGoodStudentList(List playerList) { - return playerList.stream().sorted(Comparator.comparing(GoodStudent::getGpa).reversed() - .thenComparing(GoodStudent::getLastName)).collect(Collectors.toList()); - } - - public static List getSortedNormalStudentList(List playerList) { - return playerList.stream().sorted(Comparator.comparing(NormalStudent::getEnglishScore).reversed() - .thenComparing(NormalStudent::getLastName)).collect(Collectors.toList()); - } -} diff --git a/oop-b14/src/entity/GoodStudent.java b/oop-b14/src/entity/GoodStudent.java deleted file mode 100644 index dc32c2c..0000000 --- a/oop-b14/src/entity/GoodStudent.java +++ /dev/null @@ -1,18 +0,0 @@ -package entity; - -public class GoodStudent extends Student { - Float gpa; - String bestRewardName; - - - public GoodStudent(String fullName, String dob, String gender, String phoneNumber, String universityName, String gradeLevel, Float gpa, String bestRewardName) { - super(fullName, dob, gender, phoneNumber, universityName, gradeLevel); - this.gpa = gpa; - this.bestRewardName = bestRewardName; - } - - public Float getGpa() { - return gpa; - } - -} diff --git a/oop-b14/src/entity/NormalStudent.java b/oop-b14/src/entity/NormalStudent.java deleted file mode 100644 index ccfd98c..0000000 --- a/oop-b14/src/entity/NormalStudent.java +++ /dev/null @@ -1,16 +0,0 @@ -package entity; - -public class NormalStudent extends Student{ - Integer englishScore; - Float entryTestScore; - - public NormalStudent(String fullName, String dob, String gender, String phoneNumber, String universityName, String gradeLevel, Integer englishScore, Float entryTestScore) { - super(fullName, dob, gender, phoneNumber, universityName, gradeLevel); - this.englishScore = englishScore; - this.entryTestScore = entryTestScore; - } - - public Integer getEnglishScore() { - return englishScore; - } -} diff --git a/oop-b14/src/entity/Student.java b/oop-b14/src/entity/Student.java deleted file mode 100644 index ce00b40..0000000 --- a/oop-b14/src/entity/Student.java +++ /dev/null @@ -1,24 +0,0 @@ -package entity; - -public class Student { - String fullName; - String dob; - String gender; - String phoneNumber; - String universityName; - String gradeLevel; - - public Student(String fullName, String dob, String gender, String phoneNumber, String universityName, String gradeLevel) { - this.fullName = fullName; - this.dob = dob; - this.gender = gender; - this.phoneNumber = phoneNumber; - this.universityName = universityName; - this.gradeLevel = gradeLevel; - } - - public String getLastName() { - String[] nameSplit = fullName.split(" "); - return nameSplit[nameSplit.length - 1]; - } -} diff --git a/oop-shareprogramming.iml b/oop-shareprogramming.iml deleted file mode 100644 index c6f833d..0000000 --- a/oop-shareprogramming.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/.idea/.gitignore b/oop_employee_management/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/oop_employee_management/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/oop_employee_management/.idea/misc.xml b/oop_employee_management/.idea/misc.xml deleted file mode 100644 index 0548357..0000000 --- a/oop_employee_management/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/oop_employee_management/.idea/modules.xml b/oop_employee_management/.idea/modules.xml deleted file mode 100644 index 76c0135..0000000 --- a/oop_employee_management/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/.idea/sonarlint/issuestore/index.pb b/oop_employee_management/.idea/sonarlint/issuestore/index.pb deleted file mode 100644 index e69de29..0000000 diff --git a/oop_employee_management/.idea/uiDesigner.xml b/oop_employee_management/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/oop_employee_management/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/.idea/vcs.xml b/oop_employee_management/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/oop_employee_management/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/oop_employee_management/README.md b/oop_employee_management/README.md deleted file mode 100644 index c203d41..0000000 --- a/oop_employee_management/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# oop_employee_management - - - -## Getting started - -Bản code prototype cho bài 13 trong bộ bài tập tổng hợp tại [Deft blog](https://shareprogramming.net/tong-hop-bai-tap-lap-trinh-huong-doi-tuong-trong-java/) - -Các bạn có thể dựa vào đây, để lấy ý tưởng và triển khai bài hoàn chỉnh. - - diff --git a/oop_employee_management/oop_b13.iml b/oop_employee_management/oop_b13.iml deleted file mode 100644 index c90834f..0000000 --- a/oop_employee_management/oop_b13.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/oop_employee_management.iml b/oop_employee_management/oop_employee_management.iml deleted file mode 100644 index c90834f..0000000 --- a/oop_employee_management/oop_employee_management.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/oop_employee_management/out/production/oop_b13/Main.class b/oop_employee_management/out/production/oop_b13/Main.class deleted file mode 100644 index 725e64cb539503f44f19b4a8fd53c92912005472..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 508 zcmZuu%TB^T6g>ll(pm*U@cqCQy09A)7Z^7tuIeMfuyHkD14H^SrI`3xy3oXhAK*tB z&lD3RVHWq!J@?ExcV@nSKED8*;?PDBYZmHgl(24N1DhtcOl%7j&sC(-3xRy=s4HMx z#*e;0*;A2!GYNZsaxZ%Uk*XK>Wzdz0()Ax`q(e2PhIcJh)aL1sS)kE+@J8}kx`B)a zZYNDtG-zk)G8vFxThJD;JMkpx`&UZaSz7T#i#RY*GO^=e7kjiA$e}c`@8AGUmYOF} znc3a;Mt(n?gE}wc)DL;Zc)~_~I-82!I}Vm|JYR+!zLsgs!vf}$CI$4Uw-#LrO%(XJ zdgVYmN{kjOmsv0ujz1t?v$oAx%s_!9?wu)td6|`k6_knS!)KWou{Y$Z`F9vI0h=u# TPaor-h=mGPiSwfvbEy3S<%(oD diff --git a/oop_employee_management/out/production/oop_b13/entity/Certificate.class b/oop_employee_management/out/production/oop_b13/entity/Certificate.class deleted file mode 100644 index e33d657f34b14a025a896c7d4faca266a1ce5223..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1366 zcma))&2H0B5QUE&Cnl-sPe{@>g#v9Ui35#9*@3z#LPCmyM62$d#H6<*j^w&X?06)Q zh>%$D06Y}p%(Wqr<49~~uE%rFd^2-@{r>S2z;m=puyIgC0guESig_%iVWVloHDIcN zfpX`{`{=btUNCH*MWG6YFAP|LH}>g5FZe(=@FIRyHa^GA{Ds&(2w4*>q?`!sKeja@$YIzUAb=adRLFeW@d6??46#I#F7(ZG93e( ze+#8xsKx9!XDg|eN|A!4v&l`^_g^a+;QHKfj$~^NR zd2-?;+(Ct3B2c9jfzK?Ir>~2E+nU03pG=W+pH5-9+tw8MnQEPo;9ZO5i@d#x4Jwwg zt*yLut&~)urfx;>>be^JU(TbL#aaI_3kjw{xGa!d8e}&UWG5RWmj>A*$o>)#S-DK$ZYGG8 z206?Gxt9%Mr9oVRw3dL#k_2QI_i5#!%&#V&206+EdBA6#v6{IT6|d$QL5`Pz$Qu!m JJtCOc{{yS!zoh^G diff --git a/oop_employee_management/out/production/oop_b13/entity/Employee.class b/oop_employee_management/out/production/oop_b13/entity/Employee.class deleted file mode 100644 index f1d5b0b78e6869adee66d3b7ea62e0448d3bf9ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2387 zcmchX+foxj5Qck_%_f9sByx(1f(j<#5K%mWD8~{jrB-2azk~&b+U!zcqs0sOJX)Hv z$_pRBhqC;8W^-`az4fMNwxXn>Yktgv{&VwJ^97Oz;W zrD;7)8-h}GujTrJ#2Y~gc_64zJFz}mRmXCVs=Izux<|``GKVe4d22OnZ1-i;KR&R| z1&wG^UpDM&&8u6^rsdnPPMscmE=*H)!;+4mT-|Q^@=(@sd?x6Mc5C_4sn+C~508Oe zdE{Dts|l}}(D6#mc75reS2uc5mRI3qu1HtIC0voI2jQ&G@IKi!F%Lgldm7>+fc$yk%w|{TK24w1fHi zzp})%nhEn~$KIzM_t0xLEMIyq{_c_O?_gktOXZ7YP;k3>|!0SDo}-JPmISoeM5 zY`r^XW1R${W+Mi?dUoSMrjQvY%OK!;J(L;vbhglL=@DgZu+2l;H)mC1ETQz`Rw1N)pdpb5H(FLu6#KHf11(P(lIaFy=7i2%tt0 zdyJ-$gEPO@(Syv$qe^Dn8Ez@E^N!0-svQ?@s2#^lsT~(@(j@k}jv3?{gGRSw$`GI_ z;#ANbx(oSlQ@&H;3l0+sTQ_AQvMJL5(ax)|W-wDVq}S4{(oO;Ewu&&St-8gTL2-ia zMS>*5Ak&c`rD%|37^Do4N(>11mdBzDi;EpG!XWdJAhR?V)e$2MvIvj|F(CYF8Du`P zBdIXRqezg2=#HeqAkP5uJO+d(i$SW9AZ8fkMI^}mXb>|DvIda#7!V$823bVU^d;=w z;O~?UgKR~B=*fSGAWQTp2=X3lcWC==svg=M0KJI;(vQm|243GUQ{Au5bMqKC{Ym$+ ZnNT_K*bIE53|B4s?o}FJPoYcDv%hHBlN|s6 diff --git a/oop_employee_management/out/production/oop_b13/entity/Experience.class b/oop_employee_management/out/production/oop_b13/entity/Experience.class deleted file mode 100644 index 5a148a383289b0df3a98f37ad0f32eb98704dcd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2530 zcmcgt+j1L45Iw8wN>(C8vK=IcL`lGwWjO)@;UdS7I0*=ZZE!Fc!euS3?Fp-0)p`Y} zC_nKPd;u>!Kq`@|po$ORqbRy(q}9#hky6$4Oi#}_J!iUCfB*BxUjSZ(h+_eFV#whx z4;#F^7sGu#h~r(n7ezIWDDLQZpX~=6Q{&l(IyQN+rDL1zN9_Dq#||$Z>iC51u8vRH z|Cx?Gwx37wMHG)Tq&lYIZXMkJp=G+lwCkn@t*Sw9xz5hF!m>1^YmbfZjIw3ehvgm5 z74~68Lu5_Z!dur6EG+M82yHkGI+?5q+uUq7_f7Yqv2T$lU32P&wQIP7*F9&*I}*nl zGBwlogx4t#$O(DAP@N=Xj-LvX{%IahG|jT4zGrx5Wm?$qom5QQ6IQtKwE!Ytv}b1@(R5dPfbTqhU@#jB#rSw~ic}Lc?a$5F}`#Zn~a05Oqq8WJrxOlLn)z zby|Jp7RO@O`VwvoAS>&nVr)ko+J@J5iTCIKRk$fBO_4KseB^vzwGSM(X?Vi1sVWXl zZ*QU|sm!PYl!bSZMSYd z5M0g4L8ac{rbr-(O-Ywz^U7?ik*WB#{R#4*DLwfR3UKSb$u5utbWW}-L20JpP z{CKw$LIX#VsNeA%z7DFP3lr^08TWn7mgRIz(xi2UhLg%G&sb|r3mbki6*Fi{exB5j zpq*pSY|>}QX?uPL3a7kH-zksY&@`HKlZ-qt>edi#agaqdH&O>%`;X1KS7D-v(Q27C zHT>!smz=Dx-n$avrNYL4ZI8h9`6kpDhO178!&UmeFVJ5|fPPepaz@oiHU^C=l*Vhc zx=B_e8!nzg`(1`zr!h{)cno0%FVHNZg76|1X~h6bG%~;*MFznB%6B7t3)M$t&l$d1PieZWx(+jynZmW=9z> zAtGn2YE;fRTOBXcT*<^yuTa!Y@&xElT*GU=-nZnv0R0I`-bG}flaf3~m%Qc- z@On@3GFkOzPZ9W4lJK=7(s_C4aM(Zm2Hxx)UZ({3Z6orn#_6xoHLpvAc@^c073n>X zhPP1ZVGSn|{B10e#WNFG!|jPgRz~VY=}@FZR;DDvdb0xbLF!@s(o^;1Pek`lp{HYA z#EVZcLngJY&LZm$G_13 z;Wu>z9G%f`e(*;*o^yATY{KFPoN+R<_ul88d(Ly8bIygo{{HoM0I#5##C2>Za1A^B zxyzq-7`vCiyLc~>x74HwhKnD(>_6fNehD*+Uh3ym+MILmu}T{7A*eym+kQ6COWR z@tKOxReZs_U&irO9J+$hnyptmx+5&}j_w!=rpib96TRq&rco?g6}`c5X~6KIZhoyG z?HV?8vsT=5Y+=^es$+^LhTRs<@vhz^cd>P03TIP6cyVc8L1fFS5;|5Erm@>;9vJo` z{h&ceTE^PfZNX~~j5u}CR*)(irb8Z!JGRlT8#cvRUks#qp3-@QX?*V;_me+wdFc@D z!Hy#u#j7F;abE9gzSVbG+9c%@d!lCQPRFLWfBdg9UO?$Ti96P=Ti@I> z4=uYXdqBZ>&2a7x^~B8LQeYIaZlAZF4X#bj<)Cx7k0!g${lz%!*)^RC(3{!UwJA&I!^IB__D@MaSp4adUp4BjitcK_KGmnEf zDjKRV;yBb$LtVj)tS}$*+a1xU8g}2~x1zd{(;#r9VVV61(Bq*MvfYa2-2$=-Mhe+( zX>Vv);phTX)rmq@);SxlvLOMo;29_~FkZ+GK4Tm7p!hMCZzCtc!3T<6+{QXRT!T*x zJy9O8-E1|iV}mqm1*q?qh422C@AaVuEOBB}K6#JZj?tud)ap3BS6W!b2lVnflv6`* zQg=?s1B0-Fc#Dl1R2l;nbpPPUs5mlEOmDRelOCFtfJ=JC@4Ka!WeRwGaqHi<2i$ez zofEC=jtcD>{mlcy2yyw*EW{NkM=C-ZN1$+Z()R^gy-cG*V>EvTalSas4kyh+r$#c*k%LrkU>>$56G2f^dH21d+bKX++6pj4V?~U>u`JV}gF{ zJMW(Ne3K_hoa0SO>da)4JBTjDk@FOhssD*M@dUE@<-$rPl8I(wXLOHDoH=AvCXq>a zEW+|uE{kcp(+tI)MTUNJxGGs3y1sfWvfOJFkNk6UNjLbZJ%MB!Nm&Fad zgqYlA>Em+7;;VATH%Q*}!HHk?=5)RU%TnfCwwk3cMLeBr;6oW+0Kbf{FM_ z+fB$C5xI2%k+(e}^h|n}`o&A{)8C*zK0_j%JjDp5Nuwc^JH?gss0)nsfRqc2pCX-} xaOab~%_$d{?g29{5Mt|DcOLF-W?UfB1ybKp#8X@yR;1)pka~cB6O@hl(8)4|)8MZ9d}Jo{C4jc&uWd$B!BOM8y+ce5&Fz9zR#{ zg^DkE>njys^QcF05JgErxT2rfH3iAyiT+g2o4R$B-*alhI$Bqt){Tl$cMRHB3JOLV zmUwE^>cTnO)hmXA$cC_lv!x)IS=?6;+P2GtjuwSw>^3R~M(vS)U=orn+9loG*K2~; z9vE_tMV+k;%OQ{Xf<=KWikivvaw+se9P#@;roEOf;)sfomqhOBj{o>g1Q&Ue{vv?SiXbh*AoO2_uZk)=D08pZwLf0c3oC6{=63I+%~T0geG zDOiVgt)e@^wn*(G!@2L)@WAv>SSV9q!!a^^ z+|>ow zVwQfFf(UR$(k#G5DMzYH8i$~8!P568tzM;3p)s7jfbv|L&C@qd$JjIk4GT2WTq9(# zNGo=br7t@$$udOa1UtwsogTR> z5@%8qk~%Y);HIKWapWb6$dUg{4zy6-tFukqf#@_4u}22>)7xPZxI0&J|a`v9sVX=cwTy#a;<#XB3|+o zY+}pv)lMY%V;7OdzC_-_+dV|CQbxOpEEAEH0Yq4NR^Xk!iiElqxz(4*o&JinmA0FZ z+eBn_01-|+6QM_xzMPt0z4Si&9qN+{#FFtQhA2%M4T*&&hLa;MFzN#d7Z__InH+cL x6aMC;3rzXIvRtMb_FBdFI#1U75gp{{YBnP;USL diff --git a/oop_employee_management/out/production/oop_b13/exception/BirthDayException.class b/oop_employee_management/out/production/oop_b13/exception/BirthDayException.class deleted file mode 100644 index 123bac592b99db0652e8b81fc41dfe20fc51e443..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 363 zcmaKoy-ve06otp)?s#IId`~$v-7rSs5tOm>j n-o@$J8|al!0V3{kO&dHX&}7~Fp28;I_!8JctM=Mv6=3HJ!k1Kf diff --git a/oop_employee_management/out/production/oop_b13/exception/EmailException.class b/oop_employee_management/out/production/oop_b13/exception/EmailException.class deleted file mode 100644 index 184d3509b4e2a9407ac94907c6de908a7e01c536..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 290 zcmZ{fy$%6E6ot=S`@>p4p%I-9g>7_1BUBp=(T_D@WbMjY;8k_0qCM^BZGp4qJPoqQZ%dtvZs=v>jjW`MiIt)VXUk9hs zH8&99%KbK@0geBW9^%UttR|EDV!&u$KxZ~ISga=7;6RqudCdlLu$c&XRt?S*T@yeJ diff --git a/oop_employee_management/out/production/oop_b13/exception/FullNameException.class b/oop_employee_management/out/production/oop_b13/exception/FullNameException.class deleted file mode 100644 index 9c14fe4be0d59ed9e229f0391523c94c7d6e5a3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 363 zcmaKoJ5R$f6otr!B-#IaRq-H~hDkTh6KNK*&`$55U#)aW7{ux|QO}jmZ8WWonaNB|e#np@ zGF6r`-MZ|h62f_27m1o`m($-fxOGpO@Nq~u|0jrW_GkVZj|+JG1Fnb{yKoO!jhK79 l2iG@mpf#U72=3uG<$D50tou9N;EAgM$7pW7PFQ(3-2lA)RC53T diff --git a/oop_employee_management/out/production/oop_b13/exception/PhoneException.class b/oop_employee_management/out/production/oop_b13/exception/PhoneException.class deleted file mode 100644 index aa55fb9bb52bde5159e489416d96845a4ca041d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 354 zcmZ{f%}N6?6otB?)(8~(_Kq9rLG1MTDniCVH%kxGBcIFmMg)958y+U z-qhM6Vgfh$PVPO2e62n{0kqKwae%5oO`uK)y4vWnM>xNZpXIBJGHKFiSmxTKotrVi z@7t*&RAX(_<6=Hh`AAMORvNKQWHy$$cDxn+a;6JHD^|-yy_DLT=xJt+8vI~~Am*wl zWV*5V6G;e%c9AFQLA#LV@9BHjUxAN9!sUMvJhivo1>*`Hf7~tN%@$k(rXK4apTX_j iJLrvX9t79$Tjf51Bj$@OAM=Y_0Zvfac%3qNI9mgX3sD>Z diff --git a/oop_employee_management/out/production/oop_b13/service/EmployeeManager.class b/oop_employee_management/out/production/oop_b13/service/EmployeeManager.class deleted file mode 100644 index f5d46a06bd131805800e0d4fef6aaa5a79c39bdc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3081 zcmbVOSyS6q6#irzgpI;tvjk`eBqTMEh9q562yH?_Lu*1>XK9iy5%vWHvgF7z4c+&B z-`l7D03O;-OG+}+NuN5?=}+o(`dvxJHaL0ci>!O^Io~cwM1y9Cs0T-pgB^6Jp zcsho-M0y6##&8+Bidhwz7#fj{L10eByov<{QIX4=_KFY%1udyXeOVtVx`sKDG79b} zkJHAyrMpE(DA>K}cq}C>*Kk)xP6QC6Gc3a$R}fAPo>LH+u(R}SP8pUsRm{x_ z=ZrpUawnd$GrDHY4tW!9==J1>r0k8L8ZDyv{m(l5x=t@)9(>loJj=wJ<(kU``4R$B$JtT2Tue7N>na2FM9 zOS^hzXv?r%ZmKy>XWWB9b)>GMm1G0pz z8P#--rR}1V5tD|LNLvXv=>C2wPYr$OXHI3Q9(5djMe0?<9oV74z@mmFm=yFe+ja}C zqvxlEyI^Mv&GpE&V39vo3v3N}Tv6d@D1gpIEUS1 z@;2~rG=>lHk(@Ih*S>DViMT@6dZn1KYvi;evPMRC1$EU~W~?eMvzs$a zici7e0N0yIH9#t3RACT4D)l;PI5NMEsw!vlG8f&XQM{Z(X_w(`=Y&~cJF0YBVy{BV z!4^Fnk+YYDs{LyQEye^n=M&@n(^Hf9H``K zi)Fx6g+%CFA)E9{!4=d)*e;T+3x>->1sfN$+m4=6LRKqwPQn0J6ZNpl&m&8cQn@7CU`kXEa z<9%(+l~*dhAz;e3mx_4>+LUDpXTsDA1^FlUccoGTJbyZz)UB*33Io35XhoY@zWj5j z*r{@qbNv4u`XO)cTiLiE?1XNbX@hr2#kc$)+rm$+dKC2D-VXf~Zx6pU6n=wnkn*>e zs}Odgf$yBUeD31TF@*UBv3)c|-6_KAj>)m`d(SqlQ@av?R-ys8BX}%Bk zU@un+?nE-cJI)v(X)*K*BE##b3*mejOMVdn?fh`*@NhbO+W<%64q}K%iX6}Z;@JSP zUm~ufo@dvg0_$i9@e!r<8e%um_#>f1kSW*G73iu6(Z3O*A9rED7h(hlf)GXe$s)Uk zhS#7?@B0&V;Z+%K-#WIjfXFHj!ya@8>iE8cA$k!bn;MzyB$JYrJ|AQwR96tH9tp3m z5DwCc{Qm<@#UTd2o1cpzuMd}lD*HC7?72?r{VIP$^Ez5WxQW(sk#Tke^mf!#T5vA?npzxU>YT^dsYUH||9 diff --git a/oop_employee_management/out/production/oop_b13/ui/ScannerFactory.class b/oop_employee_management/out/production/oop_b13/ui/ScannerFactory.class deleted file mode 100644 index 79a40d1e571eec483817e760a34becc9f2246fcb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 575 zcmZuuO-sW-5Ph4}#-?eljo;t()Os)%Z;B|QAk+#*3Ldv{sjF>L;zsDd(t0Q;coqCn z;%tlu(LK!0yqS6PhWYq>c>}P6O&b>G3dm#L!a@OySh8Va*}{s2RR+sHI&8I$FBshB zEq~x%qGZqW10IGV-et(|$xy0&2D9F1Gvtnw)d8bE6wHXDx*XFU* zaR%npjl9>)iTt5F;em?cAu-!sp|Uv)v-QTm<4eBc!QB}jWQ?{SC2=55q@L+!?HT8` z*6+YZ(ZM7N4AXxWvasf09UHo;Mg@O#F;vo~9uK?TdFNIH>KEh>@0I8?7&0W$-;!nI zorZ%%`6?E?Pn#{&|4lU7sL>rPx(jWuC6Z^Pevzz0kw-tHe`0G4_LQbeWb@x3%H%tl zKZOcK1x%w#h;BZhyXrSTg7J>ZE6l4Aa$`(9!yxF9QU)|#IW4q_wg{IHmoO8|C7zkI GX!Z*YR(e4I diff --git a/oop_employee_management/out/production/oop_b13/ui/UIManager.class b/oop_employee_management/out/production/oop_b13/ui/UIManager.class deleted file mode 100644 index d9bd529fa8794d376367cca485c23753e0833767..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1580 zcmah|*-{fh6g?f1Ofn831W*(g5CtMiP;o=V6*L+ajaud75Lz5fCaFosGT-5wPksXW zpq5nm0e+O_>6ys{D_Yi6_4M7&J$LD!zrOzfuz<3O92QIr;*vft>*I=nt0od!eGQ9g zT*p!hH%u(!rioj)ox&XhcTMzT!N5He1Ny&WU{xTw| zQJP3e7o%CRT~~VA{@Q+P7h1}x7RrH=_L#G+OY==t+ubRYmFKuSnxbphnA-~I6kR1f zS75M9B~a0m#RkTK4u#0nA4IQuviVAr$aTX*o#yzmW6pK}y2fOyv2807Np8!k)EBc{ zZ+R8D>gcItqOQ;B8Y~Q9*un{nTR4kz7G{tq>COP6&KS6F;Q@*U9$I*W5>bn8qou}+ z_ZG(utXWvchJj5BkMV>}2#o9O$l^Fh7UFf9k_qLgOl$u-2xPnM-Pn39E8L4gdW2J0 zwJWObwMk(|s!$iq{BHx>hgEJjm8@}b>n$RV1VeP{g-uRSagNfivAaV)%Aab1L_<62 zG`+Le&tR}8w?N93@05NQdad)lahTvs%<+u^2ACMbJVz)M_!s;q&U}UV#7hhZc_w|O zi9@_wfdfWyn3BK|jPcaLZ|NQ5|HRk_qzDk(9gBbTZ+*LCiQpFB6}xol^I?xOJD5Ap z@HD|Q1RWyaC?SvW)9DTdkYPH4<0vfx$7xHTFP%=)fm;-Ecuy%oQ+^ML7hjPqeS@*~ z8L3?Q3(T`$a9~{vRwyjSXEmFk$biiRQaH&XC&}v+OFYe9O<@{&pUpx59DLxOiG=_Z+b=qJHUX&(dAx6F~j{Jz@FC|e9?FiV`6 zelfjx1H{Yr;$0%%m4D#Pg%h8THei diff --git a/oop_employee_management/src/Main.java b/oop_employee_management/src/Main.java deleted file mode 100644 index 618e1f5..0000000 --- a/oop_employee_management/src/Main.java +++ /dev/null @@ -1,29 +0,0 @@ -import ui.ScannerFactory; -import ui.UIManager; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - UIManager uiManager = new UIManager(); - Scanner scanner = ScannerFactory.getScanner(); - Integer ch = scanner.nextInt(); - while (true) { - System.out.println("Application"); - System.out.println("Enter 1: To insert "); - System.out.println("Enter 2: To search: "); - // TODO HERE - System.out.println("Enter 4: To exit:"); - switch (ch) { - case 1: { - // input 0 => insert Experience - // input 1 => insert Fresher - // input 2 => insert Intern - int type = scanner.nextInt(); - uiManager.insert(type); - } - // TODO HERE - } - } - } -} diff --git a/oop_employee_management/src/entity/Certificate.java b/oop_employee_management/src/entity/Certificate.java deleted file mode 100644 index 359db6a..0000000 --- a/oop_employee_management/src/entity/Certificate.java +++ /dev/null @@ -1,52 +0,0 @@ -package entity; - -import java.time.LocalDate; - -public class Certificate { - private String id; - private String name; - private String rank; - private LocalDate date; - - public Certificate() { - } - - public Certificate(String id, String name, String rank, LocalDate date) { - this.id = id; - this.name = name; - this.rank = rank; - this.date = date; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getRank() { - return rank; - } - - public void setRank(String rank) { - this.rank = rank; - } - - public LocalDate getDate() { - return date; - } - - public void setDate(LocalDate date) { - this.date = date; - } -} diff --git a/oop_employee_management/src/entity/Employee.java b/oop_employee_management/src/entity/Employee.java deleted file mode 100644 index 8873ec4..0000000 --- a/oop_employee_management/src/entity/Employee.java +++ /dev/null @@ -1,75 +0,0 @@ -package entity; - -import java.time.LocalDate; -import java.util.List; - -public abstract class Employee { - public static long count = 0; - protected String id; - protected String fullName; - protected LocalDate birthday; - protected String phone; - protected String email; - protected List certificates; - - public Employee() {} - - public Employee(String id, String fullName, LocalDate birthday, String phone, String email, List certificates) { - this.id = id; - this.fullName = fullName; - this.birthday = birthday; - this.phone = phone; - this.email = email; - this.certificates = certificates; - } - - public abstract void showInformation(); - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFullName() { - return fullName; - } - - public void setFullName(String fullName) { - this.fullName = fullName; - } - - public LocalDate getBirthday() { - return birthday; - } - - public void setBirthday(LocalDate birthday) { - this.birthday = birthday; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public List getCertificates() { - return certificates; - } - - public void setCertificates(List certificates) { - this.certificates = certificates; - } -} diff --git a/oop_employee_management/src/entity/Experience.java b/oop_employee_management/src/entity/Experience.java deleted file mode 100644 index 005dfe7..0000000 --- a/oop_employee_management/src/entity/Experience.java +++ /dev/null @@ -1,57 +0,0 @@ -package entity; - -import java.time.LocalDate; -import java.util.List; - -public class Experience extends Employee { - private int yearOfExperience; - private String proSkill; - - public Experience() { - } - - public Experience(int yearOfExperience, String proSkill) { - this.yearOfExperience = yearOfExperience; - this.proSkill = proSkill; - } - - public Experience(String id, String fullName, LocalDate birthday, String phone, String email, List certificates, int yearOfExperience, String proSkill) { - super(id, fullName, birthday, phone, email, certificates); - this.yearOfExperience = yearOfExperience; - this.proSkill = proSkill; - } - - @Override - public void showInformation() { - System.out.println(this); - } - - public int getYearOfExperience() { - return yearOfExperience; - } - - public void setYearOfExperience(int yearOfExperience) { - this.yearOfExperience = yearOfExperience; - } - - public String getProSkill() { - return proSkill; - } - - public void setProSkill(String proSkill) { - this.proSkill = proSkill; - } - - @Override - public String toString() { - return "Experience{" + - "id='" + id + '\'' + - ", fullName='" + fullName + '\'' + - ", birthday=" + birthday + - ", phone='" + phone + '\'' + - ", email='" + email + '\'' + - ", yearOfExperience=" + yearOfExperience + - ", proSkill='" + proSkill + '\'' + - '}'; - } -} diff --git a/oop_employee_management/src/entity/Fresher.java b/oop_employee_management/src/entity/Fresher.java deleted file mode 100644 index 993a6a6..0000000 --- a/oop_employee_management/src/entity/Fresher.java +++ /dev/null @@ -1,70 +0,0 @@ -package entity; - -import java.time.LocalDate; -import java.util.List; - -public class Fresher extends Employee { - - private LocalDate graduationDate; - private String graduationRank; - private String universityName; - - public Fresher() { - } - - public Fresher(LocalDate graduationDate, String graduationRank, String universityName) { - this.graduationDate = graduationDate; - this.graduationRank = graduationRank; - this.universityName = universityName; - } - - public Fresher(String id, String fullName, LocalDate birthday, String phone, String email, List certificates, LocalDate graduationDate, String graduationRank, String universityName) { - super(id, fullName, birthday, phone, email, certificates); - this.graduationDate = graduationDate; - this.graduationRank = graduationRank; - this.universityName = universityName; - } - - @Override - public void showInformation() { - System.out.println(this); - } - - public LocalDate getGraduationDate() { - return graduationDate; - } - - public void setGraduationDate(LocalDate graduationDate) { - this.graduationDate = graduationDate; - } - - public String getGraduationRank() { - return graduationRank; - } - - public void setGraduationRank(String graduationRank) { - this.graduationRank = graduationRank; - } - - public String getEducation() { - return universityName; - } - - public void setEducation(String education) { - this.universityName = education; - } - - @Override - public String toString() { - return "Fresher{" + - "id='" + id + '\'' + - ", fullName='" + fullName + '\'' + - ", birthday=" + birthday + - ", phone='" + phone + '\'' + - ", email='" + email + '\'' + - ", graduationDate=" + graduationDate + - ", graduationRank='" + graduationRank + '\'' + - ", universityName='" + universityName + '\'' + - '}'; - } -} diff --git a/oop_employee_management/src/entity/Intern.java b/oop_employee_management/src/entity/Intern.java deleted file mode 100644 index 61d19b5..0000000 --- a/oop_employee_management/src/entity/Intern.java +++ /dev/null @@ -1,69 +0,0 @@ -package entity; - -import java.time.LocalDate; -import java.util.List; - -public class Intern extends Employee { - private String major; - private int semester; - private String universityName; - - public Intern() { - } - - public Intern(String major, int semester, String universityName) { - this.major = major; - this.semester = semester; - this.universityName = universityName; - } - - public Intern(String id, String fullName, LocalDate birthday, String phone, String email, List certificates, String major, int semester, String universityName) { - super(id, fullName, birthday, phone, email, certificates); - this.major = major; - this.semester = semester; - this.universityName = universityName; - } - - @Override - public void showInformation() { - System.out.println(this); - } - - public String getMajor() { - return major; - } - - public void setMajor(String major) { - this.major = major; - } - - public int getSemester() { - return semester; - } - - public void setSemester(int semester) { - this.semester = semester; - } - - public String getUniversityName() { - return universityName; - } - - public void setUniversityName(String universityName) { - this.universityName = universityName; - } - - @Override - public String toString() { - return "Intern{" + - "id='" + id + '\'' + - ", fullName='" + fullName + '\'' + - ", birthday=" + birthday + - ", phone='" + phone + '\'' + - ", email='" + email + '\'' + - ", major='" + major + '\'' + - ", semester=" + semester + - ", universityName='" + universityName + '\'' + - '}'; - } -} diff --git a/oop_employee_management/src/exception/BirthDayException.java b/oop_employee_management/src/exception/BirthDayException.java deleted file mode 100644 index cdeb54f..0000000 --- a/oop_employee_management/src/exception/BirthDayException.java +++ /dev/null @@ -1,7 +0,0 @@ -package exception; - -public class BirthDayException extends Exception { - public BirthDayException(String message) { - super(message); - } -} diff --git a/oop_employee_management/src/exception/EmailException.java b/oop_employee_management/src/exception/EmailException.java deleted file mode 100644 index 24688f7..0000000 --- a/oop_employee_management/src/exception/EmailException.java +++ /dev/null @@ -1,4 +0,0 @@ -package exception; - -public class EmailException extends Exception { -} diff --git a/oop_employee_management/src/exception/FullNameException.java b/oop_employee_management/src/exception/FullNameException.java deleted file mode 100644 index c9a6977..0000000 --- a/oop_employee_management/src/exception/FullNameException.java +++ /dev/null @@ -1,8 +0,0 @@ -package exception; - -public class FullNameException extends Exception { - - public FullNameException(String message) { - super(message); - } -} diff --git a/oop_employee_management/src/exception/PhoneException.java b/oop_employee_management/src/exception/PhoneException.java deleted file mode 100644 index c46a667..0000000 --- a/oop_employee_management/src/exception/PhoneException.java +++ /dev/null @@ -1,8 +0,0 @@ -package exception; - -public class PhoneException extends Exception { - - public PhoneException(String message) { - super(message); - } -} diff --git a/oop_employee_management/src/service/EmployeeManager.java b/oop_employee_management/src/service/EmployeeManager.java deleted file mode 100644 index 9a88348..0000000 --- a/oop_employee_management/src/service/EmployeeManager.java +++ /dev/null @@ -1,64 +0,0 @@ -package service; - -import entity.Employee; -import entity.Experience; -import entity.Fresher; -import entity.Intern; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class EmployeeManager { - - private List employees; - - public EmployeeManager() { - this.employees = new ArrayList<>(); - } - - public void insert(Employee employee) { - this.employees.add(employee); - } - - public Employee findById(String id) { - return this.employees.stream().filter(employee -> employee.getId().equals(id)).findFirst().orElse(null); - } - - public boolean deleteById(String id) { - Employee employee = this.findById(id); - if (employee == null) { - return false; - } - this.employees.remove(employee); - return true; - } - - /** - * type = 0 => Experience - * type = 1 => Fresher - * type = 2 => Intern - */ - public List findByType(int type) { - return this.employees.stream() - .filter(employee -> { - if (type == 0) { - return employee instanceof Experience; - } - if (type == 1) { - return employee instanceof Fresher; - } - if (type == 2) { - return employee instanceof Intern; - } - return false; - }) - .collect(Collectors.toList()); - } - - public List findAll() { - return this.employees; - } - - -} diff --git a/oop_employee_management/src/service/ValidatorService.java b/oop_employee_management/src/service/ValidatorService.java deleted file mode 100644 index 21e4996..0000000 --- a/oop_employee_management/src/service/ValidatorService.java +++ /dev/null @@ -1,27 +0,0 @@ -package service; - -import exception.BirthDayException; -import exception.EmailException; -import exception.FullNameException; -import exception.PhoneException; - -import java.time.LocalDate; - -public class ValidatorService { - - public static void birthdayCheck(LocalDate birthday) throws BirthDayException { - // TODO HERE - } - - public static void phoneCheck(String phone) throws PhoneException { - // TODO HERE - } - - public static void emailCheck(String email) throws EmailException { - // TODO HERE - } - - public static void nameCheck(String name) throws FullNameException { - // TODO HERE - } -} diff --git a/oop_employee_management/src/ui/ScannerFactory.java b/oop_employee_management/src/ui/ScannerFactory.java deleted file mode 100644 index 22e8137..0000000 --- a/oop_employee_management/src/ui/ScannerFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -package ui; - -import java.util.Scanner; - -public class ScannerFactory { - - private static Scanner SCANNER; - - public static Scanner getScanner() { - if (SCANNER == null) { - SCANNER = new Scanner(System.in); - } - return SCANNER; - } -} diff --git a/oop_employee_management/src/ui/UIManager.java b/oop_employee_management/src/ui/UIManager.java deleted file mode 100644 index 44b323c..0000000 --- a/oop_employee_management/src/ui/UIManager.java +++ /dev/null @@ -1,113 +0,0 @@ -package ui; - -import entity.Employee; -import entity.Experience; -import entity.Fresher; -import entity.Intern; -import exception.BirthDayException; -import exception.EmailException; -import exception.FullNameException; -import exception.PhoneException; -import service.EmployeeManager; -import service.ValidatorService; - -import java.util.Scanner; - -public class UIManager { - - private EmployeeManager employeeManager = new EmployeeManager(); - - /** - * @param type - * @return Employee - * type = 0 => Experience - * type = 1 => Fresher - * type = 2 => Intern - */ - public void insert(int type) { - Employee employee = null; - if (type == 0) { - employee = insertExperience(); - } - if (type == 1) { - employee = insertFresher(); - } - if (type == 2) { - employee = insertIntern(); - } - - try { - checkData(employee); - } catch (BirthDayException e) { - // insert => insert(type); - insert(type); - } catch (PhoneException e) { - // insert => insert(type); - insert(type); - } catch (EmailException e) { - // insert => insert(type); - insert(type); - } catch (FullNameException e) { - // insert => insert(type); - insert(type); - } - - this.employeeManager.insert(employee); - } - - private Experience insertExperience() { - Experience experience = new Experience(); - Scanner scanner = ScannerFactory.getScanner(); - System.out.print("Input ID: "); - String id = scanner.nextLine(); - System.out.print("Input Name: "); - String name = scanner.nextLine(); - System.out.print("Input Phone: "); - String phone = scanner.nextLine(); - System.out.print("Input Email: "); - String email = scanner.nextLine(); - - // TODO - return experience; - } - - private Intern insertIntern() { - - Intern intern = new Intern(); - // TODO - return intern; - } - - private Fresher insertFresher() { - Fresher fresher = new Fresher(); - // TODO - return fresher; - } - - public void update() { - System.out.print("Input ID to update: "); - String id = ScannerFactory.getScanner().nextLine(); - Employee employee = this.employeeManager.findById(id); - // TODO HERE - } - - public void delete() { - System.out.print("Input ID to deleet: "); - String id = ScannerFactory.getScanner().nextLine(); - this.employeeManager.deleteById(id); - // TODO SHOW MESSAGE HERE - } - - public void showAllEmployee() { - this.employeeManager.findAll().forEach(Employee::showInformation); - } - - private void checkData(Employee employee) throws BirthDayException, PhoneException, EmailException, FullNameException { - ValidatorService.birthdayCheck(employee.getBirthday()); - ValidatorService.phoneCheck(employee.getPhone()); - ValidatorService.emailCheck(employee.getEmail()); - ValidatorService.nameCheck(employee.getFullName()); - } - - // TODO -} diff --git a/synthetic_exercise_oop_java/src/Main.java b/synthetic_exercise_oop_java/src/Main.java deleted file mode 100644 index 91ba70b..0000000 --- a/synthetic_exercise_oop_java/src/Main.java +++ /dev/null @@ -1,6 +0,0 @@ -public class Main { - - public static void main(String[] args) { - // You can run the exercise for earch package. In each package have Main class. - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Engineer.java b/synthetic_exercise_oop_java/src/b1/Engineer.java deleted file mode 100644 index 62193ca..0000000 --- a/synthetic_exercise_oop_java/src/b1/Engineer.java +++ /dev/null @@ -1,30 +0,0 @@ -package b1; - -import java.time.LocalDate; - -public class Engineer extends Officer { - private String branch; - public Engineer(String name, int age, String gender, String address, String branch) { - super(name, age, gender, address); - this.branch = branch; - } - - public String getBranch() { - return branch; - } - - public void setBranch(String branch) { - this.branch = branch; - } - - @Override - public String toString() { - return "Engineer{" + - "branch='" + branch + '\'' + - ", name='" + name + '\'' + - ", age=" + age + - ", gender='" + gender + '\'' + - ", address='" + address + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Main.java b/synthetic_exercise_oop_java/src/b1/Main.java deleted file mode 100644 index d8fbe23..0000000 --- a/synthetic_exercise_oop_java/src/b1/Main.java +++ /dev/null @@ -1,106 +0,0 @@ -package b1; - -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerOfficer managerOfficer = new ManagerOfficer(); - while (true) { - System.out.println("Application Manager Officer"); - System.out.println("Enter 1: To insert officer"); - System.out.println("Enter 2: To search officer by name: "); - System.out.println("Enter 3: To show information officers"); - System.out.println("Enter 4: To exit:"); - String line = scanner.nextLine(); - switch (line) { - case "1": { - System.out.println("Enter a: to insert Enginner"); - System.out.println("Enter b: to insert Worker"); - System.out.println("Enter c: to insert Staff"); - String type = scanner.nextLine(); - switch (type) { - case "a": { - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter age:"); - int age = scanner.nextInt(); - System.out.print("Enter gender: "); - scanner.nextLine(); - String gender = scanner.nextLine(); - System.out.print("Enter address: "); - String address = scanner.nextLine(); - System.out.print("Enter branch: "); - String branch = scanner.nextLine(); - Officer engineer = new Engineer(name, age, gender, address, branch); - managerOfficer.addOfficer(engineer); - System.out.println(engineer.toString()); - break; - - } - case "b": { - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter age:"); - int age = scanner.nextInt(); - System.out.print("Enter gender: "); - scanner.nextLine(); - String gender = scanner.nextLine(); - System.out.print("Enter address: "); - String address = scanner.nextLine(); - System.out.print("Enter level: "); - int level = scanner.nextInt(); - Officer worker = new Worker(name, age, gender, address, level); - managerOfficer.addOfficer(worker); - System.out.println(worker.toString()); - scanner.nextLine(); - break; - } - case "c": { - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter age: "); - int age = scanner.nextInt(); - System.out.print("Enter gender: "); - scanner.nextLine(); - String gender = scanner.nextLine(); - System.out.print("Enter address: "); - String address = scanner.nextLine(); - System.out.print("Enter task: "); - String task = scanner.nextLine(); - Officer staff = new Staff(name, age, gender, address, task); - managerOfficer.addOfficer(staff); - System.out.println(staff.toString()); - break; - } - default: - System.out.println("Invalid"); - break; - } - break; - } - case "2": { - System.out.print("Enter name to search: "); - String name = scanner.nextLine(); - managerOfficer.searchOfficerByName(name).forEach(officer -> { - System.out.println(officer.toString()); - }); - break; - } - case "3": { - managerOfficer.showListInforOfficer(); - break; - } - case "4": { - return; - } - default: - System.out.println("Invalid"); - continue; - } - - } - } - -} diff --git a/synthetic_exercise_oop_java/src/b1/ManagerOfficer.java b/synthetic_exercise_oop_java/src/b1/ManagerOfficer.java deleted file mode 100644 index 376edfe..0000000 --- a/synthetic_exercise_oop_java/src/b1/ManagerOfficer.java +++ /dev/null @@ -1,25 +0,0 @@ -package b1; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class ManagerOfficer { - private List officers; - - public ManagerOfficer() { - this.officers = new ArrayList<>(); - } - - public void addOfficer(Officer officer) { - this.officers.add(officer); - } - - public List searchOfficerByName(String name) { - return this.officers.stream().filter(o -> o.getName().contains(name)).collect(Collectors.toList()); - } - - public void showListInforOfficer() { - this.officers.forEach(o -> System.out.println(o.toString())); - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Officer.java b/synthetic_exercise_oop_java/src/b1/Officer.java deleted file mode 100644 index 9b22132..0000000 --- a/synthetic_exercise_oop_java/src/b1/Officer.java +++ /dev/null @@ -1,49 +0,0 @@ -package b1; - -import java.time.LocalDate; - -public class Officer { - protected String name; - protected int age; - protected String gender; - protected String address; - - public Officer(String name, int age, String gender, String address) { - this.name = name; - this.age = age; - this.gender = gender; - this.address = address; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getGender() { - return gender; - } - - public void setGender(String gender) { - this.gender = gender; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Staff.java b/synthetic_exercise_oop_java/src/b1/Staff.java deleted file mode 100644 index af58bad..0000000 --- a/synthetic_exercise_oop_java/src/b1/Staff.java +++ /dev/null @@ -1,30 +0,0 @@ -package b1; - -import java.time.LocalDate; - -public class Staff extends Officer { - private String task; - public Staff(String name, int age, String gender, String address, String task) { - super(name, age, gender, address); - this.task = task; - } - - public String getTask() { - return task; - } - - public void setTask(String task) { - this.task = task; - } - - @Override - public String toString() { - return "Staff{" + - "task='" + task + '\'' + - ", name='" + name + '\'' + - ", age=" + age + - ", gender='" + gender + '\'' + - ", address='" + address + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b1/Worker.java b/synthetic_exercise_oop_java/src/b1/Worker.java deleted file mode 100644 index 76aa86d..0000000 --- a/synthetic_exercise_oop_java/src/b1/Worker.java +++ /dev/null @@ -1,31 +0,0 @@ -package b1; - -import java.time.LocalDate; - -public class Worker extends Officer { - private int level; - - public Worker(String name, int age, String gender, String address, int level) { - super(name, age, gender, address); - this.level = level; - } - - public int getLevel() { - return level; - } - - public void setLevel(int level) { - this.level = level; - } - - @Override - public String toString() { - return "Worker{" + - "level=" + level + - ", name='" + name + '\'' + - ", age=" + age + - ", gender='" + gender + '\'' + - ", address='" + address + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Book.java b/synthetic_exercise_oop_java/src/b2/Book.java deleted file mode 100644 index 9c3afc1..0000000 --- a/synthetic_exercise_oop_java/src/b2/Book.java +++ /dev/null @@ -1,40 +0,0 @@ -package b2; - -public class Book extends Document { - private String author; - private int numerPage; - - - public Book(String id, String nxb, int number, String author, int numberPage) { - super(id, nxb, number); - this.author = author; - this.numerPage = numberPage; - } - - public String getAuthor() { - return author; - } - - public void setAuthor(String author) { - this.author = author; - } - - public int getNumerPage() { - return numerPage; - } - - public void setNumerPage(int numerPage) { - this.numerPage = numerPage; - } - - @Override - public String toString() { - return "Book{" + - "author='" + author + '\'' + - ", numerPage=" + numerPage + - ", id='" + id + '\'' + - ", nxb='" + nxb + '\'' + - ", number='" + number + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Document.java b/synthetic_exercise_oop_java/src/b2/Document.java deleted file mode 100644 index a6552e5..0000000 --- a/synthetic_exercise_oop_java/src/b2/Document.java +++ /dev/null @@ -1,37 +0,0 @@ -package b2; - -public class Document { - protected String id; - protected String nxb; - protected int number; - - public Document(String id, String nxb, int number) { - this.id = id; - this.nxb = nxb; - this.number = number; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getNxb() { - return nxb; - } - - public void setNxb(String nxb) { - this.nxb = nxb; - } - - public int getNumber() { - return number; - } - - public void setNumber(int number) { - this.number = number; - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Journal.java b/synthetic_exercise_oop_java/src/b2/Journal.java deleted file mode 100644 index 56d2586..0000000 --- a/synthetic_exercise_oop_java/src/b2/Journal.java +++ /dev/null @@ -1,40 +0,0 @@ -package b2; - -public class Journal extends Document { - - private int issueNumber; - private int monthIssue; - - public Journal(String id, String nxb, int number, int issueNumber, int monthIssue) { - super(id, nxb, number); - this.issueNumber = issueNumber; - this.monthIssue = monthIssue; - } - - public int getIssueNumber() { - return issueNumber; - } - - public void setIssueNumber(int issueNumber) { - this.issueNumber = issueNumber; - } - - public int getMonthIssue() { - return monthIssue; - } - - public void setMonthIssue(int monthIssue) { - this.monthIssue = monthIssue; - } - - @Override - public String toString() { - return "Journal{" + - "issueNumber=" + issueNumber + - ", monthIssue=" + monthIssue + - ", id='" + id + '\'' + - ", nxb='" + nxb + '\'' + - ", number='" + number + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Main.java b/synthetic_exercise_oop_java/src/b2/Main.java deleted file mode 100644 index 88cf261..0000000 --- a/synthetic_exercise_oop_java/src/b2/Main.java +++ /dev/null @@ -1,127 +0,0 @@ -package b2; - -import b1.ManagerOfficer; - -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerDocument managerDocument = new ManagerDocument(); - while (true) { - System.out.println("Application Manager Document"); - System.out.println("Enter 1: To insert document"); - System.out.println("Enter 2: To search document by category: "); - System.out.println("Enter 3: To show information documents"); - System.out.println("Enter 4: To remove document by id"); - System.out.println("Enter 5: To exit:"); - String line = scanner.nextLine(); - switch (line) { - case "1": { - System.out.println("Enter a: to insert Book"); - System.out.println("Enter b: to insert Newspaper"); - System.out.println("Enter c: to insert Journal"); - String type = scanner.nextLine(); - switch (type) { - case "a": { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - System.out.print("Enter nxb:"); - String nxb = scanner.nextLine(); - System.out.print("Enter number: "); - int number = scanner.nextInt(); - System.out.print("Enter author: "); - scanner.nextLine(); - String author = scanner.nextLine(); - System.out.print("Enter page number: "); - int pageNumber = scanner.nextInt(); - Document book = new Book(id, nxb, number, author, pageNumber); - managerDocument.addDocument(book); - System.out.println(book.toString()); - scanner.nextLine(); - break; - - } - case "b": { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - System.out.print("Enter nxb:"); - String nxb = scanner.nextLine(); - System.out.print("Enter number: "); - int number = scanner.nextInt(); - System.out.print("Enter Day issue: "); - int dayIssue = scanner.nextInt(); - Document newspaper = new Newspaper(id, nxb, number, dayIssue); - managerDocument.addDocument(newspaper); - System.out.println(newspaper.toString()); - scanner.nextLine(); - break; - } - case "c": { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - System.out.print("Enter nxb:"); - String nxb = scanner.nextLine(); - System.out.print("Enter number: "); - int number = scanner.nextInt(); - System.out.print("Enter issue number : "); - int issueNumber = scanner.nextInt(); - System.out.print("Enter issue month : "); - int issueMonth = scanner.nextInt(); - Document journal = new Journal(id, nxb, number, issueNumber, issueMonth); - managerDocument.addDocument(journal); - System.out.println(journal.toString()); - scanner.nextLine(); - break; - } - default: - break; - } - break; - } - case "2": { - System.out.println("Enter a to search book"); - System.out.println("Enter b to search newspaper"); - System.out.println("Enter a to search journal"); - String choise = scanner.nextLine(); - switch (choise) { - case "a": { - managerDocument.searchByBook(); - break; - } - case "b": { - managerDocument.searchByNewspaper(); - break; - } - case "c": - managerDocument.searchByJournal(); - break; - default: - System.out.println("Invalid"); - break; - } - break; - } - case "3": { - managerDocument.showInfor(); - break; - } - case "4": { - System.out.print("Enter id to remove: "); - String id = scanner.nextLine(); - System.out.println(managerDocument.deleteDocument(id) ? "Success" : "Fail"); - } - break; - case "5": { - return; - } - default: - System.out.println("Invalid"); - continue; - } - - } - } - -} diff --git a/synthetic_exercise_oop_java/src/b2/ManagerDocument.java b/synthetic_exercise_oop_java/src/b2/ManagerDocument.java deleted file mode 100644 index 14d765a..0000000 --- a/synthetic_exercise_oop_java/src/b2/ManagerDocument.java +++ /dev/null @@ -1,43 +0,0 @@ -package b2; - -import java.util.ArrayList; -import java.util.List; - -public class ManagerDocument { - List documents; - - public ManagerDocument() { - this.documents = new ArrayList<>(); - } - - public void addDocument(Document document) { - this.documents.add(document); - } - - public boolean deleteDocument(String id) { - Document doc = this.documents.stream() - .filter(document -> document.getId().equals(id)) - .findFirst().orElse(null); - if (doc == null) { - return false; - } - this.documents.remove(doc); - return true; - } - - public void showInfor() { - this.documents.forEach(documents -> System.out.println(documents.toString())); - } - - public void searchByBook() { - this.documents.stream().filter(doc -> doc instanceof Book).forEach(doc -> System.out.println(doc.toString())); - } - - public void searchByNewspaper() { - this.documents.stream().filter(doc -> doc instanceof Newspaper).forEach(doc -> System.out.println(doc.toString())); - } - - public void searchByJournal() { - this.documents.stream().filter(doc -> doc instanceof Journal).forEach(doc -> System.out.println(doc.toString())); - } -} diff --git a/synthetic_exercise_oop_java/src/b2/Newspaper.java b/synthetic_exercise_oop_java/src/b2/Newspaper.java deleted file mode 100644 index 5f572d4..0000000 --- a/synthetic_exercise_oop_java/src/b2/Newspaper.java +++ /dev/null @@ -1,28 +0,0 @@ -package b2; - -public class Newspaper extends Document { - private int dayIssue; - - public Newspaper(String id, String nxb, int number, int dayIssue) { - super(id, nxb, number); - this.dayIssue = dayIssue; - } - - public int getDayIssue() { - return dayIssue; - } - - public void setDayIssue(int dayIssue) { - this.dayIssue = dayIssue; - } - - @Override - public String toString() { - return "Newspaper{" + - "dayIssue=" + dayIssue + - ", id='" + id + '\'' + - ", nxb='" + nxb + '\'' + - ", number='" + number + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/Candidate.java b/synthetic_exercise_oop_java/src/b3/Candidate.java deleted file mode 100644 index ec5cb47..0000000 --- a/synthetic_exercise_oop_java/src/b3/Candidate.java +++ /dev/null @@ -1,47 +0,0 @@ -package b3; - -public class Candidate { - protected String id; - protected String name; - protected String address; - protected int priority; - - public Candidate(String id, String name, String address, int priority) { - this.id = id; - this.name = name; - this.address = address; - this.priority = priority; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public int getPriority() { - return priority; - } - - public void setPriority(int priority) { - this.priority = priority; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/CandidateA.java b/synthetic_exercise_oop_java/src/b3/CandidateA.java deleted file mode 100644 index 6a2fcfa..0000000 --- a/synthetic_exercise_oop_java/src/b3/CandidateA.java +++ /dev/null @@ -1,20 +0,0 @@ -package b3; - -public class CandidateA extends Candidate { - public static final String MON_TOAN = "Toan"; - public static final String MON_LY = "Ly"; - public static final String MON_HOA = "Hoa"; - public CandidateA(String id, String name, String address, int priority) { - super(id, name, address, priority); - } - - @Override - public String toString() { - return "CandidateA{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", address='" + address + '\'' + - ", priority=" + priority + ", Subject: " + MON_TOAN + " - " + MON_LY + " - " + MON_HOA + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/CandidateB.java b/synthetic_exercise_oop_java/src/b3/CandidateB.java deleted file mode 100644 index 8afc14e..0000000 --- a/synthetic_exercise_oop_java/src/b3/CandidateB.java +++ /dev/null @@ -1,22 +0,0 @@ -package b3; - -public class CandidateB extends Candidate { - - public static final String MON_TOAN = "Toan"; - public static final String MON_HOA = "Hoa"; - public static final String MON_SINH = "Sinh"; - - public CandidateB(String id, String name, String address, int priority) { - super(id, name, address, priority); - } - - @Override - public String toString() { - return "CandidateB{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", address='" + address + '\'' + - ", priority=" + priority + ", Subject: " + MON_TOAN + " - " + MON_SINH + " - " + MON_HOA + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/CandidateC.java b/synthetic_exercise_oop_java/src/b3/CandidateC.java deleted file mode 100644 index 15242bb..0000000 --- a/synthetic_exercise_oop_java/src/b3/CandidateC.java +++ /dev/null @@ -1,22 +0,0 @@ -package b3; - -public class CandidateC extends Candidate { - - public static final String MON_VAN = "Van"; - public static final String MON_SU = "Su"; - public static final String MON_DIA = "Dia"; - - public CandidateC(String id, String name, String address, int priority) { - super(id, name, address, priority); - } - - @Override - public String toString() { - return "CandidateC{" + - "id='" + id + '\'' + - ", name='" + name + '\'' + - ", address='" + address + '\'' + - ", priority=" + priority + ", Subject: " + MON_VAN + " - " + MON_SU + " - " + MON_DIA + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b3/Main.java b/synthetic_exercise_oop_java/src/b3/Main.java deleted file mode 100644 index daa0aaf..0000000 --- a/synthetic_exercise_oop_java/src/b3/Main.java +++ /dev/null @@ -1,88 +0,0 @@ -package b3; - -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerCandidate managerCandidate = new ManagerCandidate(); - while (true) { - System.out.println("Application Manager Candidate"); - System.out.println("Enter 1: To insert candidate"); - System.out.println("Enter 2: To show information of candidate: "); - System.out.println("Enter 3: To search candidate by id"); - System.out.println("Enter 4: To exit:"); - String line = scanner.nextLine(); - switch (line) { - case "1": { - System.out.println("Enter a: to insert Candidate A"); - System.out.println("Enter b: to insert Candidate B"); - System.out.println("Enter c: to insert Candidate C"); - String type = scanner.nextLine(); - switch (type) { - case "a": { - managerCandidate.add(createCadidate(scanner, "a")); - break; - - } - case "b": { - managerCandidate.add(createCadidate(scanner, "b")); - break; - } - case "c": { - managerCandidate.add(createCadidate(scanner, "c")); - break; - } - default: - System.out.println("Invalid"); - break; - } - break; - } - case "2": { - managerCandidate.showInfor(); - break; - } - case "3": { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - Candidate candidate = managerCandidate.searchById(id); - if (candidate == null) { - System.out.println("Not found"); - } else { - System.out.println(candidate.toString()); - } - break; - } - case "4": { - return; - } - default: - System.out.println("Invalid"); - continue; - } - - } - } - - public static Candidate createCadidate(Scanner scanner, String cate) { - System.out.print("Enter ID: "); - String id = scanner.nextLine(); - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter address: "); - String address = scanner.nextLine(); - System.out.print("Enter Priotity: "); - int priority = scanner.nextInt(); - scanner.nextLine(); - if (cate.equals("a")) { - return new CandidateA(id, name,address,priority); - } else if (cate.equals("b")) { - return new CandidateB(id, name,address,priority); - } else { - return new CandidateC(id, name,address,priority); - } - - } -} diff --git a/synthetic_exercise_oop_java/src/b3/ManagerCandidate.java b/synthetic_exercise_oop_java/src/b3/ManagerCandidate.java deleted file mode 100644 index 7ed3d96..0000000 --- a/synthetic_exercise_oop_java/src/b3/ManagerCandidate.java +++ /dev/null @@ -1,25 +0,0 @@ -package b3; - -import java.util.ArrayList; -import java.util.List; - -public class ManagerCandidate { - List candidates; - public ManagerCandidate() { - this.candidates = new ArrayList<>(); - } - - public void add(Candidate candidate) { - this.candidates.add(candidate); - } - - public void showInfor() { - this.candidates.forEach(candidate -> System.out.println(candidate.toString())); - } - - public Candidate searchById(String id) { - return this.candidates.stream().filter(candidate -> candidate.getId().equals(id)).findFirst().orElse(null); - } - - -} diff --git a/synthetic_exercise_oop_java/src/b4/Family.java b/synthetic_exercise_oop_java/src/b4/Family.java deleted file mode 100644 index 72aa52f..0000000 --- a/synthetic_exercise_oop_java/src/b4/Family.java +++ /dev/null @@ -1,37 +0,0 @@ -package b4; - -import java.util.List; - -public class Family { - private List presons; - private String address; - - public Family(List presons, String address) { - this.presons = presons; - this.address = address; - } - - public List getPresons() { - return presons; - } - - public void setPresons(List presons) { - this.presons = presons; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - @Override - public String toString() { - return "Family{" + - "presons=" + presons + - ", address='" + address + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b4/Main.java b/synthetic_exercise_oop_java/src/b4/Main.java deleted file mode 100644 index 382ba01..0000000 --- a/synthetic_exercise_oop_java/src/b4/Main.java +++ /dev/null @@ -1,38 +0,0 @@ -package b4; - -import java.util.ArrayList; -import java.util.List; -import java.util.Scanner; - -// This is sudo code. To overview how to do it. -// You can finish by fill you code - -public class Main { - public static void main(String[] args) { - Town town = new Town(); - Scanner scanner = new Scanner(System.in); - System.out.println("Enter n:"); - int n = scanner.nextInt(); - for(int i = 0; i < n; i++) { - // Input foreach famili - - System.out.println("Enter address:"); - scanner.nextLine(); - String address = scanner.nextLine(); - - // Enter person number in family - List persons = new ArrayList<>(); - System.out.println("Enter number person"); - int number = scanner.nextInt(); - - for (int j = 0; j < number; j++) { - // Inout person for family - } - - // After done input - town.addFamily(new Family(persons,address )); - - - } - } -} diff --git a/synthetic_exercise_oop_java/src/b4/Person.java b/synthetic_exercise_oop_java/src/b4/Person.java deleted file mode 100644 index 057a494..0000000 --- a/synthetic_exercise_oop_java/src/b4/Person.java +++ /dev/null @@ -1,58 +0,0 @@ -package b4; - -public class Person { - private String name; - private int age; - private String job; - private String passport; - - public Person(String name, int age, String job, String passport) { - this.name = name; - this.age = age; - this.job = job; - this.passport = passport; - } - - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getJob() { - return job; - } - - public void setJob(String job) { - this.job = job; - } - - public String getPassport() { - return passport; - } - - public void setPassport(String passport) { - this.passport = passport; - } - - @Override - public String toString() { - return "Person{" + - "name='" + name + '\'' + - ", age=" + age + - ", job='" + job + '\'' + - ", passport='" + passport + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b4/Town.java b/synthetic_exercise_oop_java/src/b4/Town.java deleted file mode 100644 index 82b3ee8..0000000 --- a/synthetic_exercise_oop_java/src/b4/Town.java +++ /dev/null @@ -1,24 +0,0 @@ -package b4; - -import java.util.ArrayList; -import java.util.List; - -public class Town { - List families; - - public Town() { - this.families = new ArrayList<>(); - } - - public List getFamilies() { - return families; - } - - public void setFamilies(List families) { - this.families = families; - } - - public void addFamily(Family family) { - this.families.add(family); - } -} diff --git a/synthetic_exercise_oop_java/src/b5/Hotel.java b/synthetic_exercise_oop_java/src/b5/Hotel.java deleted file mode 100644 index 42b9317..0000000 --- a/synthetic_exercise_oop_java/src/b5/Hotel.java +++ /dev/null @@ -1,38 +0,0 @@ -package b5; - -import java.util.ArrayList; -import java.util.List; - -public class Hotel { - private List persons; - - public Hotel() { - persons = new ArrayList<>(); - } - - public void add(Person person) { - this.persons.add(person); - } - - public boolean delete(String passport) { - Person person = this.persons.stream().filter(p -> p.getPassport().equals(passport)).findFirst().orElse(null); - if (person == null) { - return false; - } else { - this.persons.remove(person); - return true; - } - } - - public int calculator(String passport) { - Person person = this.persons.stream().filter(p -> p.getPassport().equals(passport)).findFirst().orElse(null); - if (person == null) { - return 0; - } - return person.getRoom().getPrice() * person.getNumberRent(); - } - - public void show() { - this.persons.forEach(p -> System.out.println(p.toString())); - } -} diff --git a/synthetic_exercise_oop_java/src/b5/Main.java b/synthetic_exercise_oop_java/src/b5/Main.java deleted file mode 100644 index 47c259f..0000000 --- a/synthetic_exercise_oop_java/src/b5/Main.java +++ /dev/null @@ -1,73 +0,0 @@ -package b5; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - Hotel hotel = new Hotel(); - while (true) { - System.out.println("Application Manager Candidate"); - System.out.println("Enter 1: To insert person for rent"); - System.out.println("Enter 2: To remove person by passport"); - System.out.println("Enter 3: To calculator price by passport"); - System.out.println("Enter 4: To show infor"); - System.out.println("Enter 5: To exit:"); - String line = scanner.nextLine(); - switch(line) { - case "1": { - System.out.print("Enter name: "); - String name = scanner.nextLine(); - System.out.print("Enter age: "); - int age = scanner.nextInt(); - System.out.print("Enter passport: "); - scanner.nextLine(); - String passport = scanner.nextLine(); - System.out.println("Choise a to rent room type A"); - System.out.println("Choise b to rent room type B"); - System.out.println("Choise c to rent room type C"); - String choise = scanner.nextLine(); - Room room; - if (choise.equals("a")) { - room = new RoomA(); - } else if (choise.equals("b")) { - room = new RoomB(); - } else if (choise.equals("c")) { - room = new RoomC(); - } else { - continue; - } - System.out.print("Enter number day for rent: "); - int numberRent = scanner.nextInt(); - Person person = new Person(name, age, passport, room, numberRent); - hotel.add(person); - scanner.nextLine(); - break; - } - case "2": { - System.out.print("Enter passport: "); - String passport = scanner.nextLine(); - hotel.delete(passport); - break; - } - case "3": { - System.out.print("Enter passport: "); - String passport = scanner.nextLine(); - System.out.println("Price: " + hotel.calculator(passport)); - break; - } - case "4": { - hotel.show(); - break; - } - case "5": { - return; - } - default: - System.out.println("Invalid"); - continue; - } - } - - } -} diff --git a/synthetic_exercise_oop_java/src/b5/Person.java b/synthetic_exercise_oop_java/src/b5/Person.java deleted file mode 100644 index 1f85bac..0000000 --- a/synthetic_exercise_oop_java/src/b5/Person.java +++ /dev/null @@ -1,66 +0,0 @@ -package b5; - -public class Person { - private String name; - private int age; - private String passport; - private Room room; - private int numberRent; - - public Person(String name, int age, String passport, Room room, int numberRent) { - this.name = name; - this.age = age; - this.passport = passport; - this.numberRent = numberRent; - this.room = room; - } - - public int getNumberRent() { - return numberRent; - } - - public void setNumberRent(int numberRent) { - this.numberRent = numberRent; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getPassport() { - return passport; - } - - public void setPassport(String passport) { - this.passport = passport; - } - - public Room getRoom() { - return room; - } - - public void setRoom(Room room) { - this.room = room; - } - - @Override - public String toString() { - return "Person{" + - "name='" + name + '\'' + - ", age=" + age + - ", passport='" + passport + '\'' + room.toString() + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b5/Room.java b/synthetic_exercise_oop_java/src/b5/Room.java deleted file mode 100644 index 3d761a2..0000000 --- a/synthetic_exercise_oop_java/src/b5/Room.java +++ /dev/null @@ -1,27 +0,0 @@ -package b5; - -public class Room { - protected String category; - protected int price; - - public Room(String category, int price) { - this.category = category; - this.price = price; - } - - public String getCategory() { - return category; - } - - public void setCategory(String category) { - this.category = category; - } - - public int getPrice() { - return price; - } - - public void setPrice(int price) { - this.price = price; - } -} diff --git a/synthetic_exercise_oop_java/src/b5/RoomA.java b/synthetic_exercise_oop_java/src/b5/RoomA.java deleted file mode 100644 index 5157f66..0000000 --- a/synthetic_exercise_oop_java/src/b5/RoomA.java +++ /dev/null @@ -1,16 +0,0 @@ -package b5; - -public class RoomA extends Room { - - public RoomA() { - super("A", 500); - } - - @Override - public String toString() { - return "RoomA{" + - "category='" + category + '\'' + - ", price=" + price + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b5/RoomB.java b/synthetic_exercise_oop_java/src/b5/RoomB.java deleted file mode 100644 index fcb01d2..0000000 --- a/synthetic_exercise_oop_java/src/b5/RoomB.java +++ /dev/null @@ -1,15 +0,0 @@ -package b5; - -public class RoomB extends Room { - public RoomB() { - super("B", 300); - } - - @Override - public String toString() { - return "RoomB{" + - "category='" + category + '\'' + - ", price=" + price + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b5/RoomC.java b/synthetic_exercise_oop_java/src/b5/RoomC.java deleted file mode 100644 index 48f7c53..0000000 --- a/synthetic_exercise_oop_java/src/b5/RoomC.java +++ /dev/null @@ -1,15 +0,0 @@ -package b5; - -public class RoomC extends Room { - public RoomC() { - super("C", 100); - } - - @Override - public String toString() { - return "RoomC{" + - "category='" + category + '\'' + - ", price=" + price + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b6/Main.java b/synthetic_exercise_oop_java/src/b6/Main.java deleted file mode 100644 index 594ac5a..0000000 --- a/synthetic_exercise_oop_java/src/b6/Main.java +++ /dev/null @@ -1,17 +0,0 @@ -package b6; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - - School school = new School(); - - // add Student to school by func add(). for ex: school.add(new Student(// infor); - - school.getStudent20YearOld(); - - school.countStudent23YearOldInDN(); - } -} diff --git a/synthetic_exercise_oop_java/src/b6/School.java b/synthetic_exercise_oop_java/src/b6/School.java deleted file mode 100644 index 9a91a34..0000000 --- a/synthetic_exercise_oop_java/src/b6/School.java +++ /dev/null @@ -1,25 +0,0 @@ -package b6; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -public class School { - private List students; - - public School() { - this.students = new ArrayList<>(); - } - - public void add(Student student) { - this.students.add(student); - } - - public List getStudent20YearOld() { - return this.students.stream().filter(student -> student.getAge() == 20).collect(Collectors.toList()); - } - - public long countStudent23YearOldInDN() { - return this.students.stream().filter(student -> student.getAge() == 23 && student.getHometown().equals("DN")).count(); - } -} diff --git a/synthetic_exercise_oop_java/src/b6/Student.java b/synthetic_exercise_oop_java/src/b6/Student.java deleted file mode 100644 index c1c6650..0000000 --- a/synthetic_exercise_oop_java/src/b6/Student.java +++ /dev/null @@ -1,56 +0,0 @@ -package b6; - -public class Student { - private String name; - private int age; - private String hometown; - private int classStudent; - - public Student(String name, int age, String hometown, int classStudent) { - this.name = name; - this.age = age; - this.hometown = hometown; - this.classStudent = classStudent; - } - - public int getClassStudent() { - return classStudent; - } - - public void setClassStudent(int classStudent) { - this.classStudent = classStudent; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getHometown() { - return hometown; - } - - public void setHometown(String hometown) { - this.hometown = hometown; - } - - @Override - public String toString() { - return "Student{" + - "name='" + name + '\'' + - ", age=" + age + - ", hometown='" + hometown + '\'' + - '}'; - } -} diff --git a/synthetic_exercise_oop_java/src/b7/Main.java b/synthetic_exercise_oop_java/src/b7/Main.java deleted file mode 100644 index b3668df..0000000 --- a/synthetic_exercise_oop_java/src/b7/Main.java +++ /dev/null @@ -1,19 +0,0 @@ -package b7; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerTeacher managerTeacher = new ManagerTeacher(); - while (true) { - // show input for user choise - // 1 to insert - // 2 to remove => input id. output boolean - // 4 get salary => input id. output double - // 5 exit => return - - } - } - -} diff --git a/synthetic_exercise_oop_java/src/b7/ManagerTeacher.java b/synthetic_exercise_oop_java/src/b7/ManagerTeacher.java deleted file mode 100644 index 5ee02e7..0000000 --- a/synthetic_exercise_oop_java/src/b7/ManagerTeacher.java +++ /dev/null @@ -1,33 +0,0 @@ -package b7; - -import java.util.ArrayList; -import java.util.List; - -public class ManagerTeacher { - private List teachers; - - public ManagerTeacher() { - this.teachers = new ArrayList<>(); - } - - public void add(Teacher teacher) { - this.teachers.add(teacher); - } - - public boolean deleteById(String id) { - Teacher teacher = this.teachers.stream().filter(t -> t.getId().equals(id)).findFirst().orElse(null); - if (teacher == null) { - return false; - } - this.teachers.remove(teacher); - return true; - } - - public double getSalary(String id) { - Teacher teacher = this.teachers.stream().filter(t -> t.getId().equals(id)).findFirst().orElse(null); - if (teacher == null) { - return 0; - } - return teacher.getSalary() + teacher.getBonus() + teacher.getPenaty(); - } -} diff --git a/synthetic_exercise_oop_java/src/b7/Teacher.java b/synthetic_exercise_oop_java/src/b7/Teacher.java deleted file mode 100644 index a3cc9d3..0000000 --- a/synthetic_exercise_oop_java/src/b7/Teacher.java +++ /dev/null @@ -1,88 +0,0 @@ -package b7; - -public class Teacher { - private double salary; - private double bonus; - private double penaty; - private double realSalary; - private String name; - private int age; - private String hometown; - private String id; - - - public Teacher(double salary, double bonus, double penaty, double realSalary, String name, int age, String hometown, String id) { - this.salary = salary; - this.bonus = bonus; - this.penaty = penaty; - this.realSalary = realSalary; - this.name = name; - this.age = age; - this.hometown = hometown; - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getHometown() { - return hometown; - } - - public void setHometown(String hometown) { - this.hometown = hometown; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public double getSalary() { - return salary; - } - - public void setSalary(double salary) { - this.salary = salary; - } - - public double getBonus() { - return bonus; - } - - public void setBonus(double bonus) { - this.bonus = bonus; - } - - public double getPenaty() { - return penaty; - } - - public void setPenaty(double penaty) { - this.penaty = penaty; - } - - public double getRealSalary() { - return realSalary; - } - - public void setRealSalary(double realSalary) { - this.realSalary = realSalary; - } -} diff --git a/synthetic_exercise_oop_java/src/b8/Card.java b/synthetic_exercise_oop_java/src/b8/Card.java deleted file mode 100644 index 7bf14c1..0000000 --- a/synthetic_exercise_oop_java/src/b8/Card.java +++ /dev/null @@ -1,57 +0,0 @@ -package b8; - -public class Card { - private Student student; - private String id; - private int borrowDate; - private int paymentDate; - private int bookId; - - public Card(Student student, String id, int borrowDate, int paymentDate, int bookId) { - this.student = student; - this.id = id; - this.borrowDate = borrowDate; - this.paymentDate = paymentDate; - this.bookId = bookId; - } - - public Student getStudent() { - return student; - } - - public void setStudent(Student student) { - this.student = student; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public int getBorrowDate() { - return borrowDate; - } - - public void setBorrowDate(int borrowDate) { - this.borrowDate = borrowDate; - } - - public int getPaymentDate() { - return paymentDate; - } - - public void setPaymentDate(int paymentDate) { - this.paymentDate = paymentDate; - } - - public int getBookId() { - return bookId; - } - - public void setBookId(int bookId) { - this.bookId = bookId; - } -} diff --git a/synthetic_exercise_oop_java/src/b8/Main.java b/synthetic_exercise_oop_java/src/b8/Main.java deleted file mode 100644 index a0106a3..0000000 --- a/synthetic_exercise_oop_java/src/b8/Main.java +++ /dev/null @@ -1,18 +0,0 @@ -package b8; - -import java.util.Scanner; - -public class Main { - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - ManagerCard managerCard = new ManagerCard(); - while (true) { - // show input for user choise - // 1 to insert - // 2 to remove => input id. output boolean - // 4 get salary => input id. output double - // 5 exit => return - - } - } -} diff --git a/synthetic_exercise_oop_java/src/b8/ManagerCard.java b/synthetic_exercise_oop_java/src/b8/ManagerCard.java deleted file mode 100644 index f9aec48..0000000 --- a/synthetic_exercise_oop_java/src/b8/ManagerCard.java +++ /dev/null @@ -1,26 +0,0 @@ -package b8; - -import java.util.ArrayList; -import java.util.List; - -public class ManagerCard { - - private List cards; - - public ManagerCard() { - this.cards = new ArrayList<>(); - } - - public void add(Card card) { - this.cards.add(card); - } - - public boolean delete(String id) { - Card card = this.cards.stream().filter(t -> t.getId().equals(id)).findFirst().orElse(null); - if (card == null) { - return false; - } - this.cards.remove(card); - return true; - } -} diff --git a/synthetic_exercise_oop_java/src/b8/Student.java b/synthetic_exercise_oop_java/src/b8/Student.java deleted file mode 100644 index c01e5fe..0000000 --- a/synthetic_exercise_oop_java/src/b8/Student.java +++ /dev/null @@ -1,37 +0,0 @@ -package b8; - -public class Student { - private String name; - private int age; - private String school; - - public Student(String name, int age, String school) { - this.name = name; - this.age = age; - this.school = school; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getSchool() { - return school; - } - - public void setSchool(String school) { - this.school = school; - } -} diff --git a/synthetic_exercise_oop_java/synthetic_exercise_oop_java.iml b/synthetic_exercise_oop_java/synthetic_exercise_oop_java.iml deleted file mode 100644 index c90834f..0000000 --- a/synthetic_exercise_oop_java/synthetic_exercise_oop_java.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file From 32e3923213e714f553b7954b7e37be2c2fc251a1 Mon Sep 17 00:00:00 2001 From: idiotman-2212 Date: Tue, 24 Oct 2023 19:32:47 +0700 Subject: [PATCH 3/5] Update --- Bai1/Bai1/.classpath | 6 - Bai1/Bai1/.project | 28 ----- .../Bai1/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai1/Bai1/bin/Class/PhanSo.class | Bin 2488 -> 0 bytes Bai1/Bai1/bin/Test/TestClass.class | Bin 1187 -> 0 bytes Bai1/Bai1/src/Class/PhanSo.java | 114 ------------------ Bai1/Bai1/src/Test/TestClass.java | 35 ------ Bai10/Bai10/.classpath | 10 -- Bai10/Bai10/.project | 28 ----- .../.settings/org.eclipse.jdt.core.prefs | 12 -- Bai10/Bai10/bin/BuildClass/BienLai.class | Bin 1621 -> 0 bytes Bai10/Bai10/bin/BuildClass/KhachHang.class | Bin 1460 -> 0 bytes Bai10/Bai10/bin/BuildClass/QuanLy.class | Bin 1832 -> 0 bytes Bai10/Bai10/bin/UseClass/Using.class | Bin 916 -> 0 bytes Bai10/Bai10/src/BuildClass/BienLai.java | 50 -------- Bai10/Bai10/src/BuildClass/KhachHang.java | 41 ------- Bai10/Bai10/src/BuildClass/QuanLy.java | 45 ------- Bai10/Bai10/src/UseClass/Using.java | 21 ---- Bai11/Bai11/.classpath | 10 -- Bai11/Bai11/.project | 28 ----- .../.settings/org.eclipse.jdt.core.prefs | 12 -- Bai11/Bai11/bin/BuildClass/VanBan.class | Bin 1515 -> 0 bytes Bai11/Bai11/bin/UseClass/TestClass.class | Bin 1442 -> 0 bytes Bai11/Bai11/src/BuildClass/VanBan.java | 74 ------------ Bai11/Bai11/src/UseClass/TestClass.java | 26 ---- Bai12/Bai12/.classpath | 10 -- Bai12/Bai12/.project | 28 ----- .../.settings/org.eclipse.jdt.core.prefs | 12 -- Bai12/Bai12/bin/BuildClass/MaTran.class | Bin 2148 -> 0 bytes Bai12/Bai12/bin/UseClass/TestClass.class | Bin 1484 -> 0 bytes Bai12/Bai12/src/BuildClass/MaTran.java | 77 ------------ Bai12/Bai12/src/UseClass/TestClass.java | 45 ------- Bai13/Bai13/.classpath | 10 -- Bai13/Bai13/.project | 28 ----- .../.settings/org.eclipse.jdt.core.prefs | 12 -- Bai13/Bai13/bin/BuildClass/OTo.class | Bin 1313 -> 0 bytes Bai13/Bai13/bin/BuildClass/PTGT.class | Bin 1734 -> 0 bytes Bai13/Bai13/bin/BuildClass/QLPTGT.class | Bin 2468 -> 0 bytes Bai13/Bai13/bin/BuildClass/XeMay.class | Bin 1090 -> 0 bytes Bai13/Bai13/bin/BuildClass/XeTai.class | Bin 1093 -> 0 bytes Bai13/Bai13/bin/UseClass/TestClass.class | Bin 1028 -> 0 bytes Bai13/Bai13/src/BuildClass/OTo.java | 34 ------ Bai13/Bai13/src/BuildClass/PTGT.java | 50 -------- Bai13/Bai13/src/BuildClass/QLPTGT.java | 70 ----------- Bai13/Bai13/src/BuildClass/XeMay.java | 32 ----- Bai13/Bai13/src/BuildClass/XeTai.java | 32 ----- Bai13/Bai13/src/UseClass/TestClass.java | 24 ---- Bai14/Bai14/.classpath | 10 -- Bai14/Bai14/.project | 28 ----- .../.settings/org.eclipse.jdt.core.prefs | 12 -- Bai14/Bai14/bin/BuildClass/DaGiac.class | Bin 1601 -> 0 bytes Bai14/Bai14/bin/BuildClass/TamGiac.class | Bin 1429 -> 0 bytes Bai14/Bai14/bin/UseClass/TestClass.class | Bin 2489 -> 0 bytes Bai14/Bai14/src/BuildClass/DaGiac.java | 50 -------- Bai14/Bai14/src/BuildClass/TamGiac.java | 48 -------- Bai14/Bai14/src/UseClass/TestClass.java | 69 ----------- Bai15/Bai15/.classpath | 10 -- Bai15/Bai15/.project | 28 ----- .../.settings/org.eclipse.jdt.core.prefs | 12 -- Bai15/Bai15/bin/BuildClass/Diem.class | Bin 1406 -> 0 bytes Bai15/Bai15/bin/BuildClass/TamGiac.class | Bin 1040 -> 0 bytes Bai15/Bai15/bin/UseClass/TestClass.class | Bin 1312 -> 0 bytes Bai15/Bai15/src/BuildClass/Diem.java | 50 -------- Bai15/Bai15/src/BuildClass/TamGiac.java | 40 ------ Bai15/Bai15/src/UseClass/TestClass.java | 23 ---- Bai16/Bai16/.classpath | 10 -- Bai16/Bai16/.project | 28 ----- .../.settings/org.eclipse.jdt.core.prefs | 12 -- Bai16/Bai16/bin/BuildClass/Diem.class | Bin 1406 -> 0 bytes Bai16/Bai16/bin/BuildClass/HinhTron.class | Bin 718 -> 0 bytes Bai16/Bai16/bin/UseClass/Test.class | Bin 1197 -> 0 bytes Bai16/Bai16/src/BuildClass/Diem.java | 46 ------- Bai16/Bai16/src/BuildClass/HinhTron.java | 28 ----- Bai16/Bai16/src/UseClass/Test.java | 22 ---- Bai2/Bai2/.classpath | 6 - Bai2/Bai2/.project | 28 ----- .../Bai2/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai2/Bai2/bin/Class/CanBo.class | Bin 1619 -> 0 bytes Bai2/Bai2/bin/Class/CongNhan.class | Bin 1329 -> 0 bytes Bai2/Bai2/bin/Class/KySu.class | Bin 1345 -> 0 bytes Bai2/Bai2/bin/Class/NhanVien.class | Bin 1346 -> 0 bytes Bai2/Bai2/bin/Class/QLCB.class | Bin 2235 -> 0 bytes Bai2/Bai2/bin/Testing/Test.class | Bin 974 -> 0 bytes Bai2/Bai2/src/Class/CanBo.java | 50 -------- Bai2/Bai2/src/Class/CongNhan.java | 33 ----- Bai2/Bai2/src/Class/KySu.java | 33 ----- Bai2/Bai2/src/Class/NhanVien.java | 33 ----- Bai2/Bai2/src/Class/QLCB.java | 69 ----------- Bai2/Bai2/src/Testing/Test.java | 25 ---- Bai3/Bai3/.classpath | 6 - Bai3/Bai3/.project | 28 ----- .../Bai3/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai3/Bai3/bin/Class/Bao.class | Bin 1267 -> 0 bytes Bai3/Bai3/bin/Class/QuanLySach.class | Bin 2492 -> 0 bytes Bai3/Bai3/bin/Class/Sach.class | Bin 1467 -> 0 bytes Bai3/Bai3/bin/Class/TaiLieu.class | Bin 1561 -> 0 bytes Bai3/Bai3/bin/Class/TapChi.class | Bin 1431 -> 0 bytes Bai3/Bai3/bin/Testing/Test.class | Bin 1128 -> 0 bytes Bai3/Bai3/src/Class/Bao.java | 33 ----- Bai3/Bai3/src/Class/QuanLySach.java | 82 ------------- Bai3/Bai3/src/Class/Sach.java | 39 ------ Bai3/Bai3/src/Class/TaiLieu.java | 46 ------- Bai3/Bai3/src/Class/TapChi.java | 39 ------ Bai3/Bai3/src/Testing/Test.java | 27 ----- Bai4/Bai4/.classpath | 6 - Bai4/Bai4/.project | 28 ----- .../Bai4/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai4/Bai4/bin/Class/KhoiA.class | Bin 1334 -> 0 bytes Bai4/Bai4/bin/Class/KhoiB.class | Bin 461 -> 0 bytes Bai4/Bai4/bin/Class/KhoiC.class | Bin 461 -> 0 bytes Bai4/Bai4/bin/Class/ThiSinh.class | Bin 1674 -> 0 bytes Bai4/Bai4/bin/Class/TuyenSinh.class | Bin 2554 -> 0 bytes Bai4/Bai4/bin/Testing/Test.class | Bin 1169 -> 0 bytes Bai4/Bai4/src/Class/KhoiA.java | 40 ------ Bai4/Bai4/src/Class/KhoiB.java | 15 --- Bai4/Bai4/src/Class/KhoiC.java | 15 --- Bai4/Bai4/src/Class/ThiSinh.java | 51 -------- Bai4/Bai4/src/Class/TuyenSinh.java | 70 ----------- Bai4/Bai4/src/Testing/Test.java | 29 ----- Bai5/Bai5/.classpath | 6 - Bai5/Bai5/.project | 28 ----- .../Bai5/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai5/Bai5/bin/Class/HoDan.class | Bin 2070 -> 0 bytes Bai5/Bai5/bin/Class/KhuPho.class | Bin 2511 -> 0 bytes Bai5/Bai5/bin/Class/Nguoi.class | Bin 2235 -> 0 bytes Bai5/Bai5/bin/Testing/Test.class | Bin 872 -> 0 bytes Bai5/Bai5/src/Class/HoDan.java | 61 ---------- Bai5/Bai5/src/Class/KhuPho.java | 66 ---------- Bai5/Bai5/src/Class/Nguoi.java | 73 ----------- Bai5/Bai5/src/Testing/Test.java | 20 --- Bai6/Bai6/.classpath | 6 - Bai6/Bai6/.project | 28 ----- .../Bai6/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai6/Bai6/bin/Class/KhachSan.class | Bin 2154 -> 0 bytes Bai6/Bai6/bin/Class/KhachTro.class | Bin 1803 -> 0 bytes Bai6/Bai6/bin/Class/Nguoi.class | Bin 2103 -> 0 bytes Bai6/Bai6/bin/Testing/Test.class | Bin 1150 -> 0 bytes Bai6/Bai6/src/Class/KhachSan.java | 57 --------- Bai6/Bai6/src/Class/KhachTro.java | 58 --------- Bai6/Bai6/src/Class/Nguoi.java | 62 ---------- Bai6/Bai6/src/Testing/Test.java | 24 ---- Bai7/Bai7/.classpath | 6 - Bai7/Bai7/.project | 28 ----- .../Bai7/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai7/Bai7/bin/Class/HocSinh.class | Bin 1524 -> 0 bytes Bai7/Bai7/bin/Class/Nguoi.class | Bin 2159 -> 0 bytes Bai7/Bai7/bin/Class/QLHS.class | Bin 2517 -> 0 bytes Bai7/Bai7/bin/Testing/Test.class | Bin 1054 -> 0 bytes Bai7/Bai7/src/Class/HocSinh.java | 52 -------- Bai7/Bai7/src/Class/Nguoi.java | 70 ----------- Bai7/Bai7/src/Class/QLHS.java | 64 ---------- Bai7/Bai7/src/Testing/Test.java | 25 ---- Bai8/Bai8/.classpath | 6 - Bai8/Bai8/.project | 28 ----- .../Bai8/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai8/Bai8/bin/Class/CBGV.class | Bin 1419 -> 0 bytes Bai8/Bai8/bin/Class/Nguoi.class | Bin 1368 -> 0 bytes Bai8/Bai8/bin/Class/QuanLy.class | Bin 2041 -> 0 bytes Bai8/Bai8/bin/Testing/Test.class | Bin 916 -> 0 bytes Bai8/Bai8/src/Class/CBGV.java | 52 -------- Bai8/Bai8/src/Class/Nguoi.java | 40 ------ Bai8/Bai8/src/Class/QuanLy.java | 53 -------- Bai8/Bai8/src/Testing/Test.java | 22 ---- Bai9/Bai9/.classpath | 6 - Bai9/Bai9/.project | 28 ----- .../Bai9/.settings/org.eclipse.jdt.core.prefs | 12 -- Bai9/Bai9/bin/Class/QuanLy.class | Bin 1988 -> 0 bytes Bai9/Bai9/bin/Class/SinhVien.class | Bin 1526 -> 0 bytes Bai9/Bai9/bin/Class/TheMuon.class | Bin 2328 -> 0 bytes Bai9/Bai9/bin/Testing/Test.class | Bin 915 -> 0 bytes Bai9/Bai9/src/Class/QuanLy.java | 46 ------- Bai9/Bai9/src/Class/SinhVien.java | 48 -------- Bai9/Bai9/src/Class/TheMuon.java | 75 ------------ Bai9/Bai9/src/Testing/Test.java | 22 ---- Java/1.6.java | 44 +++++++ Java/1.7.java | 56 +++++++++ Java/1.8.java | 52 ++++++++ 177 files changed, 152 insertions(+), 3629 deletions(-) delete mode 100644 Bai1/Bai1/.classpath delete mode 100644 Bai1/Bai1/.project delete mode 100644 Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai1/Bai1/bin/Class/PhanSo.class delete mode 100644 Bai1/Bai1/bin/Test/TestClass.class delete mode 100644 Bai1/Bai1/src/Class/PhanSo.java delete mode 100644 Bai1/Bai1/src/Test/TestClass.java delete mode 100644 Bai10/Bai10/.classpath delete mode 100644 Bai10/Bai10/.project delete mode 100644 Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai10/Bai10/bin/BuildClass/BienLai.class delete mode 100644 Bai10/Bai10/bin/BuildClass/KhachHang.class delete mode 100644 Bai10/Bai10/bin/BuildClass/QuanLy.class delete mode 100644 Bai10/Bai10/bin/UseClass/Using.class delete mode 100644 Bai10/Bai10/src/BuildClass/BienLai.java delete mode 100644 Bai10/Bai10/src/BuildClass/KhachHang.java delete mode 100644 Bai10/Bai10/src/BuildClass/QuanLy.java delete mode 100644 Bai10/Bai10/src/UseClass/Using.java delete mode 100644 Bai11/Bai11/.classpath delete mode 100644 Bai11/Bai11/.project delete mode 100644 Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai11/Bai11/bin/BuildClass/VanBan.class delete mode 100644 Bai11/Bai11/bin/UseClass/TestClass.class delete mode 100644 Bai11/Bai11/src/BuildClass/VanBan.java delete mode 100644 Bai11/Bai11/src/UseClass/TestClass.java delete mode 100644 Bai12/Bai12/.classpath delete mode 100644 Bai12/Bai12/.project delete mode 100644 Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai12/Bai12/bin/BuildClass/MaTran.class delete mode 100644 Bai12/Bai12/bin/UseClass/TestClass.class delete mode 100644 Bai12/Bai12/src/BuildClass/MaTran.java delete mode 100644 Bai12/Bai12/src/UseClass/TestClass.java delete mode 100644 Bai13/Bai13/.classpath delete mode 100644 Bai13/Bai13/.project delete mode 100644 Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai13/Bai13/bin/BuildClass/OTo.class delete mode 100644 Bai13/Bai13/bin/BuildClass/PTGT.class delete mode 100644 Bai13/Bai13/bin/BuildClass/QLPTGT.class delete mode 100644 Bai13/Bai13/bin/BuildClass/XeMay.class delete mode 100644 Bai13/Bai13/bin/BuildClass/XeTai.class delete mode 100644 Bai13/Bai13/bin/UseClass/TestClass.class delete mode 100644 Bai13/Bai13/src/BuildClass/OTo.java delete mode 100644 Bai13/Bai13/src/BuildClass/PTGT.java delete mode 100644 Bai13/Bai13/src/BuildClass/QLPTGT.java delete mode 100644 Bai13/Bai13/src/BuildClass/XeMay.java delete mode 100644 Bai13/Bai13/src/BuildClass/XeTai.java delete mode 100644 Bai13/Bai13/src/UseClass/TestClass.java delete mode 100644 Bai14/Bai14/.classpath delete mode 100644 Bai14/Bai14/.project delete mode 100644 Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai14/Bai14/bin/BuildClass/DaGiac.class delete mode 100644 Bai14/Bai14/bin/BuildClass/TamGiac.class delete mode 100644 Bai14/Bai14/bin/UseClass/TestClass.class delete mode 100644 Bai14/Bai14/src/BuildClass/DaGiac.java delete mode 100644 Bai14/Bai14/src/BuildClass/TamGiac.java delete mode 100644 Bai14/Bai14/src/UseClass/TestClass.java delete mode 100644 Bai15/Bai15/.classpath delete mode 100644 Bai15/Bai15/.project delete mode 100644 Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai15/Bai15/bin/BuildClass/Diem.class delete mode 100644 Bai15/Bai15/bin/BuildClass/TamGiac.class delete mode 100644 Bai15/Bai15/bin/UseClass/TestClass.class delete mode 100644 Bai15/Bai15/src/BuildClass/Diem.java delete mode 100644 Bai15/Bai15/src/BuildClass/TamGiac.java delete mode 100644 Bai15/Bai15/src/UseClass/TestClass.java delete mode 100644 Bai16/Bai16/.classpath delete mode 100644 Bai16/Bai16/.project delete mode 100644 Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai16/Bai16/bin/BuildClass/Diem.class delete mode 100644 Bai16/Bai16/bin/BuildClass/HinhTron.class delete mode 100644 Bai16/Bai16/bin/UseClass/Test.class delete mode 100644 Bai16/Bai16/src/BuildClass/Diem.java delete mode 100644 Bai16/Bai16/src/BuildClass/HinhTron.java delete mode 100644 Bai16/Bai16/src/UseClass/Test.java delete mode 100644 Bai2/Bai2/.classpath delete mode 100644 Bai2/Bai2/.project delete mode 100644 Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai2/Bai2/bin/Class/CanBo.class delete mode 100644 Bai2/Bai2/bin/Class/CongNhan.class delete mode 100644 Bai2/Bai2/bin/Class/KySu.class delete mode 100644 Bai2/Bai2/bin/Class/NhanVien.class delete mode 100644 Bai2/Bai2/bin/Class/QLCB.class delete mode 100644 Bai2/Bai2/bin/Testing/Test.class delete mode 100644 Bai2/Bai2/src/Class/CanBo.java delete mode 100644 Bai2/Bai2/src/Class/CongNhan.java delete mode 100644 Bai2/Bai2/src/Class/KySu.java delete mode 100644 Bai2/Bai2/src/Class/NhanVien.java delete mode 100644 Bai2/Bai2/src/Class/QLCB.java delete mode 100644 Bai2/Bai2/src/Testing/Test.java delete mode 100644 Bai3/Bai3/.classpath delete mode 100644 Bai3/Bai3/.project delete mode 100644 Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai3/Bai3/bin/Class/Bao.class delete mode 100644 Bai3/Bai3/bin/Class/QuanLySach.class delete mode 100644 Bai3/Bai3/bin/Class/Sach.class delete mode 100644 Bai3/Bai3/bin/Class/TaiLieu.class delete mode 100644 Bai3/Bai3/bin/Class/TapChi.class delete mode 100644 Bai3/Bai3/bin/Testing/Test.class delete mode 100644 Bai3/Bai3/src/Class/Bao.java delete mode 100644 Bai3/Bai3/src/Class/QuanLySach.java delete mode 100644 Bai3/Bai3/src/Class/Sach.java delete mode 100644 Bai3/Bai3/src/Class/TaiLieu.java delete mode 100644 Bai3/Bai3/src/Class/TapChi.java delete mode 100644 Bai3/Bai3/src/Testing/Test.java delete mode 100644 Bai4/Bai4/.classpath delete mode 100644 Bai4/Bai4/.project delete mode 100644 Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai4/Bai4/bin/Class/KhoiA.class delete mode 100644 Bai4/Bai4/bin/Class/KhoiB.class delete mode 100644 Bai4/Bai4/bin/Class/KhoiC.class delete mode 100644 Bai4/Bai4/bin/Class/ThiSinh.class delete mode 100644 Bai4/Bai4/bin/Class/TuyenSinh.class delete mode 100644 Bai4/Bai4/bin/Testing/Test.class delete mode 100644 Bai4/Bai4/src/Class/KhoiA.java delete mode 100644 Bai4/Bai4/src/Class/KhoiB.java delete mode 100644 Bai4/Bai4/src/Class/KhoiC.java delete mode 100644 Bai4/Bai4/src/Class/ThiSinh.java delete mode 100644 Bai4/Bai4/src/Class/TuyenSinh.java delete mode 100644 Bai4/Bai4/src/Testing/Test.java delete mode 100644 Bai5/Bai5/.classpath delete mode 100644 Bai5/Bai5/.project delete mode 100644 Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai5/Bai5/bin/Class/HoDan.class delete mode 100644 Bai5/Bai5/bin/Class/KhuPho.class delete mode 100644 Bai5/Bai5/bin/Class/Nguoi.class delete mode 100644 Bai5/Bai5/bin/Testing/Test.class delete mode 100644 Bai5/Bai5/src/Class/HoDan.java delete mode 100644 Bai5/Bai5/src/Class/KhuPho.java delete mode 100644 Bai5/Bai5/src/Class/Nguoi.java delete mode 100644 Bai5/Bai5/src/Testing/Test.java delete mode 100644 Bai6/Bai6/.classpath delete mode 100644 Bai6/Bai6/.project delete mode 100644 Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai6/Bai6/bin/Class/KhachSan.class delete mode 100644 Bai6/Bai6/bin/Class/KhachTro.class delete mode 100644 Bai6/Bai6/bin/Class/Nguoi.class delete mode 100644 Bai6/Bai6/bin/Testing/Test.class delete mode 100644 Bai6/Bai6/src/Class/KhachSan.java delete mode 100644 Bai6/Bai6/src/Class/KhachTro.java delete mode 100644 Bai6/Bai6/src/Class/Nguoi.java delete mode 100644 Bai6/Bai6/src/Testing/Test.java delete mode 100644 Bai7/Bai7/.classpath delete mode 100644 Bai7/Bai7/.project delete mode 100644 Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai7/Bai7/bin/Class/HocSinh.class delete mode 100644 Bai7/Bai7/bin/Class/Nguoi.class delete mode 100644 Bai7/Bai7/bin/Class/QLHS.class delete mode 100644 Bai7/Bai7/bin/Testing/Test.class delete mode 100644 Bai7/Bai7/src/Class/HocSinh.java delete mode 100644 Bai7/Bai7/src/Class/Nguoi.java delete mode 100644 Bai7/Bai7/src/Class/QLHS.java delete mode 100644 Bai7/Bai7/src/Testing/Test.java delete mode 100644 Bai8/Bai8/.classpath delete mode 100644 Bai8/Bai8/.project delete mode 100644 Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai8/Bai8/bin/Class/CBGV.class delete mode 100644 Bai8/Bai8/bin/Class/Nguoi.class delete mode 100644 Bai8/Bai8/bin/Class/QuanLy.class delete mode 100644 Bai8/Bai8/bin/Testing/Test.class delete mode 100644 Bai8/Bai8/src/Class/CBGV.java delete mode 100644 Bai8/Bai8/src/Class/Nguoi.java delete mode 100644 Bai8/Bai8/src/Class/QuanLy.java delete mode 100644 Bai8/Bai8/src/Testing/Test.java delete mode 100644 Bai9/Bai9/.classpath delete mode 100644 Bai9/Bai9/.project delete mode 100644 Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs delete mode 100644 Bai9/Bai9/bin/Class/QuanLy.class delete mode 100644 Bai9/Bai9/bin/Class/SinhVien.class delete mode 100644 Bai9/Bai9/bin/Class/TheMuon.class delete mode 100644 Bai9/Bai9/bin/Testing/Test.class delete mode 100644 Bai9/Bai9/src/Class/QuanLy.java delete mode 100644 Bai9/Bai9/src/Class/SinhVien.java delete mode 100644 Bai9/Bai9/src/Class/TheMuon.java delete mode 100644 Bai9/Bai9/src/Testing/Test.java create mode 100644 Java/1.6.java create mode 100644 Java/1.7.java create mode 100644 Java/1.8.java diff --git a/Bai1/Bai1/.classpath b/Bai1/Bai1/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai1/Bai1/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai1/Bai1/.project b/Bai1/Bai1/.project deleted file mode 100644 index c0b6442..0000000 --- a/Bai1/Bai1/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai1 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272454 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs b/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai1/Bai1/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai1/Bai1/bin/Class/PhanSo.class b/Bai1/Bai1/bin/Class/PhanSo.class deleted file mode 100644 index f4ab430de744f5d071adb46963043e69e1f8c136..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2488 zcmbVOU2_v<6n@?$G#}kGP@1ANi3w(OsTejvPrkiLb4l^4Fk9S z3mGrGV}{{E9cUey@dr5mA8%BA&hDC~1B~eG%=O69g$brm9Rr|c-GlESWr;m!M|E!%Qu6vFw@ zWqvX1teFXfp=pRA9*4q!hF$2B*=`L{^eLp~EZbb@G%99m$*9y#g~2(eYSfpFmL=<8 zGvd~)HtpwnsZG&!zEl!leRj=gE|wLB^K%~8j%(G6<*H%ZW@~D6IgU3m62<-3_sg!pj{CxlYaI`8Kfm%vrK!bW-XSZm{i!eT_%2n=Q>t>&1}UmP5AiH1WsW_ zis4WKXK*fxvrOr>&Aj2(G|b{-hH6xp?nu5gS`woR8ZP1z(`+=GroE<+;fc?*N6)|; z)Ab4I7R7K*4CfV&zD)gB0*K`m4U4#{5OWVg}CdV2!^_+kSIHyR@J;bj<>jY0vl39}H?|WSL)BXd_!n6V74C7DU2TFvW=*s_yFcRQ; z;R*RYL8|sGj+62;oLU*2+QMns{|O&$;{0G~6PM)^f4PYTFRJl>zW(&zzupdcn9>48 zX7L#59mgau4U++EXLdaZO~^+Onkn!~n?6;fj z?p20+tA|3m8-ChLyEI1HOS^RX9(>X5CjOoI15p(vlP?M3*W?vC6qBKXBtnXC3r6HS z?20@NZ`1MX&%|!5({;^r@84xZfqSWVA`KF(+HKSdw?aHP*b6>gSfQtpx?FLbrDXQP j)!E>k;PBRJ@>coEb2scG1@4lJagCAjMrR93o2>s0nJt_c diff --git a/Bai1/Bai1/bin/Test/TestClass.class b/Bai1/Bai1/bin/Test/TestClass.class deleted file mode 100644 index be5aed6b0fd45d221976022f7d59b12d173fe4cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1187 zcmZuwYflo|XVnjw z)TBS4KdR}Og%(KoGBfuv=bn4!&hI}ze*xIShah|cV_RWQ0>iteWx9I;L#gzMfPddU*CQB0SVI8A0^@np(vO?9GrdugXH{Jwmbc5Y zdLkR9vO7+{YnToTjm_0URJ$WhZWSs~}$4vT}))it^HPWH!J!A!G#- z0|^<@B%e8KXxPLfLX~Z+qM#O2`Cb8X>3%bW$7B{!>h$)OtV$2=sfK52Lc)frTP4FR z6hqh%nC!d2+A2SUT|RR+LIQ1=DE2hGP%wdV)pj^ue%YvSlHvo#g|F_E85$q}U#sqH zaO(S8@Z6hhx$cx$Qy@~bn~k!5V5&*>zKEy5x_Trmf%*JGfR87RKi43wEO)^@uyT#i z4=)_ys={Ex2v@D0z1{wplT z?zFI+S#4oO8S6CGl#y9$;bA*rOC_}MM8&sNymQX+obc0N{_`%)15B`dgfvGu+!_aA z6wCY~8TvO6!#2Hp{8Vp|z!7HgnHi^;$2TlM$09EH8!T$0+T3clf|qzjYXs+bjeRy6 c$5*@|f{%AgIN)iBH9q1UPkzSVGuwy5zZN(L6aWAK diff --git a/Bai1/Bai1/src/Class/PhanSo.java b/Bai1/Bai1/src/Class/PhanSo.java deleted file mode 100644 index d68a2c8..0000000 --- a/Bai1/Bai1/src/Class/PhanSo.java +++ /dev/null @@ -1,114 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class PhanSo { - // thuoc tinh - private int tuSo; - private int mauSo; - - // phuong thuc - // ham khoi tao khong doi so - public PhanSo() { - tuSo = 0; - mauSo = 1; - } - - // ham khoi tao co doi so - public PhanSo(int tuSo, int mauSo) { - this.tuSo = tuSo; - this.mauSo = mauSo; - } - - // ham nhap phan so - public void nhapPS(Scanner sc) { - int a; - int b; - - do { - System.out.print("\tNhap vao tu so: "); - a = sc.nextInt(); - - System.out.print("\tNhap vao mau so: "); - b = sc.nextInt(); - - // kiem tra - if (b == 0) { - System.out.println("Mau so khong duoc bang 0. Hay nhap lai!"); - } else { - tuSo = a; - mauSo = b; - } - } while (b == 0); - } - - // ham hien thi - public void hienThiPS() { - if (tuSo * mauSo < 0) { - System.out.println("\t-" + Math.abs(tuSo) + "/" + Math.abs(mauSo)); - } else { - System.out.println("\t" + Math.abs(tuSo) + "/" + Math.abs(mauSo)); - } - } - - // ham cong - public PhanSo congPS(PhanSo ps2) { - int a = tuSo * ps2.mauSo + ps2.tuSo * mauSo; - int b = mauSo * ps2.mauSo; - - return new PhanSo(a, b); - } - - // ham tru - public PhanSo truPS(PhanSo ps2) { - int a = tuSo * ps2.mauSo - ps2.tuSo * mauSo; - int b = mauSo * ps2.mauSo; - - return new PhanSo(a, b); - } - - // ham nhan - public PhanSo nhanPS(PhanSo ps2) { - int a = tuSo * ps2.tuSo; - int b = mauSo * ps2.mauSo; - - return new PhanSo(a, b); - } - - // ham chia - public PhanSo chiaPS(PhanSo ps2) { - int a = tuSo * ps2.mauSo; - int b = mauSo * ps2.tuSo; - - return new PhanSo(a, b); - } - - // ham tim uscln - private int timUSCLN(int a, int b) { - int r = a % b; - - while (r != 0) { - a = b; - b = r; - r = a % b; - } - - return b; - } - - // ham kiem tra phan so toi gian hay chua - public boolean kiemTraToiGian() { - if (timUSCLN(tuSo, mauSo) == 1) { - return true; - } - return false; - } - - // ham toi gian - public void toiGianPS() { - int x = timUSCLN(tuSo, mauSo); - - tuSo /= x; - mauSo /= x; - } -} diff --git a/Bai1/Bai1/src/Test/TestClass.java b/Bai1/Bai1/src/Test/TestClass.java deleted file mode 100644 index a38acdf..0000000 --- a/Bai1/Bai1/src/Test/TestClass.java +++ /dev/null @@ -1,35 +0,0 @@ -package Test; - -import java.util.Scanner; - -import Class.PhanSo; - -public class TestClass { - - public static void main(String[] args) { - Scanner sc=new Scanner(System.in); - PhanSo ps1=new PhanSo(); - PhanSo ps2=new PhanSo(); - PhanSo psTong =new PhanSo(); - - // nhap phan so - System.out.println("Nhap vao phan so thu nhat:"); - ps1.nhapPS(sc); - System.out.println("Nhap vao phan so thu hai:"); - ps2.nhapPS(sc); - - // tinh tong 2 phan so - psTong=ps1.congPS(ps2); - - // hien thi phan so - System.out.println("\nPhan so thu nhat la:"); - ps1.hienThiPS(); - System.out.println("\nPhan so thu hai la:"); - ps2.hienThiPS(); - System.out.println("\nPhan so tong la:"); - psTong.hienThiPS(); - - sc.close(); - } - -} diff --git a/Bai10/Bai10/.classpath b/Bai10/Bai10/.classpath deleted file mode 100644 index 4f2c72b..0000000 --- a/Bai10/Bai10/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/Bai10/Bai10/.project b/Bai10/Bai10/.project deleted file mode 100644 index cc55708..0000000 --- a/Bai10/Bai10/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai10 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272482 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs b/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai10/Bai10/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai10/Bai10/bin/BuildClass/BienLai.class b/Bai10/Bai10/bin/BuildClass/BienLai.class deleted file mode 100644 index f78d91586f76cfba284557e5b56087c0bfbc6192..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1621 zcmZ{k+j84f6o&upIQ5}Q(>ShiorF3)q_#ril!gLvDXknzOx-la#-(tjI+{p~BV}xv zfjjP);Q@FLn8ulb86JR#;Sm`AwXLK!X>YWTYyICkZ2kT3AAbSZz_$s+6f)Mp>+aRM zcE4Y-JjZX?UIKB2?AZQe*Y3F6w!g2C?6_VtcoKLDs;-dG%i2I89@3bbTMFmydA=9k zSC}f5+dQcSdrlftxL_cS^9r*K&v$kP2QQso%YNB)2+;^ScDHT!JXuGZ@zC}91Zj+s zM1)m}l+@s$K?#^Jds1WOS$UHI_S7a4uU3N{&^-hv2Ieci~Q=Ctr#(IvW zPuEVjg40XlGliK{Z6Z4sK9>etPs2jpz!!MTF0l^}9e+<@u~a{c9C@pX#S;TNI?6B@ zwTYyA*T6H$YC>nV>nG7@}#%57!WZ}7Je=U+*Z@@ z0T@wZuSvjIW-CwejZPsZoy}QH`dW|dYL3&q!MDV(!POm(N_Nd-%>1UW&GMV388Cx5 zW^s`-V{{2~$Z#bN=J^!|T}n-J%!&hZ;fRyPBjn8T5%RD7<@B8l{mm01iwn5KSx);l zxl8-Vx6A}wpt2fWNV4)IsU*sUNcktOC9r~4UOmEsC}+(jkMwG&q!~6eU*VLYAg^096f})66f}(_x1ed_Jm-szXnxfx2P|{-7|XxoTBbb2s<}GE zZ9;MQ@VRVOUvK90rfI$+^DE@`=3@W2KTlAv=z=Yi;3{izjXAqc?HgRJz~tYcf)XC0 ztRu+jidm--Soj3@$)@B*M2x>Me#z@DGxmTqf5Li^**eA}VHje2h{h04PY%8u9pug& mv_=Q{A=)F0|JV5zb=H`{3hrVZPjP#!hjveU=mkk)_~t(n|1Z-3 diff --git a/Bai10/Bai10/bin/BuildClass/KhachHang.class b/Bai10/Bai10/bin/BuildClass/KhachHang.class deleted file mode 100644 index 726f6dbffdbc6a7caffd99df2de2d0c40c130882..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1460 zcmZuw+foxj5IqBdP2vKIA)=xzcuRs9MMWieBVLF^yd;I?;}W*mrIOuLva$5l2meP) zVwG0;0e+O_>D`bJ!^=$1O!w*2r+fbV{rMZfEtEA3DJ0ffPIV_=HJi=shHX~tb<^F| z5K%b3XMQlVRUWgiw)d=xuMqVuH*dGrJ%!0)@44hR9CtUTFw*okZBs!N=vy=Mp1WJ7 z@93)II{pKN;Z%A{A(HoYtT=`-t|N|P3KK=gwKiL|ZL3i>x2u+*dlj>~Wi}i+cP=Bo z?KBmV#iJ-Qdnz@^sW5nz-ikqCO2-IB#X6-!LsYEOI${`A&|TZCmu+G1xJ=l=ZTU_$ zTdJ6@Yc+C$at^Z^&i5%*`qcETnhpbVEZ1vMw5gDS<7Hn{CZA$iW-S-R1(q43Ty=x0 z8Wp=`*xrf}$0c0Ra9QDGAaH+}jug_=xh_bAKBD6ERvZgh)NobdL;!J^w~lMbvN^8x z(HGS@0IBq#Mp4{Q7!TPsJ%f4(vjyDLIXJf!G>I<=1-7&h#hq>~HPfh2IKyWx3Pa5b z3kmTL(_ptIY{zoTwsWAfhE?|B|Dg(6Z8f6c^o+&IeM05%NCqe!M-FQ`@_52gGwXHB z-BDOPN}7Q}JMcMyc&6idppEZ^11+s6=y)NDYk}fbH;SS{ELQ4jlEbE?ex)#zDhw)l zkRXaTQozeTb>bzj)u>p{92xoX?(e%MB4CaKIn0kbjEGDst%%HNuyaa-UCIBUpU%@w z?uz?J<_E^U(ip-7*En}zjKLE)PD>A+Z~~J&3BXCN0#K!AgnL2&G7I}OX7-WHEbe2v zhnFN7FgC)t7!nxA6s=@{oeASR*hC753#mjvU6>@~i?Jw$GdSDH{Dqn2ZTTB!Cg@VP*Wtr-H=?Ja b=m+vTjmucV6>RWd_qtQ;cIPdhAh-G-E;5hbI!fpdin34e*u_8RYypmZ?0ii zit`m&uV)@Kq?0?;p$YWv$;UENkxnUde|OI+xB{VKU7$bbe`vUNC3Ck{lZQFG?q&r# z@^;CQZlh)ij9wHolWW^(&bFMKw6n9!yfkAwwmT~jPNp^mwE1e$G7v_Wi4GV#dIaJZ z>}jAIeJUizoaAz9vjYNenTX($Ku^wgtkuT;u2tKRyA^VZ<*Ef)*_1U~&4WeFE!)%- zZ>QGufV?{0vb7%&6}X&i4?5+a+Eg@#O^o0g1;}EN4kerN+q}!Bb_Dd@rf9Of2ui?o z%JN`AI_119lm!L?9N+4EK{}3A%PN`g;(ZCO$xtG^!0&D=3s*&8*dI z$IZJnOYUc*NDB$rL9`dI)I8B7R74ix4a zTDgVolt|IQN0`)ci_O(4T%f?j$C#oSj`g#JPR;&Vk*_lZ^<9d}v7R!=v<{EoD0QOpZ;shTPa5^lLc7w%wD zb=QP?`@+PRSZ1rrg9FQ9jfdHA=col}^!OfIl2FqscSYr{3fydOi&Lxq7ei&PnRwtk z;#QmSI`VAf^T)`*I=a-bX<`f4gHGBgv#=YsWAI#To4ATW9^raHwfniMu-%2jA2kY_ zUgTX_c(fu9f^*VSrZ*d9`?NV#)9;!nfL4S{mfr|x3~62&S;grm6D1ftk^x4G));J6 zB}1V-GEq@|q1EkQSa~B~ZPW_ZlC6$zXY)voE7o|2YQns}s6`!hK6TDQh(hB#FAR>I zTv_nvKrDR(GkuKi?Ox*uy?-G7n;+lLvD-&78QFzC&IY(P_fZC#kpT*G@HP^}5#)b8zsdbS0hBywB(+Fm94NK&AkKER{wv8LUhRG(o*BW-PgKx=w zi3mzfh|d*#hwr(^2xjmD-!%Nl-QozHFd(8s=sej%K#h3#x;VcwP+7Sco_U7b?fQn^ zl&8!d@*w}lx(AD)9?DOI7*gvV_MV=+XsH}zKY({&1WCG_!UWQo;(UP@f~sw^DvN=l Y5axW&!spEY!haAEx5#s!p&>Z`0fD29L;wH) diff --git a/Bai10/Bai10/bin/UseClass/Using.class b/Bai10/Bai10/bin/UseClass/Using.class deleted file mode 100644 index 9c5c7ee243c2121d1cdcece28c63fbd3a710c900..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 916 zcmZuwT~8B16g^W~mM#mFRj#X?(>fCG8FB= z;eMNkLd9o~+1L{i5!jbmn}pcsLNcsYzt|J@RveP1X05GZnPE9iB(dtN7U&BI0FqlV9*AN z!B>8qsY@sP&tuh&W#C~tPLCM(J#pTV^6IgHCn}e7{2-zMXL;D8S(c^@jC_wAN=-3= zQeS}gg~JmRM=0B;SUViy=KIFx5S0_$F5VlW+8APs z;ztvLN(!J8fk7i(K$$>I@@NA^ROv+#n`3bL(w ds; - - // Phuong thuc - // Ham khoi tao - public QuanLy() { - ds = new ArrayList(10); - } - - // Ham them bien lai vao danh sach - public void themBienLai(BienLai bienLai) { - ds.add(bienLai); - } - - // Ham nhap danh sach - public void nhapDanhSach(Scanner sc) { - BienLai bienLai; - System.out.print("Nhap vao so luong bien lai: "); - int n = sc.nextInt(); - sc.nextLine(); - System.out.println("Nhap vao danh sach bien lai:"); - for (int i = 0; i < n; i++) { - System.out.println("Bien lai thu " + (i + 1) + " la:"); - bienLai = new BienLai(); - bienLai.nhapThongTin(sc); - - themBienLai(bienLai); - } - } - - // Ham hien thi danh sach - public void hienThiDanhSach() { - for (int i = 0; i < ds.size(); i++) { - System.out.println("Bien lai thu " + (i + 1) + " la:"); - ds.get(i).hienThiThongTin(); - System.out.println(); - } - } -} diff --git a/Bai10/Bai10/src/UseClass/Using.java b/Bai10/Bai10/src/UseClass/Using.java deleted file mode 100644 index 943dd83..0000000 --- a/Bai10/Bai10/src/UseClass/Using.java +++ /dev/null @@ -1,21 +0,0 @@ -package UseClass; - -import java.util.Scanner; - -import BuildClass.QuanLy; - -public class Using { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - - QuanLy ql = new QuanLy(); - ql.nhapDanhSach(sc); - - System.out.println("Danh sach bien lai cua cac ho gia dinh la:"); - ql.hienThiDanhSach(); - - sc.close(); - } - -} diff --git a/Bai11/Bai11/.classpath b/Bai11/Bai11/.classpath deleted file mode 100644 index 4f2c72b..0000000 --- a/Bai11/Bai11/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/Bai11/Bai11/.project b/Bai11/Bai11/.project deleted file mode 100644 index 2d865e8..0000000 --- a/Bai11/Bai11/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai11 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272495 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs b/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai11/Bai11/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai11/Bai11/bin/BuildClass/VanBan.class b/Bai11/Bai11/bin/BuildClass/VanBan.class deleted file mode 100644 index 30bc71cde2681a9d8a0f82f2b3c2979cd0819ccd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1515 zcmZ`&+fEx-6kTU79@`9HF5`vXesSkaPl)va7^aCpBIx{XPGO;u>`<%1ST5GSp{qFS7zW~hPp#eo; zsNC`Vdc}A4_h)vTpzH(&G=bD}=O<^zcY?i{&E4m2tu0^#P47`B*b^9DyExryx4dBQ zo+Yu3 zZg~3wBWpdn$YJGrne#gd5X*#)7|W?OJ3;$#vsK@G7D@ZSt(7FwxMJX=_iBx9#y ztjKqRy>=t4C`=zWk--EHY7M7Vq9s~xC12tBE2kr%Z+%^=EC~p?vt23+B+K6}l~#XP zTiM{Y9xCJU3ZH<7L9<LO{u8_@=OMqo&%G{&`C=`Fk&;`ms zNIgK5LFT4Hq;!U|OtTHu zjvryZXvI%(HI+TY&2E@D#CSJM9%9Hce!<{@E>zn%g1mPS7gpSgy*Ybp>Bl5d!-AJF z#CVh|i*nMGb%hegD0-a2GK?k|W$_6et?*sNr&z^xY#@(sP{20No?<#I@ku29yhI0+ zVTmd;vb?Ww^?it>lIJmzuF;|qVqM1+?HD8a4Ms6CF5xC}w0jZ{$TY>i6{vF(`YBRE zh%?Gg7!U^1T*)6Wttj-dh+C1H_?bn?5y;TG&(@D%-Wr}AzI}o(*BPAPE9LdsKgD0q zok&xGoC_T`+3t|Q##P)6E6YYe=apr;mFaZrKJ_Z0x&)Me5vL?MWDEay6~{c5(6j1- zY~rG7Ye$$YTAFNN;}8Sgu=*OY14SHY!qPHt&i)?1=+Xq80G&`!VpOK43f+4|x61sp uRzr<*5y`p6*{()~8PZ>cHw&S^(*3E>RV~!r2kjL7^w0_&TqKo(2mb+;^!P#m diff --git a/Bai11/Bai11/bin/UseClass/TestClass.class b/Bai11/Bai11/bin/UseClass/TestClass.class deleted file mode 100644 index dabf93c02c916252a75f1310fc0cc167cdf7fa89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1442 zcma)6TT|0O7(EMxlo}KY2r6pug1rFof}+$bpn{eH7OQxjCB!z6ZaQhgz>`lt=)cj2 zG9xqo0Dq8=j^8HbW^u;p%%;2F?)lC+-+ue^_xB$FM)6)j6GQxY)tt0>wW=?gRWJCb zAi~hG%GbGWb5YdimRC)~V`#l?3Cp|7(40sX7$TF-iWx&Q+ElclmEl;{5@yaXFPrWn zU$#vG&pHOT3*5EjyuKLmN>-JjJKLB!L#SnL35Mf|*V#P=dC#>(F_SDP=w#>&0={S2 zdfwndm~I=o(4(OH0PXx{)icW~j-!{MNrLu-kd~v*h>GtKs>#cl7&>r5N;t{TmpF7w zvLG|`t2m7_B;WDLjXkh=BDVt;g+|hHC0^0ixub1xUt8PMJbzq^;T$d~IM2`(@Fy1g z4yw3_L57x!#3JxIkHG(3^^$2qMG`57s4zD?X*i`zBpba_FhovG_?EpAmbbvg1Q#)+ zF(SndD!9zh`?trz0n?4*DxH2w?ALv+2`R_sQiF~WIb2t917mb0c%@>B6^7x%2sf~* zqm$)2ZmAd#gm_LUP#Sbw#U1H`68K|1O-l4i^2I-Sk3gxBoSj9AENW9_r!h7MkD{~)0e*dV-j1==!`jKVmPs}vd zVn=lpIl`c{w(p2ycrUc+-OTeU7G&nuAoH{=c3#Dz?5q~UcB)kA2zQIrI$ekK23_&0 zL7~v|{mns5)l3RyH~w913Ms;|rhHM9M;mSn#bbHLcMbEACHwj4?i(>8p)df#rpE+m zqJQ)V(5TQ%r!S*#OKJvN1kX{R g*%5ri3%n$qeQ>daS7h4&EWE}WvXS8}?P - - - - - - - - - diff --git a/Bai12/Bai12/.project b/Bai12/Bai12/.project deleted file mode 100644 index 86b69a4..0000000 --- a/Bai12/Bai12/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai12 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272503 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs b/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai12/Bai12/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai12/Bai12/bin/BuildClass/MaTran.class b/Bai12/Bai12/bin/BuildClass/MaTran.class deleted file mode 100644 index 1cd50492d14cec58081be51a6223ed56f711b5f4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2148 zcmaJ>-%}e^7(F+;Nk~|J6Z(Syk=l}kmM8_PhSFLJZ7dL!*h*=YC9Gs=*kqDTN8kBJ z`oxScYHg__GwO>kebX16@jqcuJa=~qAn0Ur_ujkre&;*qeBZwQ`-dL^j9?`QpFrEK znps?(Eb7&2YF5uxbSnr|pmkk;s;7#&wU)}RtQ&b-AW$vcN zC`(J+4vd?YX-{w&Puv$!CrhhF7z&y-gwYrR18eXjAZP6wf(Qf=l8cCj280A!W=zYN zt8J_pm7Km(G zb0`zHO>51`$EY;ml0egZLAPRdEoK*Lv86CBATDJ{Frt@`qpy3B`N$K48ZP4sbJxpd z!&()H#xn^Q|HxqvCEb9OfbX#r`)zr1Sm4TOvHvH+2yJ>CyB?G1V;ZjE9f1bB>T2>SeD;LIu;Xas_iX7sedsgUB9t+A&PS zhxmv&Jk^UeBm24Z<`luHH0wx&8o;^|VfvFVS!=Sk;_*{zFmcLWm{tBz`hT80H*7kk z<`}~*Q%ill-S!H4iH=d(s2NxFGFTTP+R9)UivVCY9Z}qs-tDJ6Q zbQ|xIdS`UFXK))6Sq`@!Y$~Eh>hWyN7Wt6t09UdcY4s}cBvBYxXw*WWsh%+Cv9(TAYJTvHUQyp$?Q2#ryP^ nQ%{OVbt&$7Qp8yhpYf*O5#=lbM?~2}i=gj~t~SfW@In6vWFL}b diff --git a/Bai12/Bai12/bin/UseClass/TestClass.class b/Bai12/Bai12/bin/UseClass/TestClass.class deleted file mode 100644 index 621ccabfd2d874b7aba82f699768382514bdc62b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1484 zcmah}OLNm!7(F+UEyXB_lMtHlR0;(-0o(v>!6ua0Esa|{(At=W_l?lRqOz2+WTsto zI@4u$?WVi3>7rf2!kK}Y{s4Ydr{~HcF_X-6q5JsG_nq%~_2%DK{{Xmz$2x`tCT~Y> z*_Tn2Z@5vMoOEac*{AZE%=N>GN`l=Ur@il>AJJ%G@%Hb0?gJF!ANFgmS zUiAWZwcB2II}N$+yCkoMj`W+dWk$Byh00*K?7qZRrI9hwOXR-3aP&#|t)! zxu%W@fr$j@#-5+AJ2D8|&IqP3t>fT3Vb_0%Vz+JL5Z)6QQl!&;N-xY;g3WGBR#&!* z8Duf5QaCIyWACeyYbp;%O&r5g_0!>hI*P;9Q9Ug`72U4(A07 zg{Vfb!gg+N4GnzA3JwP7gmJ;rae?Ae*YltBr=cbr9T{Y>h)b$AA2B++Qpq(9d?GNn zV;{G|V8e>Nz;arl)s|LFD{Hx+^1WiBpwiNlwETqZs);3Vgwg>^RBNb4_hTGvCmU_x z`v1Er(aj=CCd&AXlnz5tl(t>nlSnbQkIcXgfzjIApe=J~yc#{sfm6dj05HT8UoKajw>)>j zJvF}t<3$2zxGES_IKb8HD{vp>Z3JT&r-a7hJ7@{X->;Efdx^;{%v4|E$mEG0<`#N5 zv&3cLj*{fJCD#(kYb>rEJ+_651xS4K%RvMot zragS2E??4#+N+7#ws2Kl(!7x7)^399m|-#*CTQ}JkMcIgcRtQ1nZ-ONSeGfz@ia>O zldKS}<1p^w2qccf#|d;f>ObNne#R;MLaX0!8o%QVp2NnUWcUjUN%2KI+ga - - - - - - - - - diff --git a/Bai13/Bai13/.project b/Bai13/Bai13/.project deleted file mode 100644 index a5b705b..0000000 --- a/Bai13/Bai13/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai13 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272515 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs b/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai13/Bai13/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai13/Bai13/bin/BuildClass/OTo.class b/Bai13/Bai13/bin/BuildClass/OTo.class deleted file mode 100644 index 1780a464dbfd83640747a668cb53b2abdc9dd620..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1313 zcmZuwe^U}s6g^MT1zJTh@VBm&2Ka+Y%L20!(@0Vq7-sx)g&o;~T?Uq>K2}ZQOwIHG z`cO^h?V^!5JM;G4_uf6{-1F}H{pZIo02_F(pif|Ur)5^lnX2AwCXWiX0-r#rYwftO zUl15*+L?+iAhH6%kEYSuwXL%Z7s9y@`X@bE)vdE+-f5WDSz2Il%d|{qTcAG{FADfF zcG(D`A44hv2ogVMTE=0kc4{;V`f1gWFm_3=7WIZHq#bUdYCX1(Cul6+6hVh4gyeu*w26v23rd4pLfXyjHR2mg3l6 z14_5wsK`oF71z|N<;MZ_1`e(nk-|I4cPOxWlj}WxT=Mb}g|-8|D~f8hF5mA%r+ny+atmC?g3F z<|qM9cv2FDBtT;N9Ak-6h#h4q$?mm6=rjYu0gZ{xZZbA+3x V2#rJwt_aWF%`110SZE)P{{p5r1eO2* diff --git a/Bai13/Bai13/bin/BuildClass/PTGT.class b/Bai13/Bai13/bin/BuildClass/PTGT.class deleted file mode 100644 index 732b7ba9aa1d7b3545b93706d61c9087876a880f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1734 zcmaJ>e{&L76g@9OcA?uQ<_9Jem1?y>8rRnJS7L2zz=(-4Ei`I>zrYTx14{;W9s6Iu ziC>}Z7@V;){Q&(?ou0c(AOxqw413?Z@7{afIrqMQ{(bc~fHl+&OexIV4%}9Kv!#1I zd#}1xH4syneWIUgyQRH`{ovq^>1;R%kL}1Ham4Ei8GkBVBt+7*l|5)H)tO?-KsulIZ~oi)2)5ob!9!+ zjQLHsr*L-X6kt}*=O!_gi<5i#{R9-wS%_m=tYr%ZOtId!kU&zb^A_H~w1VX|^dzTPIp7{y@SgJE{#!E`L*XeZ42+>3NPIW$lhWE#_ia9WXvaT zj&5(5c#j|wyR4LbsykVsINQ@+_F16)^=uM(tQaUL%!ibZM_YIwt7QIA60*W;ILPlO zVdDb>*U4L$;v{?vAL53B={e7Qkw9S~m!Blf#77ECBal>j45N)tEPRU36b#8!7BE!0 zY=X+njN;f8awQv|TeyWU6q0hh*aW!v zKT6O~5>))ZpkE~Dz7B-c>4xLeq!N`*(5*RlTp7NEyaLyRKlV1I}IPx1>Mh+!6Uw5;e5=CQz)Bv|CXB>0VG zC2d*~6jqLqDrAnZRLCE3YdL;|%qVL*JUP#-3!LFa#;2I^9G0;ZR#_uBW*SrxORggD z(lY%arnF3dc-6E_e|Vh>xHv%boE|~G{U@?>SNq5nR{FR`P_kYdtUo3`*?uUS>x0dk z#5>&lauj(2{#BL+G6Zs-v|J$Qi@1U;R>}T4F5xyV;~t+9AuJWa7+z(Y-c5p3C=R)Q zP9o%T4sra2(&M?UmnaurAl1iq9}oKY=GgIV?X(LKzb6AlR`lS z0dFuq;*5+lj!%rd>1aCI(ec@T;k&=Vy7tLQlNNkPvM=9W-}=^f$zT8e_6LANc%&g9 z&^A`IGs)u_Sttygk50u;$29~6HeQtrav&p})WEs9t5(7l2qX&v;iz{}bnVQ*v3y=G zM(u(d5!ev3Q;u|tc}t+{MK;6H8b``aWQ5NehHb}oM+EA+x~Bz#$FoUGM;)3CY=Ewz zRiOO^4t2DkO__xFrfa-=dIJPD8K_5tKx@=?tjXg1oRyEuxeN(~qS=JZOv}8j_Wohe zP1_8py_Q#50P<>d)7HFVN!YGh3y*pCv?9=HU^{k@x=bc1j30H4WRdQRR4qs8+Ma_D zFr2i^osdpCCKG9aj#|}X3F$aiKB5A98Lw#AyCx&C#e!?i8+a96be}EKgP#{WJ1~{E z9XICYEjb@)M32DENjfqYWY#QX%}g=tq|98}`*Cf{88UVBqF+N_Me4N}1_m%FP@hw< z>%ycL+ewk7jsrNP;UFWeX3G!4z-u@xpgGn}cU(a*)#K{H5d%jtM6K10%9+x-yIeb- ziavZJhDmKTh$JO53)E~#5g#$|rsAi0{4$P)V*;D2#aqVkO3%tS;y87jss?Ym=_2DF z#Yt66gKBl!z*`t+Wy)O6a+ugo*4J~Sd_W3(mKA7bB*~0oLcN_7=&P-Tib(&9pgwI~R|L~>5zRU--t%drv1)5{7OkA6gIlo0)(=5<<+OBko>N=La zgDk7YcCEa0vw77zeuBKIH13~Ans6Nj4KxT<{a0=cxG0i@s=f7fR~~o~74;1RH=#3b zpGhS~g?-DwZG6bmOUuHf2gAx{#|Lw6ikO;f&!4rec?EOVz$Yrb4Jpf=kVPH$@u`Lf zYn$3@CIg?TnbKfgFUkzZQ^UM0azLmVw!WyTp&rW?^9k#et)^U4d3yCLJM3Z->Nw_^ z0yP!+t8o`VBX^wEP)Tay$q59x0zy4YFnX5JGP_Yncnj=+V_>PZKjH(dp9BaZ}(6-%9cI~-(V+9;t2BJUB(l? z({BUup8bS9q3#m)5p)0HAirOqQAd#y-l#iV{}d0nTgK>YXlw~5!u7!`C7cSKDIr?I zIoc@OxBcfM-s|np2#W|mN&%(TR(|&KGq{ZS>=LFYo?_QBX1JW?vSS$+xxB<>Q^lZ{ zNbmLZmN56AUWDtz!S7dYt9a|6l$&Inpf-&}Zbv7!@gHLsc5r0v#A!x)o>68v;az&Y z!Et^EUATuHJj6bHg?>E7emucJe8+b`aE>bFFHt?Jv8vfKBw;ZEmp+wx0isk^4_8-@ znY;3B6w~+sDc-c;Tco)PlF=jBT-D<$vCl$VAa_6j@QB91wO_gzg5wHO_3C6zt3axDLVTq zJSLdTJLGcj8)#fE@WP|?ca>5Hg#xE`7{};xj0qe?A5MC-OfSOz)%5h^b9_O+VYGS# Y10KOmWr9IZ;`?QeTWIwqaRYexA6YOCp8x;= diff --git a/Bai13/Bai13/bin/BuildClass/XeMay.class b/Bai13/Bai13/bin/BuildClass/XeMay.class deleted file mode 100644 index 9f53d78f90ff939ea60792d2fb9f9aee6055aa0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1090 zcmZuv?M@Rx6g^W4+b*ln0!1v8qKIu#s)An>QK@2@AR%c}HU1jPhOQ~Q&2~%Vu{2r| zO?&_!%6MkFLJ4M)`Mh(^x#!;Be}4P|u!d~|5rOfouG2aww`8YNd~d&%CkCPdV*|H) zwKp|^Si^GF0-hT}THrod1xUl)j$y#w3C5JoK+h!J4NaqZpi(Z221x z4V+f7+K{em`=xwcsYqFvz+@cPaNWQRlhlDN=^hrVC!N4PvXI6s#d}@mGu6j&yyBkk zxIs1WZFy9RA;YKmE;+Nu(#w{~o9)nm^{k03ZWve)n9#r%e_FVSMSLe9W#fyAXGEaXuTFkJg{P*D){xME@ncP!k+3TvTWl)(a%xqM&!AiO}N)1bKj z_`}LH9owxnoqt9uzg8{WN6f%Of$0IOv{+pk+mGQfD-gfn!Wy2caxa?frjmsXJY!?X zcH4Fj1ZG*jOVUEHlKS!7!V8^E;L&p0qHNu=P*(04+PxObY*xLl->|nG)kLOljuoX5 z3v7)cb~3Y7{lQ(7dv+h^I8Uow1=r!iDa_vB}<85GlrNSL(Ftx`4m%MF`b<2VZN~3 z!!6=-S$=m;k|aEkBFr=i*vyz2AWEMRrBTE^O~fjOM0?r|AVcvF$nz6xACiww@uct# hi5}K_*zDouIafcSIsVFE4)X)nWX`O4MKuw;{tGz$&a40c diff --git a/Bai13/Bai13/bin/BuildClass/XeTai.class b/Bai13/Bai13/bin/BuildClass/XeTai.class deleted file mode 100644 index 4277a1bf5ca95916656984b628815b3350afa687..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1093 zcmZuv>rN9<7@SiI+b%260!1v8q6lqKs)9F)H>miB5Rz`H#$QX>&|{X}X1gW&SQ;&f zCO&`#0AC&b`R_~ zwm>2Z1OJ%k0-`D~vL$^PJr@`%6zc-?%WD0v9ol~dWiKJJq zH5}h}!%DHPRAeknVk(L2xM5(HMe2*5;~$r6pWBgpVj+t;iVr%Gz;q8s2IYfL`cW+k zUFW2dK#oVreRAecoglC4&qt2j%$vyLrh!F)Ne%q(OAEKKBrx1kV1($)?6F7OJk~0g zQ82I~kh)TYg(6AQH$sFjXk_3K(P%h_xHk_aBSc zoThYryD87TRFTgat00^kv4N+m<4Yz3Rk5&zXUvAv zYPtTAz#KbxMOq)MqF%hP@KRS31$3RxC}+1V>?i{bZJ@_ao3)@5Hr!pQa%Ad!tSOCH zWIBczW>%{r!daYi29W5IwiFEL|2T6c7Y;QN*^Ct^$5hM5U-PR>ZWD5P#h+H}sPIsNG$H&*D?a zk2aCS2k@bcb6dVl`E&2iotZOd&dmP#`|CG=RlLy$cUh?;ajy@y}B+$<=QkI_Bj@+7PR(Z`41YY)S z?(FiWRQB0pJgm!rVZ7X1xk#ukmmb4p=4<(qK_zTT@1U67)iBC1+HpjobgYWaJx?@~ zNMl07_Ucr%jD zepju}<(=xgs*V{X)p5swi8%(ttMkSd_v#gH*Hs%`ysKoX4V7`vz)?w9eETqEHR`za#7P) zvJF^x$dG6#K&o&?vor1sv6V2(23D}jFyM*fP|cSHm&x{yMs@VWz*B{)5rGduS|{)`dZ@_)*gqZ>3ts z;fny*6%r%rCZZJKw_H6Wkxmwy;R{qwV}s3yZx2><{9 diff --git a/Bai13/Bai13/src/BuildClass/OTo.java b/Bai13/Bai13/src/BuildClass/OTo.java deleted file mode 100644 index cd597e3..0000000 --- a/Bai13/Bai13/src/BuildClass/OTo.java +++ /dev/null @@ -1,34 +0,0 @@ -package BuildClass; - -import java.util.Scanner; - -public class OTo extends PTGT { - // Thuoc tinh - private int soCho; - private String kieuDongCo; - - // Phuong thuc - public OTo() { - - } - - public OTo(int soCho, String kieuDongCo) { - this.soCho=soCho; - this.kieuDongCo=kieuDongCo; - } - - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - System.out.print("\tNhap so cho: "); - soCho=sc.nextInt(); - System.out.print("\tNhap kieu dong co: "); - kieuDongCo=sc.nextLine(); - } - - // Ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - System.out.println("\tSo cho: "+soCho); - System.out.println("\tKieu dong co: "+kieuDongCo); - } -} diff --git a/Bai13/Bai13/src/BuildClass/PTGT.java b/Bai13/Bai13/src/BuildClass/PTGT.java deleted file mode 100644 index a99393d..0000000 --- a/Bai13/Bai13/src/BuildClass/PTGT.java +++ /dev/null @@ -1,50 +0,0 @@ -package BuildClass; - -import java.util.Scanner; - -public class PTGT { - // Thuoc tinh - protected String hangSX; - protected int namSX; - protected double gia; - protected String mau; - - // Phuong thuc - // Ham khoi tao khong doi so - public PTGT() { - - } - - // Ham khoi tao co doi so - public PTGT(String hangSX, int namSX, double gia, String mau) { - this.hangSX=hangSX; - this.namSX=namSX; - this.gia=gia; - this.mau=mau; - } - - // Ham nhap - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap vao hang san xuat: "); - hangSX=sc.nextLine(); - System.out.print("\tNhap vao nam san xuat: "); - namSX=sc.nextInt(); sc.nextLine(); - System.out.print("\tNhap vao gia: "); - gia=sc.nextDouble(); sc.nextLine(); - System.out.print("\tNhap vao mau sac: "); - mau=sc.nextLine(); - } - - // Ham hien thi thong tin - public void hienThiThongTin() { - System.out.println("\tHang san xuat: "+hangSX); - System.out.println("\tNam san xuat: "+namSX); - System.out.println("\tGia: "+gia); - System.out.println("\tMau: "+mau); - } - - // Ham lay mau xe - public String getMau() { - return mau; - } -} diff --git a/Bai13/Bai13/src/BuildClass/QLPTGT.java b/Bai13/Bai13/src/BuildClass/QLPTGT.java deleted file mode 100644 index 6c23621..0000000 --- a/Bai13/Bai13/src/BuildClass/QLPTGT.java +++ /dev/null @@ -1,70 +0,0 @@ -package BuildClass; - -import java.util.ArrayList; -import java.util.Scanner; - -public class QLPTGT { - // Thuoc tinh - private ArrayList ds; - - // Phuong thuc - // Ham khoi tao - public QLPTGT() { - ds=new ArrayList(10); - } - - // Ham them 1 pt vao ds - public void themPTGT(PTGT pt) { - ds.add(pt); - } - - // Ham nhap vao danh sach - public void nhapDanhSach(Scanner sc) { - PTGT pt; - int chon; - System.out.print("Nhap vao so luong phuong tien: "); - int n=sc.nextInt(); sc.nextLine(); - - System.out.println("Nhap vao danh sach:"); - for(int i=0;i - - - - - - - - - diff --git a/Bai14/Bai14/.project b/Bai14/Bai14/.project deleted file mode 100644 index 779a42b..0000000 --- a/Bai14/Bai14/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai14 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272524 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs b/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai14/Bai14/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai14/Bai14/bin/BuildClass/DaGiac.class b/Bai14/Bai14/bin/BuildClass/DaGiac.class deleted file mode 100644 index a310e24034e1ff688ecab88561519c9aa68ee549..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1601 zcmZ{k-*VGN6vn@m9m{r<#Bo9>u}uYq;F#Ek0R5Agq~H{4FiEIAndxwYB5NXnBV}xv zDfc`;U!hmr^rjtfX4+04pm+2|`T{NOw~~lql3sYVyVCj2?|ggKf4u$WcL3MXR-p(? z-yS&KPQ7dN`_&EOu49-g;sTi`#xtYZHQc@G*6tI_^aT=quWq=ufM^J$o;s%8wg;Xm zpgiJ6qUN}cza|hXF761#>t4r7BZdhLDWp>nn9?wYgq%%lP?6+L({ZiM!Tzq*Ya6>= zOCa0yOryJF^c=a4HsikS^aW;`$52<9sMwJCG}kr`+P3HJwH;SruGkC;82C=N+A0cF%GBmfy3C{naFN5^ge){>pQ<8CFpP?iHbnsh^6D{9mCPhfk7rS0H`yK1pk=Jf$S(!T zC)NMI3NrGxhB`I`lD-$>3d|OdCnc5AXE)BAaPsU~M_{7m8|Kpo?31wBrfkP@+qUzr zZIZap@QujI$VR1}-7;4Y0<@HI90|MxcvVv#QzN8W$WBBV#_68fHmuD!(4JLo2% zb0PF5p(Spv!V&`d>I)%qA@iRj<~ceATp;sB9@GM^@wvw9K5}(E;!N{TS<;CS-GnG| zxs4@`vNN8uFlliiR+DB<$#j`~<#BCf*I&6G`9bJcn0tu@m04|to|Wm^mG?Xkal2HDED#SPezM-yy)_=;bH4Fd% diff --git a/Bai14/Bai14/bin/BuildClass/TamGiac.class b/Bai14/Bai14/bin/BuildClass/TamGiac.class deleted file mode 100644 index 7237bacafcbb6f7e8be1eca35524265509339600..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1429 zcmZuwU2hXd6g{(Rd*jW<HIeA$ZB_9YX08*k%yU3(pg zcclIWUXdd4f>eQuK@{}|@N@cJ+B3VWB#5juGk5OXIp^Fvci+By{WpM1s2k7(Ca(|N zcC*};{eH17cUN86Fc1@%IO4BJYz7238a3Nd$QP;o$cbf^jj7_#RaC^|E=e9$yRa|GITk(#&-PrYJm9@ z9g<^Sy7eO3mo1lD0bnX3ZP)8qN(@^_vy-k*#jxEL%bk zIw4MrP0iWheia%mU?Tq#Bl*M&nEAvT^954R=+rRDc@idc>`wCZHVtMk~5Z6Q5 lL)gsb}`v=+|QtAFC!%gTzl9}_Jv(GvE?DOT%hrj&}pdYst_yoe| zY<(oJ*>-PAw;lIMK|rA4vUW}D&1+`1_sq;?J?#kiGPXc-+&w5cM!xr?Woh$q!**f< z)k!03YEH@01v)qL8H^8?jC{t+r4_~uEgc(TS>Vd|5m!i;XEw3$3>3df6SEkC7MhJ5#o z0Vij$r>6Ku5@cacPA{a!1hz#ttG#_nme8uA4ZB#pmdTKvXr=Wvyv5otkUA$T(`>>3 z)0jDJb~Gu_;sv|hCexZ}>Q+ql^#q<&uy5T=lJmBs7gX#=l(~x~j>nsfQS3cy8K#qT zEL|(ag6I%von(s0HLV!2i;;Y(Xl5ghR)}Odf`Lc~UFcEJy-f3Z02RGBAW$_cF&}A= zDGW2q5<}=izk)*oTURILb)e!fjtD5GKIcqG2#$F|!BeDlRbmw+mmb{;VnCoaam zhKw9jF^&m=pi`{)bE46WX=9SlXH~={ZHh}<-c&G232q#J2np26ujf=ek39ma6hkV< z38f5E9;8&9gItR%j+7$FyAZ?+0=tGaGa{WMwq``EqR|r>*XAphytX^UWw@YX2OgvN z>@;V)W+#`mB_K?G*po2Gc+%0*R}xHL*_fbX6cXB8YD~&Jts(=ikw2@uDp<#N<$_@2 z31n5|K(H;2Vdh3tZo#7x;EIa8)Iq>Du5-QXV5%r$mUJ49ZfQ=@k_+I`>2AP;XOGpu zf}?(PO%scTNfJVG2u#;|Ae+PuVkUBw%cS|z91lWw@bpv{qt zQQEj4@`fUEK{LowOZ4Ifb$HA9o{F1zpFB&y)h(PbXG_alC>P{Iso#$TwtLFso~?C} zTf`yAuTNF%#-1QP7uXwG*@JX3k}-5M;uz^%Bwuu=?^I+h@TCe3A(`fD72n8CtJ3+R z&4~pxD@*DcHz}VbU(E}IlEsph)=wMqo~&E>8|aZ_vk=aZ{}=R?S1W%NzWEU38*hEc zdTVGIMSxF0xMKlo$0F*c8$t_c_yvtWyZ+7mu5*!U>B*}b^=P3@twdoPw)0I$#d?Ut z%;KXh)bRj~on`Dizls!cPa2uO$wg_YczP&|!Q+S!M@S+oc%qegtB9ArkG_(OC5~XN3!$l>3R8IKF=b2U{bkJjfkYXvjt7SBA-Z20+g6OXf8xm3S;lYr zMVmC0ary4jUzMlA0BPR2Bk(J(3J`8`e>V|t-GRd2*QEWrz@4RkR+;NyIY1|6(#0Wn zlb0SG;qxe)x`;!(j{14k^l^`mx{P(OXu$RutLOQfc#92frLSbi&!}45Aa{P3ryZ#J z7fpV#+qcB{0O|5m+7<{>-d(^4@kI#g;bT`1pGYBmRuRG% z)W=t=BHiV#$^h46kOO&|0zb~|C-`?hj3`Fjs%13<$G7;7zco}wWzLN}{hkp%mhl5m He7N-=2~ry+ diff --git a/Bai14/Bai14/src/BuildClass/DaGiac.java b/Bai14/Bai14/src/BuildClass/DaGiac.java deleted file mode 100644 index 3885978..0000000 --- a/Bai14/Bai14/src/BuildClass/DaGiac.java +++ /dev/null @@ -1,50 +0,0 @@ -package BuildClass; - -import java.util.Scanner; - -public class DaGiac { - // Thuoc tinh - protected int soCanh; - protected int[] kichThuoc; - - // Phuong thuc - // Ham khoi tao khong doi so - public DaGiac() { - soCanh=0; - kichThuoc=new int[soCanh]; - } - - // Ham khoi tao co doi so - public DaGiac(int soCanh) { - this.soCanh=soCanh; - kichThuoc=new int[soCanh]; - } - - // Ham nhap thong tin - public void nhapThongTin(Scanner sc) { - System.out.print("Nhap vao so canh: "); - soCanh=sc.nextInt(); - System.out.println("Nhap vao do dai cua cac canh:"); - for(int i=0;ic) && (a+c>b) && (b+c>a)) { - return true; - } - - return false; - } - - // Hien thi - public void display() { - System.out.println(kichThuoc[0]+", "+kichThuoc[1]+", "+kichThuoc[2]); - } -} diff --git a/Bai14/Bai14/src/UseClass/TestClass.java b/Bai14/Bai14/src/UseClass/TestClass.java deleted file mode 100644 index e590615..0000000 --- a/Bai14/Bai14/src/UseClass/TestClass.java +++ /dev/null @@ -1,69 +0,0 @@ -package UseClass; - -import java.util.ArrayList; -import java.util.Scanner; - -import BuildClass.TamGiac; - -public class TestClass { - // Thuoc tinh - private ArrayList ds; - - // Phuong thuc - public TestClass() { - ds=new ArrayList(10); - } - - // Them tg - public void themTG(TamGiac tg) { - ds.add(tg); - } - - // Nhap danh sach - public void nhapDS(Scanner sc) { - TamGiac tg; - System.out.print("Nhap vao so luong tam giac: "); - int n=sc.nextInt(); - for(int i=0;i - - - - - - - - - diff --git a/Bai15/Bai15/.project b/Bai15/Bai15/.project deleted file mode 100644 index 539edf9..0000000 --- a/Bai15/Bai15/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai15 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272534 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs b/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai15/Bai15/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai15/Bai15/bin/BuildClass/Diem.class b/Bai15/Bai15/bin/BuildClass/Diem.class deleted file mode 100644 index 4d312504b9f44c2dd2b9464ea0c96a6777ac49e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmaJ=YflqV5IwiF-L@-rU1+!1ZjJmZqtRkC z@dx;$jAypBMW|-8cjwN%bLPyM*`L3@{Q$6vry4v8;f;n>E~Lvwy`IciW<`TnVQAlY zXC%vpT}-~*+c)!$f_l$4!}mzRzh>E%v#!t=jqNIU)763*LLYP;0R)3k7}Vi|U#uY= z8vM+YwQTc6qq1k#c8tBUsSwFl^G12ss9CaaJH1ZHsw)g&}B{U8X zO}n5lMdoKNw~hz(i%265?%S88%{|_2Ak5Vw>8Qx z{bM&h1r`|Et~P3UbIXz;2}<*pC6rxalQ_8^J{&IB;%M<3;0XthYlyo|-ctOA=3_ z$6Ux+mvOiaNdT95D~)g$rsJ4sr%AFhIrGIoW8eb~4}`DZbxxk(=<9Gihsk#EI>AI9 ze_Z%=s|^tam}cS`7h&Ap`#Y5UZAuE~dlCtsCNkHP$c5fSPRQOOvcPnU{~#iYa9T0d z>1B?JiXw?mnEsCWT;$3z7Db&V;*sShR%nOCzCpW*n@!w3U3mg={y5$KCOX=!<3U@y vH|({jlo03y-(tr&kPLK%#nmzn@?Y`rv??nnYWkCcfY{-BRWjGyWY`C$QEHlOd8AhjGxNu)svvuo0dGXq>E2w>i`NJ#uwZOmFW4ywrst|u1w1fT=1wHRJ6pU);*tei# z#zq2`!t7zt_FoMyntu1lYlc3XA9h+^*zmf6yhlN!e;V`@oU5H8GB$gZzZxGA{5#+_ z5}=}u7~r&SKYQEC?MV#P$36Z|o}jU4Vp*)O;O z=WjT-M#+8I(8ytuR*_vvgW6I2DSw4r7K+$3v7wNhF8-z0KebW9LoT!TuFGFwl5=eb_e?lb()i9crW8VJ4|Vc5si&3R{2da$H4=7Iv*2jv@u5W6Pl0Y zOHi>M5&RF01GlqlW_YiioM%i|OeS`6{tfF>(DCZB1YIFSj*VBbMHGSE8LhQGf!&+H VmL{;d2zCo8)(O1AHfuGMe*=$WpIZO` diff --git a/Bai15/Bai15/bin/UseClass/TestClass.class b/Bai15/Bai15/bin/UseClass/TestClass.class deleted file mode 100644 index 5b8b3e00e04da149fdacf89ae3a0cc139c7af67e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1312 zcmah|Yi|-k6g@+MrRz#5k5<%}mHL3T6rWY0)>^RDN*@YE(N9y@!Zz&Ez|yooOFuv& ziSe`l#y?=Zv)cy^B$BXmXYOOpJ@?G-zdwEgc!JLoTnxe8ww7)1b~{zn+Lmoea5DrB z_z_PvxLHeW?;U6ri^033o4U2kFcwdg7~I)rRg*D>aRnZD87A_&scm(PJ*`#bdku|> z=bIJYDDjpq_NRw#tFE^h!ujEwGgQ^!y2&sV|C+x*P_SCMS<56!5+)g@ZHJ{DTdAB@ z(GA{MYqkt-`4A#(3o|n^0*DAuQw)*#=sMR3?`lVHRGsE?x@O3j#&wZ)gTWKe>=h&lEhz3v%q+lnZ`yiD8CCp^Snh zyrfWmc&M3GhUBPG4CS68&4?1O6s+JigU@O@ZIEo@Bd^Qijf5OS$kxVXN))UKB}j*Y zrH1LlTZWr74O6xBN_`{^F>EM!f6hRzNW$c;8p$>^LYEA#>OS%6^fD|=k~O0)CWnSk z=d1M3QUR+bp2UD$PW42&a-rF2RkSr-JSqSAGhGm^;x=eFwj^C-(L1ECMEex2j8@NV z558|?xFFM4xB(xo&{uH+XuV3iariMoCnEU|#d&Ex=_61M27838kLj}C-$Qg$SYh0p zAbZQPZ-t@KF756kR-R8r-96k%d%oj-AIWks)x*QNsHclZT`YEy?qa!%)idw - - - - - - - - - diff --git a/Bai16/Bai16/.project b/Bai16/Bai16/.project deleted file mode 100644 index 821fc3f..0000000 --- a/Bai16/Bai16/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai16 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272546 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs b/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai16/Bai16/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai16/Bai16/bin/BuildClass/Diem.class b/Bai16/Bai16/bin/BuildClass/Diem.class deleted file mode 100644 index 65dc1184993cdc3b619bbd98b71ca3c1789ab25c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmaJ=YflqV5Iwi_%|fBPR1gtV`T*(!pG8z!P-A^05Mn=>rQNg(?H1dukzZvrT8t+C z0DqM6%yuocRI}N;bLZYUbLPzK&tKnu09eJ-06Yqjjiy;CW-5B4k;Yh>G(f2BbLNr$^=#^c)Zpz+udhN2=P#Dei&`K-#V%e;du4LG+o!q43 zZ8#fmtaFraJNX$bn})ShHl?f(W-%AQg}-XsK5E!TRl`Nh6R*}}nG-pubhDOvRW~hr z+pZgWH66eug{c!!=r*mAL(!-QafPzP!dO5|1c(zQ)`oEuY+p{tcjZP>!xEM$p?-L1 zSVe^yGCy_MMNS8iQt+hbB=VX>URPM|hy5RfRg#Mfz%328aYrF&*V>d6#$%^*r^C31 zwE(F2SRXAk+?NUihaykKVkNd|m7iq<>{Qd@*)Sd<6Tk*X;zYjZx?R?g#iq3CZJn}9 z|JY4Wkp+ggYt4GW*fM2ELejhy31yeqBu=h}4~NUKI9mJ$dBVZt8s=`3w-mpT#4!dF z!(T8YOXQ;yFv>LwFV{h?8iR%~%qL2Z)(*oM#<>&72^TU?NFRM|$VGvS_kkQC9Cw#XJ3oM0$zL_9ZgipGcSNZ6fnbx9|@lq6nuI zGo4=Msi+j6{Dkx0v5=2mKE|S`(?TM;(!y2R5wUO3ZsBGNcY7;eL;|rc%E^v)>v-U5 w_lCU|m68ITn4l5VjyRQ%WUIG$>@nApN z71#FeDmSeMr|mPueY?kyszoFgcX~$*u~wIXT{6hW+~fWUy)Bj+3{thuX4K`RF>-1aqZfhwOW{=Zsrf1$$hak+t`vUi*4}cMx9aj~a*|PQ`=deI zIp@N{;sm`f#)Sg;jni~v^pXAGMCNIi=!Pah>jFhr)DojTSAK_D{)E=lw09V9SSrWg zV7>&x9Ia^*f`k%DQzXqo#WH2ou^cN{rAVOHLUfZ#3k!OH-WAC88Ay$gI>`(%{Q#LC z%R(dpf)0dBUHkyTGOS}GEOQWa1SlD7mS15$b)V^F48pWbZvZo5RGAvhPYH)1!N{O6 RCd}rnMmWZlvlUd^{sV&RZHNE> diff --git a/Bai16/Bai16/bin/UseClass/Test.class b/Bai16/Bai16/bin/UseClass/Test.class deleted file mode 100644 index 1d77946b94b88e65a88f06278eeb72d1c37897df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1197 zcmZuwYf}y>?UR=n`z;tAR4AG9buJqmR)CAocdYy0cK*R zA5j0P={<`i2F$SM^4^~JdEWEu&ySw~R#A}PVHp3=&~gTEG%`i4;Yjc@1W)-n&luc1 z$s8P=Y88iJbX_-fXMQ8F@k^sA4VA_^17+*H|s~5UF1iG#t_O|6>gNc zt&8);rPrzH4dH#IXqFPzxo$GVQlIjd#S4zDnDD zjvrxywK6v+BZ#QL6Jv;`hUb~4;#*DKsCHXcb*(E@6< zM~abdsvzj0LdriP!?8=AfUl+pxe|${g3g4h4LSBo@W z+&-bX3lEtt22b^vA>Qp{aJ*)wj@w{~K*QG?Q@6fFEPDSGo?gj?*cCYnZqQ{!M;9 zy5k)L%b`#kk$eYJ<%tO5ZCu|A${QUd%1bkCB-gy(G1o!599nE+c`@#7VWou!Ej(^v zt%Z%AHP^Gg>bG73OSq`V2;?|o1SL-MHIERf6~<>oT)?YcP}spPfs^qOZ}65N$LO2K a9<>-J+dl0_DE2uHa0oBi-;uWm@Bacd3Jo9t diff --git a/Bai16/Bai16/src/BuildClass/Diem.java b/Bai16/Bai16/src/BuildClass/Diem.java deleted file mode 100644 index c224a65..0000000 --- a/Bai16/Bai16/src/BuildClass/Diem.java +++ /dev/null @@ -1,46 +0,0 @@ -package BuildClass; - -import java.lang.Math; - -public class Diem { - // Thuoc tinh - private double x; - private double y; - - // Phuong thuc - public Diem() { - this.x = 0; - this.y = 0; - } - - public Diem(double x, double y) { - this.x = x; - this.y = y; - } - - public double getX() { - return x; - } - - public void setX(double x) { - this.x = x; - } - - public double getY() { - return y; - } - - public void setY(double y) { - this.y = y; - } - - // Hien thi thong tin cua diem - public void hienThiDiem() { - System.out.println("(" + x + "; " + y + ")"); - } - - // Tinh khoang cach giua 2 diem - public double tinhKC(Diem d2) { - return Math.sqrt((x - d2.x) * (x - d2.x) + (y - d2.y) * (y - d2.y)); - } -} diff --git a/Bai16/Bai16/src/BuildClass/HinhTron.java b/Bai16/Bai16/src/BuildClass/HinhTron.java deleted file mode 100644 index 9ce4ee9..0000000 --- a/Bai16/Bai16/src/BuildClass/HinhTron.java +++ /dev/null @@ -1,28 +0,0 @@ -package BuildClass; - -public class HinhTron { - // Thuoc tinh - private Diem tam; - private int bk; - - // Phuong thuc - public HinhTron() { - tam = new Diem(0, 0); - bk = 0; - } - - public HinhTron(Diem tam, int bk) { - this.tam = tam; - this.bk = bk; - } - - // Tinh Chu vi - public double tinhCV() { - return 2 * Math.PI * bk; - } - - // Tinh Dien tich - public double tinhDT() { - return Math.PI * bk * bk; - } -} diff --git a/Bai16/Bai16/src/UseClass/Test.java b/Bai16/Bai16/src/UseClass/Test.java deleted file mode 100644 index fa722f7..0000000 --- a/Bai16/Bai16/src/UseClass/Test.java +++ /dev/null @@ -1,22 +0,0 @@ -package UseClass; - -import java.text.DecimalFormat; - -import BuildClass.Diem; -import BuildClass.HinhTron; - -public class Test { - - public static void main(String[] args) { - DecimalFormat df=new DecimalFormat(".##"); - - Diem I=new Diem(1, 2); - int r=10; - - HinhTron O=new HinhTron(I, r); - - System.out.println("Chu vi hinh tron la: "+df.format(O.tinhCV())); - System.out.println("Dien tich hinh tron la: "+df.format(O.tinhDT())); - } - -} diff --git a/Bai2/Bai2/.classpath b/Bai2/Bai2/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai2/Bai2/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai2/Bai2/.project b/Bai2/Bai2/.project deleted file mode 100644 index 08f6d3c..0000000 --- a/Bai2/Bai2/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai2 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272553 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs b/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai2/Bai2/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai2/Bai2/bin/Class/CanBo.class b/Bai2/Bai2/bin/Class/CanBo.class deleted file mode 100644 index 80152b82315858554687ac3a985c8639300b0d33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1619 zcmbVL+j0{}5IrNy)@oU7W6MGo7q1ByX>C{s%*`?vTLcW)hD3_1^0=0!v_r|eE@_p* zZ~2Kl^9w*>QI%BX1M*Q6-LtYJBAy~u?M%<~oIZWJ``<5r{R3bXzow87I8|qW?|08_dO^c|wf{!eB7t!~tja)OW_xf~iCQXXlmv{R;T=^};M2CDLRHn< ziMsO2z7m*NSAmKi3XBzsdjiRFSeGWoFloWWDS@eN70BJr!MrS$(!ihF4Y%vl)61ntpYRwi%v}=@79BG&k6?)27GN}6MMC}wFP>ufEj+-6Ttjm^xM*`{e zR$s1lY;e0Rn^;HL!V~;Njp-d8%AhWA{d)q9q}zioF~l9nCT}2357WSCQ)2T!M(=fNW^feX0UWAi7mVXuvkSeUue#WiQC3!;)?`_{nD zvVD7C=h(hGu!l%rr7$2O28EfXKshYX@Y+<}MXcZw?$NwH#$}yAHV)oTU<3EDM$`mK zeZ}8t%7CPhe`Ec(nTMb8*!hG^7n@x??c({##dds=9l6+zFLEOnuj7k+|6-thR%=@z xt&6w`hx&2}bu156SN5y>3wgxVbv1cz4hNB#RCQ&0-{w+7m|-f| zk8Q}GfZv?DZFjU$rl<7;i}uR;+Vjc4h>O;#Ga7W ze*fsu>el(8V<{N7$(;u83bhV4!=5dA494DBE>z${{(RZX+9@;?)uf`DVt99Hl?sg* z80K|EFv$?HUC)vXQQ79lH6d*Z+rkxfKb&j{UbO{-E^Xea+vEcMU`PjS`krt~wI-L+ z>Xt`@mvmgg)fkqsq9I4Bjrnri^Q^fj04apBy3^Hx-CvbQszC@X^x{Bo-izo$>5J?r7xV8)s144<}_9r zb-95p<##cT4Q%V!!E^e_I~_~57}hT8>m17fx2zy4I;wtSo;$h|O2=0^c9mS3FPB4Z z#%pfB+q8Ctx&hNCS8ZJ}#tO~K1l>pKT@4IHVT$SY&^tz}2lQq1jhI8kzfcf@PVYE< zfhkI!rU$g=Ct(H&S}6d7-U`4AU=6dlx|RtKF>7Wb-!b}o$~RveJVzP z2SQ8Jj;di`fg)Aiz#>J8ynzfwVLwt$L@1MnG+@x6Y?Yrji$h%difr=c0JqKJ0IO$s zBz=ShI=x67GMFa})mwUW`jkr=_XAnT{Gi5xFB_00nI2JzpV)Yxd^$wg{D!#!o(=F~ afS3RGoTXFCSVC@0!|bVsuc>wjZ~g*-*cQD2 diff --git a/Bai2/Bai2/bin/Class/KySu.class b/Bai2/Bai2/bin/Class/KySu.class deleted file mode 100644 index e32d650a141f2127ab886930825583c93bf4062f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1345 zcmb_bZBG+H5Pr6_Tzi~w6ev`s6kppbP~TCCs4b!fLP**)@q-_h_R?E(>^1Gx$j{Pf zn`q(>@JAVEuO}4YBe`U6W_R|PXP%k;{pZIo0FUraLxe%ExV+mf?jBcr8lnsnL%+gh z*&|Q3xOBF;SL5U*_dfDZyy$Y-DpviDkgXEK_@IufcoWA*KB@NisLpN zCH5(2Ht2A+$-S)4y^XAnyU1(EG0X(OXKxy?P@tmP3XC8w5KXaMMNz{V!*l>KT7-dn zxUbZ(Kl^Gh7-n<%^BrY~bQ?rrcrpq=LowwDTh<)$PcGHQCk9P)T*Fg_`4K^aAuacW z+q64zY>--seKpae^{!)6%|JoNI<^eFz)Kox-fr8n$*_7+h3EK&8A=MGY@ia9=zGIA zq7;2?U`Gk31;V-1VZG}0It_bAs27n?&u>lf#xl*$7`;zYKn)OCQL^bJ(V8IdA^jQs zW7Yur7cwF+Xw~TtOi=I@`apX@5GFB2o&qpwRRDenYg&bs)pT@#X)7K3j@eVJ$$-E# zMJMU@On|o)P%%S15L$|MR1OpKWU1^X7RXZMO{B?+29_!!Mv*kMA%i+atN4^v7~uL> zWRkb~xMLOiSUJNZ86eEl?FHhH#vEa&+ET;YCtOl^5XwR$5au`tWCJoJ(_>2U6YKAj l&ju)2-!R+9^FChnvHgF|8M?KEMPx@b%$#WWhH^*n_Akd;9H#&P diff --git a/Bai2/Bai2/bin/Class/NhanVien.class b/Bai2/Bai2/bin/Class/NhanVien.class deleted file mode 100644 index b73ba0a1197c6407b5cb18a387eef3b637ec7dca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1346 zcmb_bYflqF6g^W~wk->k77A4<#b+NteWMgnsiHS5s8uifTgO z{iQ|9)glm>(-FeBK*(}j)25Vm(>Sh3+oIW&j;wm-ctaXxOA6?=Wwfgn<>rMz(r43i zWvf`J8@6qBN<+enI1iEav#PDVmfDJKiu~Vy-JdsM3@UhO84r_QKFh3%O*QDD$ z*=m@bFgB=hq&%AIIyP193sJ0NOUHA(U_%@2wrMv6Rxir#99JK`q#(9+l)dy^XE+~9 z&DT11lxUhKT8ov9R-9g^Zth4m4U;Fcx2AYwnSC?H0i^<}d1wV`bCS45xO>3A;6Icf zAo_(y06Nzw|G)&DC;5SAo)e}p&7A^>aa91W4;#xDR#sEN0cP^4(09!K!|HGuuC_aT5Ppm z>a8<=(a{;5aYh|ynDLW!G>kIi_}PEq9}%B-v*A+fhuwWI=RD_}=Un!$e}4Z1z)9R! z5D`$bC8JzUPvo*g3ZeqruNgOubjfh$(-&v2nMGe9I#({v3UuUxtBP-z(&s$SSjyRD zKO@kbx91(huXv`wp-0J_&ed#W4QI&B3{s`>wC&jbpg=<+IY|Rqcg|GNfL0C7P!((w zXn%w;6>ZodMdH*+j3y_WA+S?J42=TYa<*fRR~BYXuVBoU=uAB47LC%R;n{K@9!7o3 zE(>U(Pcm*9gKwD&fq!HmvBlryq%_;5p&R??urW7BDiXCgH_?t%dTFkxX!#zczxC#&{Z5kpMq4K*RARr(l{y*Ta<_oMMnd+ zGfxLq9LGroCj@qEq$c!V!&B%NP#p7?KPn-Z*HNkPjD}Mf5NMJ&GC|B&BDsmY5WWeg z1$GDi`<8Uvw;jD`+5DRRfb@P)!x`zM5;$3M6r2;-wNb1!prMLgnlrs7WMv*0yyRZ@ ztqK`9i|1tR9F?o*HJryN3(;6yG#zHNi{O7woXpWLr5JTr9FaY~S<@ z-}PjFgoy~?N5k_>3q1G=*t+qJ@~hu!sNg28$|`%f!fI12Bcr>eVJS$#yy>5J3nnAG zjkgrs+1hkL#cOz5_IsmwqhgfGQu`eZ??UCEv6z>FW!LGEp1rT(9zI}oT1I(1aDpAc zfe^E#899m`u2c>kHSbouqB&yAVbv@rQJ<8;e)8SG5lyz`XyaGmE`laRx#oc6yM-si z!5)bBtU&8oMcedtbp_jhMf-z5zJu?!07;`{D|T?#$uo`m)WR<8=2ytXhKNJ765*NJ z^9$O0t9Wc`14#{T;|ezUm#=Wyxr!@XzQ$!sUEl~2ul5|NqIfSVI-=d* zt(9fi4Uh!R1i|hm`Flv=UeeaZcQ-@bhe3us!c~qTPv9V?aTq>_^&KQ|7d`k0y||AQ zK0_bAz%hJ-etge?xJ><@kO`0nYXq&+_y8teCwXI50jwd9#@b#%LC7OjRVl{5LJ--*7|VPZY*_NzfZry!jOruI}>UJ%O*+{@$RflkR|1x`WeB$2n%<41*sI!qkJ@ o^sR^4hYv{)|25bahA9KtiO3pDI~sU+n`Q5TH7f8i?;`l*Us0IkDgXcg diff --git a/Bai2/Bai2/bin/Testing/Test.class b/Bai2/Bai2/bin/Testing/Test.class deleted file mode 100644 index ad1fb412cd193890d6f9b4ab52487e74afdfdf57..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 974 zcmZuv+fEZv6kVsZv>irn<)$DGDB70Gc)w5tZHL`?|^@#%D&(7~BA*qIXj4!=Ym zAd$om@S}|Dv}iH#a`w6Gv-a9+uV24^`~+|x)htp1=9U*HzS^~Q%pxr?yeAK&9Z252 zZR~k&BGA9)D?eEm=qr}C1=6+Xqi3KGc@r7*3k*5F@;2LH!)tBHM&JpII*}`bZQ1hm z`SdcKH2qj$&^cSPLcCD=N?@Y+!RghmCoR&dl(w@N5g6$_v=cwD>#kJFYvobEcot*- z5w3rY6E8F|fk}as1|9E0`jP!g?Y9%6dNQmS7{+By{))g<@xl~cct*ge1u~B9_fD;9 zU>bS7Tr*)|j@qfF+^o~9L<&?uMf!R$$ zS_d++nvs=w%3`xt;)m8J-wRhQ10^hGQ5Gn41YuieAWSS_Ss=5oQCa4cPiK_>nP#+4FuZe!(PKnj^vcX5$L|Kqm~_G*rl_5T5iIajrc+li*`ZMG kmce5@Vg3LOvx*8y6flD|JY`P{L|MlM2?;!7P72Te0Gln;&Hw-a diff --git a/Bai2/Bai2/src/Class/CanBo.java b/Bai2/Bai2/src/Class/CanBo.java deleted file mode 100644 index 9bf9f1c..0000000 --- a/Bai2/Bai2/src/Class/CanBo.java +++ /dev/null @@ -1,50 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class CanBo { - // thuoc tinh - private String hoTen; - private String ngaySinh; - private String gioiTinh; - private String diaChi; - - // phuong thuc - // ham khoi tao khong doi so - public CanBo() { - - } - - // ham khoi tao co doi so - public CanBo(String hoten, String ngaySinh, String gioiTinh, String diaChi) { - this.hoTen = hoten; - this.ngaySinh = ngaySinh; - this.gioiTinh = gioiTinh; - this.diaChi = diaChi; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap ho ten: "); - hoTen = sc.nextLine(); - System.out.print("\tNhap ngay sinh (dd/MM/yyyy): "); - ngaySinh = sc.nextLine(); - System.out.print("\tNhap gioi tinh: "); - gioiTinh = sc.nextLine(); - System.out.print("\tNhap dia chi: "); - diaChi = sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - System.out.println("\tHo ten: " + hoTen); - System.out.println("\tNgay sinh: " + ngaySinh); - System.out.println("\tGioi tinh: " + gioiTinh); - System.out.println("\tDia chi: " + diaChi); - } - - // ham lay thong tin ho ten - public String getHoTen() { - return this.hoTen; - } -} diff --git a/Bai2/Bai2/src/Class/CongNhan.java b/Bai2/Bai2/src/Class/CongNhan.java deleted file mode 100644 index cf97deb..0000000 --- a/Bai2/Bai2/src/Class/CongNhan.java +++ /dev/null @@ -1,33 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class CongNhan extends CanBo { - // thuoc tinh - private String bac; - - // phuong thuc - // ham khoi tao khong doi so - public CongNhan() { - - } - - // ham khoi tao co doi so - public CongNhan(String hoten, String ngaySinh, String gioiTinh, String diaChi, String bac) { - super(hoten, ngaySinh, gioiTinh, diaChi); - this.bac = bac; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - System.out.print("\tNhap bac: "); - bac = sc.nextLine(); - } - - // ham hien thi thong tin - public void hienThiThongTin() { - super.hienThiThongTin(); - System.out.println("\tBac: " + bac); - } -} diff --git a/Bai2/Bai2/src/Class/KySu.java b/Bai2/Bai2/src/Class/KySu.java deleted file mode 100644 index 1831b4a..0000000 --- a/Bai2/Bai2/src/Class/KySu.java +++ /dev/null @@ -1,33 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class KySu extends CanBo { - // thuoc tinh - private String nganhDaoTao; - - // phuong thuc - // ham khoi tao khong doi so - public KySu() { - - } - - // ham khoi tao co doi so - public KySu(String hoten, String ngaySinh, String gioiTinh, String diaChi, String nganhDaoTao) { - super(hoten, ngaySinh, gioiTinh, diaChi); - this.nganhDaoTao = nganhDaoTao; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - System.out.print("\tNhap nganh dao tao: "); - nganhDaoTao = sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - System.out.println("\tNganh dao tao: " + nganhDaoTao); - } -} diff --git a/Bai2/Bai2/src/Class/NhanVien.java b/Bai2/Bai2/src/Class/NhanVien.java deleted file mode 100644 index 1ea85dc..0000000 --- a/Bai2/Bai2/src/Class/NhanVien.java +++ /dev/null @@ -1,33 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class NhanVien extends CanBo { - // thuoc tinh - private String congViec; - - // phuong thuc - // ham khoi tao khong doi so - public NhanVien() { - - } - - // ham khoi tao co doi so - public NhanVien(String hoten, String ngaySinh, String gioiTinh, String diaChi, String congViec) { - super(hoten, ngaySinh, gioiTinh, diaChi); - this.congViec = congViec; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - System.out.print("\tNhap cong viec: "); - congViec = sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - System.out.println("\tCong viec: " + congViec); - } -} diff --git a/Bai2/Bai2/src/Class/QLCB.java b/Bai2/Bai2/src/Class/QLCB.java deleted file mode 100644 index cf3fbb4..0000000 --- a/Bai2/Bai2/src/Class/QLCB.java +++ /dev/null @@ -1,69 +0,0 @@ -package Class; - -import java.util.ArrayList; -import java.util.Scanner; - -public class QLCB { - // thuoc tinh - private ArrayList dscb; - - // phuong thuc - // ham khoi tao - public QLCB() { - dscb = new ArrayList(10); - } - - // ham them can bo - public void themCanBo(CanBo cb) { - dscb.add(cb); - } - - // ham nhap danh sach - public void nhapDanhSach(Scanner sc) { - CanBo cb; - System.out.print("Nhap vao so luong can bo: "); - int n = sc.nextInt(); - sc.nextLine(); - - System.out.println("Nhap thong tin chi tiet:"); - for (int i = 0; i < n; i++) { - System.out.println("Lan nhap thu " + (i + 1) + ":"); - System.out.print("Chon can bo (1-KySu; 2-NhanVien;3-CongNhan): "); - int chon = sc.nextInt(); - sc.nextLine(); - - cb = new CanBo(); - - switch (chon) { - case 1: - cb = new KySu(); - break; - case 2: - cb = new NhanVien(); - break; - case 3: - cb = new CongNhan(); - break; - - default: - cb = new KySu(); - break; - } - - // sau khi chon loai can bo thi nhap thong tin cho can bo do - cb.nhapThongTin(sc); - - // nhap xong roi thi them can bo vao danh sach - themCanBo(cb); - } - } - - // ham tim kiem theo ten - public void timKiemCanBo(String hoTen) { - for (CanBo cb : dscb) { - if (hoTen.equals(cb.getHoTen())) { - cb.hienThiThongTin(); - } - } - } -} diff --git a/Bai2/Bai2/src/Testing/Test.java b/Bai2/Bai2/src/Testing/Test.java deleted file mode 100644 index 2d16a6a..0000000 --- a/Bai2/Bai2/src/Testing/Test.java +++ /dev/null @@ -1,25 +0,0 @@ -package Testing; - -import java.util.Scanner; - -import Class.QLCB; - -public class Test { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - - QLCB qlcb = new QLCB(); - - qlcb.nhapDanhSach(sc); - - System.out.print("Nhap vao ho ten can tim kiem: "); - String name = sc.nextLine(); - - qlcb.timKiemCanBo(name); - - // huy sc - sc.close(); - } - -} diff --git a/Bai3/Bai3/.classpath b/Bai3/Bai3/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai3/Bai3/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai3/Bai3/.project b/Bai3/Bai3/.project deleted file mode 100644 index 93fd09e..0000000 --- a/Bai3/Bai3/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai3 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272563 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs b/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai3/Bai3/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai3/Bai3/bin/Class/Bao.class b/Bai3/Bai3/bin/Class/Bao.class deleted file mode 100644 index 7af85b7b4ad3bd6259f5e0dba49d472581b83fb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1267 zcma)5YflqF6g^W~wk=D60!36x@!1DZA1F!@v?xN-G$b^QejLiAJ7zoEv|A%TOQUU~ zi9f&}WxTVyLa}@>o6KwHo^$TGcYgi;{u96k4h@7DVtY34c8g{17zi^=`r8_p6)AcQ zrfTxDBa6ESTv-gs$_M_D7j3SZ#bdW4RkOq}zAcq>cNoU9xjI95&p8!wjA6orfhfaN zMJiG4wN6B*#!qaaVVnlH>%1fNJ~#}!mh3W2RL&I<_EvV3arESH^e9)?5|UcNEJODH zU~=^s80JkxFizIA__+_`u29u?WiqJil)1WagdJ*=EZ(kJj%wDVVn_vKJy+Vr;|5ns zbV|OSB@@?iBZg(H7|1Y857~Lvbw$g>E!-w2ot{fV{IsM~JR+-IGFCN(7nNZyn;Z3>A=GV<1pm)409AC#l0wxi`PVO9rl%(LW7NPihJ_(Vyap@xqFBT7vk8&j)`5oq>kk6wos=GYgeT>A~>KZX^66kJugSs@f%!Q`o_e* zcFypev#G}MW2e_?h<&NsIZCf*UF*gQwa*y6E^T<5ui~lQY1|?B(Oj$&7HtCEPAmCPq>y%of@##>5jgY$`=N>`333Zoj&g63w^9! zVo#Df5N3qXCJAqzFmygCKl)rj3XcLSsO$m9k!KZdskK3??k cs*l(IW}2p`Wh^1%@%X-_10IIA#2v!HA2=@p_5c6? diff --git a/Bai3/Bai3/bin/Class/QuanLySach.class b/Bai3/Bai3/bin/Class/QuanLySach.class deleted file mode 100644 index 8ffe30ab73ffe3d220484f62df962b0e767df9fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2492 zcmZ`)Yf~Fl7=AW{ZdjIExU?wh+7_AsA<}zEZ(M9ko1`sCL#dbc5LU7!+0bNzMXjxu z-{4I92bl4LGdh}%GUMo1|Aim@4=O%qHy2>)hfU6&^Pcy8F7G+}$G^Y)3g9HZQsGn3 zJ)0Nha`bjZ*zwJj$mUe|Ir~s-h-hBetI?aw56!Hjz`s&<@(TLn?o!3E^3my1No>Zg zvJ+F#macW+ir!n+}|}Y|FW*pd}Q}u*7U}#njM(4jpaK zRCFomeMLD9o#>GvLGB67hcj(Z(5Isn2NZP0E!#|13d?3GEtd0y6O0$LBA*c@OTO18 z{Z7s*%eDRd39H@7nS~lohJ^MZ4`(ERAsuhvO+ptdE0iVVao#0aEPPLaPioe+FM$Hx zvgd@IlX|D)GTRXyM=`7*U^!+L_x6X;_@3GxVh#Cpxd zPCF;on?g#>c1f1X3fneIv2Z4USp^fbxuR|4i^4LP(8#k1jnHI7dJr>?N77<_HfP0* z6OkEF3{M%7*1I~c;HrXF7yUl$q;J`)%&uV`H&k3#(9?9JR$NCM2~v=T%-htEl;-7z zn>udcHVv06vSs(%RZFiTr9kuSl2A1)phE>ui(dCo;?{6SPA~BwdebDK;VwEfjN^SB zA7Gk0q+DsLu$s1Pjc4Y*j<=!7kIzEQRqnEQxJDs!YteLvNy_AVr z;_QWVJb+I*E42;a36Xk@5WrKKMHRUwdxj>Yij`8iPDqT@k>R{o$xz-y z{8#zrL%<#LHsee?XXfDN2nde8gg&~B&ZTbcCAxn?@AqzeKYu&jOgbYw(8IR@>GR z9K<2MDblT4#u--eaZVfk5xrwoyuR4Xq`50WUX{IWmH{uamW6xp77XT5WFOS>JzCYnvNKOyMbFt~d+KM1BoJo?#7na_T@C1=!@jL1T(oC&yEKq+NbisgDwk(GpR3 zt5Vn@w%yr4p^w>=CYd8si(*kj72a>`rcBC{njOF*aUBi6T6Q z%29<2uI+y|6&Y|Hxw`m#+H7F_r-o59G2YyTG5Cp#uxI>tEIfxMfo`!)gP%2~?=+?ljs-t=r#l&acOR|q znzTlEW`JviI!}wQBa9pTI>kvcffSNhu^DO+b*Z0uek#>5# W>5O{<26lK>_XJUjFNnp5FaHCa4)t;X diff --git a/Bai3/Bai3/bin/Class/Sach.class b/Bai3/Bai3/bin/Class/Sach.class deleted file mode 100644 index aa28cbb531f88e8ea98972da6c1cd418aa732196..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1467 zcma)*YflqF6o%h{mTk*&D+Rez1hE&OCNzUHA~SP zLxdP&NFefmI?Yg?K}MQQI#vq

QC6}= z%PeG-DKOj&S+`Xwk;zNbG^$CLDy(A?Q-0jUoQ7F}{uYxz*KDJ#;}+)0QLAnX47s;c zR^o^fU{e|lSx)*8A#eSM6f;cO3Kx{z2nP_uf`+)jpdyvIgd)*)?|oRKJGp2zD{OPEFxxWj>v(_-svuT4UW=Sm)H|c3qWDjj9hjRObE`XHs~| z#jq4W3VS;C!L=(Z6~jCgSiH`QwwpDzlPvLEN7^yNw%o>G?+Jr}-GgOzI)XN?8P?*5j&oFYO7o=UFGa3fbgAl!k9NjJVY*Uw1Fh(mJD}-?xF+~Uy1kRTUIagt&5O*BS z1h+_&(+=#ggA>1mjU$Oo3NETcMLbM+rYC1UR?Y* ia(|38@Y?-x1>`z5OLB7##v0~ZGO>P{i8qAZf!tr^sVipy diff --git a/Bai3/Bai3/bin/Class/TaiLieu.class b/Bai3/Bai3/bin/Class/TaiLieu.class deleted file mode 100644 index 173c07b24f5f076f1496e38e0f4aca3a816ce5c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1561 zcmZuw+j1L45IrMHSxKxfab)3ulWamRlI%nw7Xwy8z=jYJ*)d3%T7dYeX;-AZHEfEu1;PkEH)% zo?mUYwJ~nLCMcJ1#lq!NN;Q8Tgl^Y{gRA^!Fr;WpF$XWG?oy?YTDiJg%i<%23%MO; za=O|HwdeR$e#6P*25wonNpB?Z={OrDloc{Pfg<)9UoP+Ev5MOk))dZ15GRS-xPz)f z*0^s%(OaQVDo?AF#m5TEF+JAQp(4(kp$?sWZ8n@N?vK5LK<=C#OYL-6Yx%({9@<#P zCkmG2sS8yWojs5mwE3|(-$`05-+ae&O{?P_3vb~Oi}U{`+Z=lSf!oi5eKeQbKCN60 zUq~;N^Qd9d#umO}*Xdr*H3tf}&(dn@=LvpIAfDRzCK4+Q;trSE)NOn#C9t9r_$G^n z6tZ=ONIT+ao}o_-yTa}}g_Tl$TK!`V?8HMi+@8!_z8MVrZTG1s!(k_*ct<3{Rd(_W z2YLo6X>3|4Y3pcbQ*+Po1?P;b&C`AEN^UD}G5dS;Y@TbLVZbcXn8yMwJAQ=oSma3n zE^rk9pD)wg3j$DCJ)*I8gkt5=5tb)-MWzK~(~QfZfH^GDDn{6qI6lE9Qbb%x6(Z`w zq#zT?PbqwW50lKlGPC&B|G>)PwGpmYR!69ifSm76&P6%jOU@5SOP>8W;dYJKAa0h( z3s}K22in19PS_RPrS*`aiU!3v+nDD%KE-F`qOdWR^B4X_m^Ya7Z`58bK7NZQl|NA! z;mZ-e9^u)s<9X~TPC2$?$MOg-;)n@T(GTpsi@1quUh{B#&SFY diff --git a/Bai3/Bai3/bin/Class/TapChi.class b/Bai3/Bai3/bin/Class/TapChi.class deleted file mode 100644 index e223e7c38f14d2fb1a1728b7ce09a9a85d34c089..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1431 zcma)5Yg5xe6g^worYYgoQ1HQ{$ip^8ih`gN5kZk^MYJ8%j|*f-oHpq+sgLnj=}4K; z8GnF3%JJ@|&?0!W*D^P%Map$PL7hSa-+h1eoN@w;M!kg})8Alg14Kb(;eMQ?bcN*1w zvtH)=6_X)RbPsrCkJoLnZf%Br%k~(0i>LfTQJ%p_7vJ*_JXayoT*9dO4n>-j)xO2a6|RNTOnf=Pz{j(dLge6y-y8Z+dp+wd8Z zfePEr?UDyRIbrf@K87^Ipt?hxDbG#S=%rHhJl0Ao4g<3avJAS!J)fxI7UmctHGxIo zm$)TF&f|`P+YAE|qVomIOZq6ARy@V3o$G)3n$5Rd4pc0SrTFrD08Aj5Di|Sfyf zS5)+BS@cb(Bh*|aw^2VZw`|cC-9Z=53H_L$V(g+u4bexnDQ8rf^bgYsH5QF=S}o9@ z(LZ9Gp!=%~>!C4DX@Ew-z4VEh3_>6JX(a##XcPcnC`Q2QMs{}e1PNpG7)c`;ImU1s zErQ(Et(N^h0cC&l#$GPX;U?<_4a-g-&}+5l%rjm^I-bCA`lHp#T?nhBmCx*H7!Vj}0JYF@bA^)hJiD4e3PTzO z{~=sB4MMwOU>Mg0A}Z)mGo<6^w!Pz8$f&lgnuZD3jnW;kBULsfFuz&)fX zuwSFzEz<8P!XMIc%m_^B`Y!XCC(<`vUpi*U$93$QNmIl&?nL9a*$g?o|WNl}@pe>jz96mDNK|PO8Izu+Kq>PzTK^=VzC0 zN$dY6s-aWrDeTI~H3m{OQZM+mYRTSo)I=xL(9SDkOoEa54FM6p@eAOp@s#5(xW{JB z5&znNb*>5q4SKj5O#|-NcuJrbeY{c5KNvE`ed_}K`)5d=W5l|^*#0?g?qp}{n8?;K zb%s01OdYd4KiJLA)$vH(Jh{ACj%G)rbu1Ho)=Iy?WPr}}1_!MdBTP9?ji)hy43e0~ zAeJ!1CJbYZ=q5%RR2Q3c@B%OC-$Q&2>m-}vzheWhSbGK&wB91|72>b?7A3w->j>Wb E26{sG`~Uy| diff --git a/Bai3/Bai3/src/Class/Bao.java b/Bai3/Bai3/src/Class/Bao.java deleted file mode 100644 index 5da5969..0000000 --- a/Bai3/Bai3/src/Class/Bao.java +++ /dev/null @@ -1,33 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class Bao extends TaiLieu { - // thuoc tinh - private String ngayPhatHanh; - - // phuong thuc - // ham khoi tao khong doi so - public Bao() { - - } - - // ham khoi tao co doi so - public Bao(String maTaiLieu, String tenNXB, int soBanPhatHanh, String ngayPhatHanh) { - super(maTaiLieu, tenNXB, soBanPhatHanh); - this.ngayPhatHanh = ngayPhatHanh; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - System.out.print("\tNhap ngay phat hanh: "); - ngayPhatHanh = sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - System.out.println("\tNgay phat hanh: " + ngayPhatHanh); - } -} diff --git a/Bai3/Bai3/src/Class/QuanLySach.java b/Bai3/Bai3/src/Class/QuanLySach.java deleted file mode 100644 index 51863a5..0000000 --- a/Bai3/Bai3/src/Class/QuanLySach.java +++ /dev/null @@ -1,82 +0,0 @@ -package Class; - -import java.util.ArrayList; -import java.util.Scanner; - -public class QuanLySach { - // thuoc tinh - private ArrayList dstl; - - // phuong thuc - // ham khoi tao - public QuanLySach() { - dstl = new ArrayList(10); - } - - // them moi 1 tai lieu - public void themTaiLieu(TaiLieu tl) { - dstl.add(tl); - } - - public void inDanhSachTL() { - for (TaiLieu taiLieu : dstl) { - System.out.println(taiLieu); - } - } - // nhap danh sach tai lieu - public void nhapDanhSachTL(Scanner sc) { - int chon; - String stop; - TaiLieu tl; - - do { - System.out.print("Chon loai tai lieu (1-Sach; 2-TapChi; 3-Bao): "); - chon = sc.nextInt(); - sc.nextLine(); - - switch (chon) { - case 1: - tl = new Sach(); - break; - case 2: - tl = new TapChi(); - break; - case 3: - tl = new Bao(); - break; - - default: - tl = new Sach(); - break; - } - - tl.nhapThongTin(sc); - inDanhSachTL(); - themTaiLieu(tl); - System.out.print("\nBan co muon nhap vao nua hay khong (c/k): "); - stop = sc.nextLine(); - } while (stop.equals("c")); - } - - // tim kiem theo ma tai lieu - public void timMaTL(String maTL) { - for (TaiLieu tl : dstl) { - if (maTL.equals(tl.getMaTaiLieu())) { - tl.hienThiThongTin(); - } - } - } - - // tim kiem theo loai tai lieu - public void timLoaiTL(String loai) { - for (TaiLieu tl : dstl) { - if (loai.equals("Sach") && (tl instanceof Sach)) { - tl.hienThiThongTin(); - } else if (loai.equals("TapChi") && (tl instanceof TapChi)) { - tl.hienThiThongTin(); - } else if (loai.equals("Bao") && (tl instanceof Bao)) { - tl.hienThiThongTin(); - } - } - } -} diff --git a/Bai3/Bai3/src/Class/Sach.java b/Bai3/Bai3/src/Class/Sach.java deleted file mode 100644 index 3756f0a..0000000 --- a/Bai3/Bai3/src/Class/Sach.java +++ /dev/null @@ -1,39 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class Sach extends TaiLieu { - // thuoc tinh - private String tacGia; - private int soTrang; - - // phuong thuc - // ham khoi tao khong doi so - public Sach() { - - } - - // ham khoi tao co doi so - public Sach(String maTaiLieu, String tenNXB, int soBanPhatHanh, String tacGia, int soTrang) { - super(maTaiLieu, tenNXB, soBanPhatHanh); - this.tacGia = tacGia; - this.soTrang = soTrang; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - System.out.print("\tNhap tac gia: "); - tacGia = sc.nextLine(); - System.out.print("\tNhap so trang: "); - soTrang = sc.nextInt(); - sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - System.out.println("\ttac gia: " + tacGia); - System.out.println("\tSo trang: " + soTrang); - } -} diff --git a/Bai3/Bai3/src/Class/TaiLieu.java b/Bai3/Bai3/src/Class/TaiLieu.java deleted file mode 100644 index 032f499..0000000 --- a/Bai3/Bai3/src/Class/TaiLieu.java +++ /dev/null @@ -1,46 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class TaiLieu { - // thuoc tinh - private String maTaiLieu; - private String tenNXB; - private int soBanPhatHanh; - - // phuong thuc - // ham khoi tao khong doi so - public TaiLieu() { - - } - - // ham khoi tao co doi so - public TaiLieu(String maTaiLieu, String tenNXB, int soBanPhatHanh) { - this.maTaiLieu = maTaiLieu; - this.tenNXB = tenNXB; - this.soBanPhatHanh = soBanPhatHanh; - } - - // nhap - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap ma tai lieu: "); - maTaiLieu = sc.nextLine(); - System.out.print("\tNhap ten nha xuat ban: "); - tenNXB = sc.nextLine(); - System.out.print("\tNhap so ban phat hanh: "); - soBanPhatHanh = sc.nextInt(); - sc.nextLine(); - } - - // hien thi - public void hienThiThongTin() { - System.out.println("\tMa tai lieu: " + maTaiLieu); - System.out.println("\tTen nha xuat ban: " + tenNXB); - System.out.println("\tSo ban phat hanh: " + soBanPhatHanh); - } - - // ham lay ra ma tai lieu - public String getMaTaiLieu() { - return maTaiLieu; - } -} diff --git a/Bai3/Bai3/src/Class/TapChi.java b/Bai3/Bai3/src/Class/TapChi.java deleted file mode 100644 index 2730c54..0000000 --- a/Bai3/Bai3/src/Class/TapChi.java +++ /dev/null @@ -1,39 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class TapChi extends TaiLieu { - // thuoc tinh - private int soPhatHanh; - private int thangPhatHanh; - - // phuong thuc - // ham khoi tao khong doi so - public TapChi() { - - } - - // ham khoi tao co doi so - public TapChi(String maTaiLieu, String tenNXB, int soBanPhatHanh, int soPhatHanh, int thangPhatHanh) { - super(maTaiLieu, tenNXB, soBanPhatHanh); - this.soPhatHanh = soBanPhatHanh; - this.thangPhatHanh = thangPhatHanh; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - System.out.print("\tNhap so phat hanh: "); - soPhatHanh = sc.nextInt(); - System.out.print("\tNhap thang phat hanh: "); - thangPhatHanh = sc.nextInt(); - sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - System.out.println("\tSo phat hanh: " + soPhatHanh); - System.out.println("\tThang phat hanh: " + thangPhatHanh); - } -} diff --git a/Bai3/Bai3/src/Testing/Test.java b/Bai3/Bai3/src/Testing/Test.java deleted file mode 100644 index 18e6628..0000000 --- a/Bai3/Bai3/src/Testing/Test.java +++ /dev/null @@ -1,27 +0,0 @@ -package Testing; - -import java.util.Scanner; - -import Class.QuanLySach; - -public class Test { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - - QuanLySach qls = new QuanLySach(); - - qls.nhapDanhSachTL(sc); - qls.inDanhSachTL(); - System.out.print("\n\nNhap vao loai tai lieu can tim: "); - String loai = sc.nextLine(); - qls.timLoaiTL(loai); - - System.out.print("\n\nNhap vao ma tai lieu can tim: "); - String maTL = sc.nextLine(); - qls.timMaTL(maTL); - - sc.close(); - } - -} diff --git a/Bai4/Bai4/.classpath b/Bai4/Bai4/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai4/Bai4/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai4/Bai4/.project b/Bai4/Bai4/.project deleted file mode 100644 index 13c1756..0000000 --- a/Bai4/Bai4/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai4 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272574 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs b/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai4/Bai4/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai4/Bai4/bin/Class/KhoiA.class b/Bai4/Bai4/bin/Class/KhoiA.class deleted file mode 100644 index 70a793d84837c153d71c2ce0b498188dc37ef9c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1334 zcma)5+fEZv6kVsZ^ull}EvVc^6le!ZqPz8B=DOc53to{2z^! zL=!*2k20<^Q|SN1;S^Jy(*9_eb7JZ`MPeO=F4u=vQM}Cy)}PY7wF%%Y|Gsd=*wiQT-|q0j0E~H zs34Anz;Ma3jidJ2vC*vP$8|%3IyJps)ti>gyNhAhv|8j*3NT}>&CGQM|Fe><#vzbW z5JA6;#uY^U=$3*Q`UMo*)EgDku}>?O%>&&+ZP%*j%QfA$jpkOiDqk|C;5P2WF#|P< zS%Hy&CZAibai-ud<|u&Eb_LQtJOlm_E6C%4K+HBixv~XRBa^)@T?}kxfY@45 zjbY=;(t1%92(@Y?>faBRVULDQ%dqL3e_~3_HWfTVA_{I#1myB8wAZ%kCq^@dC*&Qk zII8LRqR;|TmLi@??`SgGRj`MBx=e304EsbNcasp;p4BZu*}XhbBt-r=SXY0 zb4>K`#z_Xe6UG?trZ9vwqj3*g^Y3@DiR2NNq*5Mr$s{HJ2R=$jmv<|FVP&~j(3UPR z`3=*_dmYScOC3lSGGFcGX_>G0@&LCvVuPp=O!CE3WH!xj2J@Ij4k{i}RH?zZU+t1- zfjb3q5z<9nPA19#_k0luhI`js&_vI+JlIGo|ZI(<~M$7jT1b(}n_9z2I5CNI#az z+#eU2O6J4=bo!y*VO#Ie=2FWvIoE^#u&TFHdNZTvOVlExwm45*I#z4`n>J zW#P}p&CHp(r{B!<d7y=DHmU%vWSf_3Dj>?qKaDqv)c;=EI)mU zT$tEtqK3LaJ5WjVxL(boY$|7QB+v=cxr{@ZDP3=yRtHpx4e0vKf(!kA^!?s zQ1LQGo7IR}FxUDUIIrci%jnVuIIyT1RL#o7?6J~-7NZ7C>9Mr8e|mPlLHjquqpMXi c`jv0X(DXfYO0I)_s%qi^mC5cQnFfx&06le4p#T5? diff --git a/Bai4/Bai4/bin/Class/ThiSinh.class b/Bai4/Bai4/bin/Class/ThiSinh.class deleted file mode 100644 index 3c9a17a5924b9b958dd116076113760267e27186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1674 zcma)6U31e$6g}%Wk*taklGwpc0P)q@BEdjX+S)+VB%~P9Kx-39%Zp;~L}Hv(#+I4( zt-qxG1H8~_%nY6B58y{Jy?3R=am_kuiGs* z{Gc8v-#}Vm>ZSL}E4MwhSAM+vQZ^%jbT?ev5D+ziaX)NGB{01;xK@ukf!eDIOtb=T z-46t;Rv^{WUW2}5y%VS)x+gGJEbS23df1W{#&FukC$I%hZv{$j_x5*Xr{V3kC4+}e zuf5}S0zN0kbmRwJzCA>lqE?EvQ8NF>QrgKtAZKG76TCZX!+^=Vf{jePTd-ll6tI== z9W?wDZCu6`(je@SpxO9!5SE{i zbP)+Cz5S|*PX%T&+Z4&^hR&`RIxSE66~{smu7MJHwd%v~Y+S=4Rpx-92s@#sE0~m~ zv}55qZWt&FoY4>`iQBk|TLOlXzeF{LphDI7!HSK~aa+J-4_8TGwpbdK*2I?rlQD5W zbRwxLj)@8tE4EQvI88rb;~j!HGD_w2dQL=5QgH-Q-6rMt5m^bwr#sZ6NBSH1Mquv0 z4Y<||+AY~JvCd@b!ve12KDXPVg;jiO;{m9bC%l6LsagUH#oB0A30#$5JhHK+g^0pf zQLf0gjmIp!p@nZN6W!log6VNJ$jlaVi|Spp#)v1)f-)YJn$~umsNG ze8T2;V#BvK|HOsqt9^XtUh9LXWNBG`#>Oua<1&%t^H+m&p3l|6`2=&9VgU;j?;I&| zp15D2or9|+{1PtF_*}+aT)};^uwJ>C#c?K^ei(K#eiWN_ECYd_Q(`d3|n)05M`)V zQHh{}T7ibgqzj@3_3}uFKJBBCsY(bup`siWtS4re`b2JVR?kdovnj#}#jJ#un$j|c zeD{ogJ87_-`XZ`g`9xJ^C-uci7bd;ii$^@*ktvzKRmC=JCvt6Wj;yr1C2wLZ8krIB zNy=&;3Lv1GNi991naQ}8ND4H0-VUkpgl3w0CMv6X8f^-mDUl<-l(qFm70;rb$*mlf z@gy;IF+-^`7rAaXDL8`IEdZYqoAuua%lh+ z-PkKoo|Z8ms*ouRbDj``*oXZJdP(GlPF@8n4xmp!G4(6~(a zrWC|VG7beW!Hlx~gBZi8g0m(2!vVyZe@X&+k$~d40M5}cVi3?7kh~e3SMahxb;&HL zcm+GXu9{3zi?F1}2qwYv0%DXu`EM|G+}08c<67FAl-i`B zn^d9Lud@3M6_=#A{;Y9TSCA6evTq zXz8?Wa+X>-(T}j{MPpZAX4Y^@>zBS)r0hYWf{#ZBB|w;Q&e(QGRt=iLM6 zh%xHfqgA+#j}+YDowG4a#a$I2;}e!HXXfE~*#zw~6?dJfV+nCRLdBQ3$3aMH z*$Ky;lgP`dGHVTKmXuW>7`Jkngnq)17iP`+$6${Hf~VL^W&C8YljI%Ce}!*81o*}< zkiAw#%Lx2j0iljns2yvlnXU`2qV5+o{OFu-QRj*+EmvITks^`glt+b z;t;d=XbX1yjE2rUTFz}m3OYOW@-yH>X>w0`QRssm2s4f#{+(_-@x6l|xc?J&g(7)$ zGG1^bh#*a5SzhVO*ozzJ!5#YCL$AZl zd9uW+*SWcmi_pl)1oKIje2h|DrPo)>)W_XzLy|cX+^NAW%yH#s+-uOeD#vS#JqD#f zh!qNi!aE*ss^6Rj-|3V&^|yOli*93;Dk zh~_YP>*wkaSsifL3cCqCwgNmME9Q`(&#BnwR2+csA5;s`#hvTa%bkI{*oUB7XID<)yXDcteiR9XP%TROh;cos?68 eY9xEENK%FndG(F#P_R?zC5Ekg$mxnTKOP+0) z_sxng(6wYamY)&mNTx~x;jCLVW9UFsM<==jdh?cJZZ+#=vr&{~+Z2fB-HNnJvSF$C z>@e)tEKi^(f0c8Qcy(zx0z=8K`AhDC-=M6;R7pd>K!1>E`j(w8RHWmWjVKZr)G%;O zaN)@F&AN^u+!hEa(7`sO<)(AaLDMIyDeH?d^x=*YKO!)kyzz=6zRS|Gw)DJov3X=V z1Cj|s?w<$o~+aiHp1|TwqV5Y z7*91k5l93jQs@-~9Z94Fv;zfdt8&i72IIMCkrFkjV+zkWP=|D@WGawIHML#c)z-18 z5u~Y1UAr#Gs5S#}wp>u4FLcZV1Fl)7Q>j0A;wu2DX(jgv8atKP2am5$d+ zd}knDb$njO0yuBYF~9jahi#*uaw@Z|BZIdB5tUJ95*SFP{&$1Y^j^mbva}JIHY~GF zS!yt}Q8Je*DYOqd)|BebitT!Y3d_bGeV4ewUUZ39Vd{n^33OMzi@DQ+`G2gyN}`^- zB3;!L0g)4k72IZ{Vy;>04MdgAr`1$34%W(72ZZ>=H^Wt9l;$qDcTSuj@;yk$xT-XG zp_{ATzQFw!qbPdN%MV5O)3oir)pb diff --git a/Bai4/Bai4/src/Class/KhoiA.java b/Bai4/Bai4/src/Class/KhoiA.java deleted file mode 100644 index a5e9a3e..0000000 --- a/Bai4/Bai4/src/Class/KhoiA.java +++ /dev/null @@ -1,40 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class KhoiA extends ThiSinh { - // thuoc tinh - private String mon1; - private String mon2; - private String mon3; - - // phuong thuc - // ham khoi tao khong doi so - public KhoiA() { - - } - - // ham khoi tao co doi so - public KhoiA(String mon1, String mon2, String mon3) { - this.mon1 = mon1; - this.mon2 = mon2; - this.mon3 = mon3; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - System.out.print("\tNhap mon 1: "); - mon1 = sc.nextLine(); - System.out.print("\tNhap mon 2: "); - mon2 = sc.nextLine(); - System.out.print("\tNhap mon 3: "); - mon3 = sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - System.out.println("\tTo hop mon thi: " + mon1 + " - " + mon2 + " - " + mon3); - } -} diff --git a/Bai4/Bai4/src/Class/KhoiB.java b/Bai4/Bai4/src/Class/KhoiB.java deleted file mode 100644 index d470247..0000000 --- a/Bai4/Bai4/src/Class/KhoiB.java +++ /dev/null @@ -1,15 +0,0 @@ -package Class; - -public class KhoiB extends KhoiA { - // thuoc tinh - - // phuong thuc - // ham khoi tao - public KhoiB() { - - } - - public KhoiB(String mon1, String mon2, String mon3) { - super(mon1, mon2, mon3); - } -} diff --git a/Bai4/Bai4/src/Class/KhoiC.java b/Bai4/Bai4/src/Class/KhoiC.java deleted file mode 100644 index 79628f6..0000000 --- a/Bai4/Bai4/src/Class/KhoiC.java +++ /dev/null @@ -1,15 +0,0 @@ -package Class; - -public class KhoiC extends KhoiA { - // thuoc tinh - - // phuong thuc - // ham khoi tao - public KhoiC() { - - } - - public KhoiC(String mon1, String mon2, String mon3) { - super(mon1, mon2, mon3); - } -} diff --git a/Bai4/Bai4/src/Class/ThiSinh.java b/Bai4/Bai4/src/Class/ThiSinh.java deleted file mode 100644 index ae4ab09..0000000 --- a/Bai4/Bai4/src/Class/ThiSinh.java +++ /dev/null @@ -1,51 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class ThiSinh { - // thuoc tinh - private int soBD; - private String hoTen; - private String diaChi; - private String dienUuTien; - - // phuong thuc - // ham khoi tao khong doi so - public ThiSinh() { - - } - - // ham khoi tao co doi so - public ThiSinh(int soBD, String hoTen, String diaChi, String dienUuTien) { - this.soBD = soBD; - this.hoTen = hoTen; - this.diaChi = diaChi; - this.dienUuTien = dienUuTien; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap so bao danh: "); - soBD = sc.nextInt(); - sc.nextLine(); - System.out.print("\tNhap ho ten: "); - hoTen = sc.nextLine(); - System.out.print("\tNhap dia chi: "); - diaChi = sc.nextLine(); - System.out.print("\tNhap dien uu tien: "); - dienUuTien = sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - System.out.println("\tSo bao danh: " + soBD); - System.out.println("\tHo ten: " + hoTen); - System.out.println("\tDia chi: " + diaChi); - System.out.println("\tDien uu tien: " + dienUuTien); - } - - // ham lay ra thong tin ve so bao danh - public int getSoBD() { - return soBD; - } -} diff --git a/Bai4/Bai4/src/Class/TuyenSinh.java b/Bai4/Bai4/src/Class/TuyenSinh.java deleted file mode 100644 index 24c723b..0000000 --- a/Bai4/Bai4/src/Class/TuyenSinh.java +++ /dev/null @@ -1,70 +0,0 @@ -package Class; - -import java.util.ArrayList; -import java.util.Scanner; - -public class TuyenSinh { - // thuoc tinh - private ArrayList dsts; - - // phuong thuc - public TuyenSinh() { - dsts = new ArrayList(10); - } - - // ham them 1 thi sinh - public void themThiSinh(ThiSinh ts) { - dsts.add(ts); - } - - // nhap danh sach - public void nhapDanhSach(Scanner sc) { - ThiSinh ts; - int chon; - - System.out.print("Nhap vao so luong thi sinh: "); - int n = sc.nextInt(); - sc.nextLine(); - - for (int i = 0; i < n; i++) { - System.out.println("Thi sinh thuoc khoi nao (1-KhoiA; 2-KhoiB; 3-KhoiC): "); - chon = sc.nextInt(); - - switch (chon) { - case 1: - ts = new KhoiA("Toan", "Ly", "Hoa"); - break; - case 2: - ts = new KhoiB("Toan", "Hoa", "Sinh"); - break; - case 3: - ts = new KhoiC("Van", "Su", "Dia"); - break; - default: - ts = new KhoiA("Toan", "Ly", "Hoa"); - break; - } - - ts.nhapThongTin(sc); - themThiSinh(ts); - } - } - - // ham hien thi - public void hienThiDanhSach() { - int n = dsts.size(); - for (int i = 0; i < n; i++) { - System.out.println("Thi sinh thu " + (i + 1) + " la:"); - dsts.get(i).hienThiThongTin(); - } - } - - // tim kiem thi sinh theo so bao danh - public void timKiemThiSinh(int soBaoDanh) { - for (ThiSinh ts : dsts) { - if (ts.getSoBD() == soBaoDanh) { - ts.hienThiThongTin(); - } - } - } -} diff --git a/Bai4/Bai4/src/Testing/Test.java b/Bai4/Bai4/src/Testing/Test.java deleted file mode 100644 index c9f740d..0000000 --- a/Bai4/Bai4/src/Testing/Test.java +++ /dev/null @@ -1,29 +0,0 @@ -package Testing; - -import java.util.Scanner; - -import Class.TuyenSinh; - -public class Test { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - - TuyenSinh dsTuyenSinh = new TuyenSinh(); - - System.out.println("Nhap vao danh sach thi sinh: "); - dsTuyenSinh.nhapDanhSach(sc); - - System.out.println("Danh sach thi sinh du thi la:"); - dsTuyenSinh.hienThiDanhSach(); - - System.out.print("Nhap so bao danh can tim: "); - int soBaoDanh = sc.nextInt(); - sc.nextLine(); - - dsTuyenSinh.timKiemThiSinh(soBaoDanh); - - sc.close(); - } - -} diff --git a/Bai5/Bai5/.classpath b/Bai5/Bai5/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai5/Bai5/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai5/Bai5/.project b/Bai5/Bai5/.project deleted file mode 100644 index d344083..0000000 --- a/Bai5/Bai5/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai5 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272586 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs b/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai5/Bai5/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai5/Bai5/bin/Class/HoDan.class b/Bai5/Bai5/bin/Class/HoDan.class deleted file mode 100644 index 674cc313650e435beede3cf0049b9ccbad0d1931..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2070 zcmbVN%W@l45It9tt%t{tD1Kn%B$E(`BtJxqv5D>2CN?1g#{?uCOu}O<51JwJjF3hN zsbZNQVU-PwKw-Ix6s%aWV8N%brhwBkk}WK+*l2F|?e5#>+;dyM{r%G~0Onvv5mM+| zuNd`u?v}e@I8j8799!jvYb!+SZfm9T3O%$eLm^VJ>z=~Ez0Dxo4_Q*^UA7(DTTuw7 zGusSXclXQ$!WhtyKwlgRLmFa;D-3Shj=9y?-!*GRW4B@|BsblXQQ0NjEPjEc~x3 znQg)GqJ|#y%4$MG6usoea*L)TIJ#O>h&g5Balv*hGH|j{g@jYK%&oFzn^gtPv5acb za-DL~X1UQ;lRmIQ$#5LAwj@2gj4M&R!g?LYJ+6D^zJ@e1yaKnuD;fz-v)$YsvgDB~ z)7W2%VUme)-epy>eKOO~s94H`Z&-K)ulm(z`gUD-2hG2GDKTZ4H<3l0v9n;`Mb%tSuP@#pm2#@Ql)f+Z0&v=mx1dr)b%2y~Xee zCqTS#q=^_lQ;7SHfNsA2OxzC-m~I%|OqXp#-=o+GG>npld*~zIWs{dHV`C_tIXO5I z+$^*wO`_m7Y9;fgEn^|!zxf%tA6(>f3v+gb5t7%(RY=~R|K(KSx0ex|H2l?Qt#M!R zJCHp@e|9MGGr|WL{N9g0BYwZy03sMfKZcN`PYW_|7Q?ip+DNO~H;j|BhO?7X(}x(% zjzkVHo*n5qKRaYX;;kr84~sA2V72Oo0!T@HZjX)_<7^5IG2x|sUzn~6Kmn?PqD~|=UCrKzIBMV zCnBFWkx$-k;=Lw5U_|yu3{E^pc!!)7d}EdsK70~V6ST&^{pVK!8-@@#Pl!N@BYlGO zog?J){Jp^0q$5i(vut{SZ5MGF2E7kxKg1QE5Iul!M93rD#YY4<$LG02vO@TnwfP_Q z7pKNNH>jc({@;mT`1-01|gBv`{Y{k})%FGK0yamU>sb z-|OYUCwbyoKMkMd`}}&r0b%-MUdwe~tY-23W-QGq=5>Li4?8oEC|4P?M>H!w$dKTGX_?NTfWIv^#{w7av>t{ZwJNF+R!}d{ z^pIj<)S*!xi7=*ZJT_Mifjug!5EQ6Sn3g_O%q{BqS#2>(Fp-3v(z0_}-jr)^GvF9z zL7>jVRAw$&IEJ2c5mJM;U5I0IvT&=4gE&OUT3U+HR%W_GsCaBapvsUW1!{L?pwO0~ zE%A$y)KZ4PUN77gGnvvXOV7t8pQCtO!LeO!NG=x~J*VOcw6VHfWJkPKn0EJc-n5*g zlh?IeJcM@2F~vgBo0=Uh*ipldrZuZS8b&9ME9lyib$6hOZk!$V6P%9sEDlX%&=bu@r%dBaIY5RE3`Uyp(m&RlJN0o0`#GckB|V zJR{-~s;S~S!n}xH(k-+s%?nZQn7Ij4&u#50;AUOLN+X)XYB|X|hgVeOT}QFxysqUX z3`a!~H|ZtQ(es*P=jAQ(dgT%y_x9s8xP{vamN@|``M18RcnzZwf8Hp%&2tSESIyL0ZgiudsWw-`5-(Uy~@#p@o~1yoXX75hlV z$C754hm*D&F0p^A;xl~C+J;t`a$)j5akls^`&HuD(Q7vo<1H;WCOfII$DGy2*fOWMVJN*^`lbgU_lzT;9NJVr+f;1>@A=4vM>gZBFa31_z!#e{$|}O=3Dp~MztrLZXCAJhOqB`E|@rb~5t0_RbQntOP`J;Na@! zJ&Df`$@I9Z$$qMI0JUgE1c%5=Vv1srm_~_e0!J{-y?GpSIrNm#ZF5+_0u!Fcd(T*;h>2em?U@k@3KuIOW|beXw<9JRI+lzORA$zD4zrpgQo{Z(riZmIeW z^gSW=2U-FpyfNkP4Xz>D+SMF9Rl+-7RJvjMM}*`7VgYxae)y=_Nf%BZuaZ>1mfgzXbpeu#BO;y7e_>zPgaRpzIw2xWl z@HOs`RtHYI%?$7#t#((4pew{Esy6u{=(aG&Hhx0|ZULLjs#G==%y66iZDGf&A3V;g K-%>aqzWWcO?;FJc diff --git a/Bai5/Bai5/bin/Class/Nguoi.class b/Bai5/Bai5/bin/Class/Nguoi.class deleted file mode 100644 index 230518877bce9ae8faefff21f00ef4aee4814b66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2235 zcmZ`)?N%FA6x}xjCP@d{rhHr4Kx>6Sh_@*_wR`{{O5Nv9NT49BbwB2wd(J-l?0fR}KY#uO;5L3V5K%a{Qny;IY@xR6 zy9S~P7q+dRtZd!#YT0L-+jb>T=ym*(?I|SJx@X0p>3X%CLd>gKdqvlCcr`rV4cvP6 zp%vIXO?WlOF4P>?ZYcEKcRe?FpwKftQ&xzs_*FZB9t@aB;GDwwHP^EXyE~h9vt(`7 zZHeetta{mMy0UM7j0TR|Qs`eh2A!c6rcc9r6VPdknQ|NoLneCBC#w+?24b=rGZ9Ch zg6TO{qvZHrt>lt~;dU6EWwBy;p54remkC@oaODJn#l2Qw@0dtol1cl!v4;QHBh z5*Uz1+uF&+a7|$#USOn@6z2~#PA+(hsdPTsTNBu;1q6|RMGni@mA0*`BHF& z>u2G3vkEaRFsUP-j-8@ND3HaJLZnsU(Xk6h3@aE6BS8$@R~Xm%1jL>#x;u@!Ehnpf zbH@r|pu!T>Y9^o0?C~#w9F|03GqPGXu_B;*8&LXg!MD(<(TMC!MOwPnf$tp57e$3>g zFB!}q(q>(;Aw zGlmV8G5(~ZyfT&&DB~Lw-{LzyT&vNry{bay|I2&YYffDJV8YTm3;Zx-46LvjFPzkp zZDI>G9teA-wrN*R-Ij8uL|y%O*l9XSl2Si6Q5TPq)X=&m>~q+ybR?_uBUK}1>wR}pCxdS;v8Y|w&jjHAijEzXK_Z~74ZziYGe z922|-TtE~_j-aVF!bR@Ebpn?-ii0{WqnroDL3(zdi@ALar!)H)?fM%g7+{E&!|YZg z7{Dk!jA`HL@P6AjJ!#+)Z%{)QB!kl9m=tx0x7v|^;a*Z*c!kT!sRLY3&mJI60J49V zd)emG>A6GPBqI5Gr)zZ#+?3{Lg5wnex=Ls%cF9THz!aO$HQd2<4Kx*o>i}KAUECv> z34&TAya@lhSDJwD^Q+M0jfmYsk~z2=@g%BggCXJch`> zQU;2^z^4X^1_j9FQ~4$NyrYVrX)Xm=C&G*FnEBk5AZ!vA02GU0Z)bx zQ9X6>taJ2VFrVbG8qwCvcqP6j%;ohGB5cx zqKO-z4e)^ST%xyS?J<;BvO`uo^e7g|Ef#VrJqHq_-_2;!v(2{q74i6T`zZCoqfVy}ZQAU=ye zBodYQ06q#a>l6~Cyv%raX3v~CGye7a$4>xH@Ipg|!RR_sEabpaUPG3laK^uI%j0x+ z)IW3Vm|^LakRpD~uuyOG7_tY!siR{7IRlGWVpwep>3m51z7uwN-*XsB?ZD<zy1XF`+u#Z|NxDx*}g?sMP1CsKPf$p97Cak#*=M$8Mlw z136`G8!)j+QR(vG8!p`rw_Vl21ZtKib)cx;F>n_(QZPtJ&?&29>hdqEW!z_|DL6AC zJkt%#Q!Y(AFy$Z#gt@#vArH%%6G;A}JQ)Q^X86*QuJYdj<3fxmFToOyC`cGNa ziDh6f9bqi|L*e*cH;{v_QZCEG0ZpqsXDFm?WK(EPxAg9__i3o6JgXc{S?>f%XghC( z+K-%Cfn7x%n;=zaBY_Nk(LRyY=wy*+-ubA;U~c$MG*oxly6SsoSI6B9)m iT`4VSPC)Sxk0@^iRXnCYiIkxDQ#?yMcutWF_WuAFJ;3h( diff --git a/Bai5/Bai5/src/Class/HoDan.java b/Bai5/Bai5/src/Class/HoDan.java deleted file mode 100644 index e0efa82..0000000 --- a/Bai5/Bai5/src/Class/HoDan.java +++ /dev/null @@ -1,61 +0,0 @@ -package Class; - -import java.util.Date; -import java.util.Scanner; - -public class HoDan extends Nguoi { - // thuoc tinh - private int soNguoi; - private int soNha; - private Nguoi[] list; // list la mang danh sach chua cac thanh vien trong ho - - // phuong thuc - // ham khoi tao khong doi so - public HoDan() { - list = new Nguoi[10]; - } - - // ham khoi tao co doi so - public HoDan(String hoTen, Date ngaySinh, String ngheNghiep, int soNguoi, int soNha) { - super(hoTen, ngaySinh, ngheNghiep); - this.soNguoi = soNguoi; - this.soNha = soNha; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap so nguoi: "); - soNguoi = sc.nextInt(); - sc.nextLine(); - System.out.print("\tNhap so nha: "); - soNha = sc.nextInt(); - sc.nextLine(); - System.out.println("\tNhap thong tin cho tung nguoi trong ho:"); - for (int i = 0; i < soNguoi; i++) { - System.out.println("Nguoi thu " + (i + 1) + " la:"); - list[i] = new Nguoi(); - list[i].nhapThongTin(sc); - } - } - - // hien thi - public void hienThiThongTin() { - System.out.println("\tSo nguoi: " + soNguoi); - System.out.println("\tSo nha: " + soNha); - System.out.println("\tThong tin cua tung nguoi trong gia dinh:"); - for (int i = 0; i < soNguoi; i++) { - System.out.println("Nguoi thu " + (i + 1) + " la:"); - list[i].hienThiThongTin(); - } - } - - // ham lay ra thanh vien trong ho dan - public Nguoi[] getList() { - return list; - } - - // ham lay ra so thanh vien trong ho gia dinh - public int getSoNguoi() { - return soNguoi; - } -} diff --git a/Bai5/Bai5/src/Class/KhuPho.java b/Bai5/Bai5/src/Class/KhuPho.java deleted file mode 100644 index 8cadfa8..0000000 --- a/Bai5/Bai5/src/Class/KhuPho.java +++ /dev/null @@ -1,66 +0,0 @@ -package Class; - -import java.util.ArrayList; -import java.util.Date; -import java.util.Scanner; - -public class KhuPho { - // thuoc tinh - private ArrayList dshd; - - // phuong thuc - // ham khoi tao - public KhuPho() { - dshd = new ArrayList(10); - } - - // ham them 1 ho dan - public void themHoDan(HoDan hoDan) { - dshd.add(hoDan); - } - - // ham nhap vao danh sach ho dan - public void nhapDanhSach(Scanner sc) { - HoDan hoDan; - - System.out.print("Nhap vao so ho dan: "); - int soHoDan = sc.nextInt(); - sc.nextLine(); - - System.out.println("Nhap vao thong tin cho tung ho dan:"); - for (int i = 0; i < soHoDan; i++) { - System.out.println("Ho dan thu " + (i + 1) + " la:"); - hoDan = new HoDan(); - hoDan.nhapThongTin(sc); - themHoDan(hoDan); - } - } - - // ham hien thi danh sach - public void hienThiDanhSach() { - int n = dshd.size(); - - for (int i = 0; i < n; i++) { - System.out.println("Ho dan thu " + (i + 1) + " la:"); - dshd.get(i).hienThiThongTin(); - } - } - - // ham tim kiem thong tin - public void timKiemThongTin() { - // lay ra duoc nam hien tai - Date now = new Date(); - int namHienTai = now.getYear() + 1900; - - Nguoi[] dstv = null; - - for (HoDan hoDan : dshd) { - dstv = hoDan.getList(); - for (int i = 0; i < hoDan.getSoNguoi(); i++) { - if (namHienTai - (dstv[i].getNgaySinh().getYear() + 1900) == 80) { - hoDan.hienThiThongTin(); - } - } - } - } -} diff --git a/Bai5/Bai5/src/Class/Nguoi.java b/Bai5/Bai5/src/Class/Nguoi.java deleted file mode 100644 index cf27dae..0000000 --- a/Bai5/Bai5/src/Class/Nguoi.java +++ /dev/null @@ -1,73 +0,0 @@ -package Class; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Scanner; - -public class Nguoi { - // thuoc tinh - private String hoTen; - private Date ngaySinh; - private String ngheNghiep; - - // phuong thuc - // ham khoi tao khong doi so - public Nguoi() { - - } - - // ham khoi tao co doi so - public Nguoi(String hoTen, Date ngaySinh, String ngheNghiep) { - this.hoTen = hoTen; - this.ngaySinh = ngaySinh; - this.ngheNghiep = ngheNghiep; - } - - // nhap cac thong tung nguoi trong ho gia dinh - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap ho ten: "); - hoTen = sc.nextLine(); - System.out.print("\tNhap ngay sinh: "); - String strDate = sc.nextLine(); - ngaySinh = strToDate(strDate); - System.out.print("\tNhap nghe nghiep: "); - ngheNghiep = sc.nextLine(); - } - - // ham thuc hien chuyen string sang date - private Date strToDate(String strDate) { - Date date = null; - - SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); - - try { - date = sdf.parse(strDate); - } catch (ParseException e) { - System.out.println("Loi dinh dang ngay thang!"); - } - - return date; - } - - // hien thi ra tung nguoi - public void hienThiThongTin() { - System.out.println("\tHo ten: " + hoTen); - System.out.println("\tNgay sinh: " + dateToString(ngaySinh)); - System.out.println("\tNghe nghiep: " + ngheNghiep); - } - - // ham chuyen dinh dang tu date sang String - private String dateToString(Date date) { - SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); - - String strDate = sdf.format(date); - - return strDate; - } - - // ham lay thong tin ve ngay sinh - public Date getNgaySinh() { - return ngaySinh; - } -} diff --git a/Bai5/Bai5/src/Testing/Test.java b/Bai5/Bai5/src/Testing/Test.java deleted file mode 100644 index d765353..0000000 --- a/Bai5/Bai5/src/Testing/Test.java +++ /dev/null @@ -1,20 +0,0 @@ -package Testing; - -import java.util.Scanner; - -import Class.KhuPho; - -public class Test { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - - KhuPho qlkp = new KhuPho(); - - qlkp.nhapDanhSach(sc); - - System.out.println("Danh sach ho dan co nguoi 80 tuoi la:"); - qlkp.timKiemThongTin(); - } - -} diff --git a/Bai6/Bai6/.classpath b/Bai6/Bai6/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai6/Bai6/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai6/Bai6/.project b/Bai6/Bai6/.project deleted file mode 100644 index c3c00cd..0000000 --- a/Bai6/Bai6/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai6 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272597 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs b/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai6/Bai6/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai6/Bai6/bin/Class/KhachSan.class b/Bai6/Bai6/bin/Class/KhachSan.class deleted file mode 100644 index 246c68af5ae725767aa33238c68dbf2544c3e579..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2154 zcmZ`)ZC4vb7`>AOHiU&jkXC4EW3e^?+Vss zswV68^!2JNSBugy5E1CREjMMlCY?(9#>#E0>jHxX{h{I8we%IwlUoJ5?q>zM zigv}3e#5f_PCjiSTg`*Th+nl?PhUGN z7Ee;9U$xe?7^F!8$@VRZd1^rsIAUT1M@e0-u2Pp|tLQexvZ-Z?wnpXlB~b`W;#B3v zv~(zVxhill2-mt6%hGWyk9oTAJYFzxVqZUsTXo-BH*pe4W_KG*5Ol?M)AOF~_(k8d zh|=O{8%~pkqS;K2aa>ZKtAj zIEM=c&I|PKwJD%);ze8(FdXZSpH~p)j}zU{R5Cw$M%s1hbkysDTQnrV&py&`aE&%Q0Rs|~xhYI#vi(eJvs3LxQE8`R-4 zUQ=#5qu#EWcpZ6KQ*LZn4m*2<2Kx`W0FDx0rv(!=Nh+5yt77K_PPLn1N38$FP?7T{ z-qf1-Zfn1R;{Jn4+r)4aJ!)7mv54b=iAqYBlI_HJ29`_=VVJI~m)X@;#(kDzLv{BB zgu@@}6t+N5(U;}5S-BCMjRRHNa!OTu$DhjXWfQAltD?4VdD3@1W!gX(ogyEsXS-2> zZGf(h@0nuftBKoKqhzZ0Pxifa(PUMHw6}v84|Bj|r$~jpVd5h&y-}6*ISoT+@u)@V zjcSR^TbIJL!r3(Ov36m_@~39!^xBq*yK2qkTG5@W$gM!zPfdJ=&jq^q;hHVym9W~j z(?nF!eE1q)@HJL+8(!I(vDFpRqb|-G&EX45ri`4ym-vd$VeV7p+hpw3 RGKz4EzHqO|B8fq|&PSYKAEbplTz(GE&A=LMAts=#|AaJ-#*;MWvV#qXUToNUAKYuR$x^88v( zAzt&GfnMbmM(=sP7v5JG$t>?GM7M%{H;EBUnizwrFj@3`x70bui=WB-eTFQ%H z!9)zBa#}KBATB4%L;^_#)2}Tdq33@3wNwyOQ8F6R+b+0&gH= z;7vjw;_5{^bPr4{!zM35Csdf}1NMUK4tWg8rt2K!;<%wOl_)W$)ebD5g|Na_uwf-} z6K@&FQmfsbwlncI)|g^bT+#PA3<<{DxMScQg^Sw7a0({g#kzvwyFZ2nalzsh#9+fj z4)<7O(MaVKrZdZD$&P~+PxXOI!&ptBY{QCUlkxg;_Q{c0Tt76i1vX4lT<3$1?ghrB zDAKMn(SDR+n5_O}-E;j)-8(9YFkdk77^Z!_f^d3cx<6CxQ;_)z%+t?FdBy1s*|9`-=tGQwMWVXk6rK7>* zCd)ymRdpYEGLYj(-@{E|lU>bz;2$!Ah|CF35t$Obb4Iw2@&$*R>o{+>xGU~4`w$bq z>t`3ZCTRvfh++~Kd6MURgcPQ@i-T#d;^1e7GPqmfz+UNM#$M=R&R*=|vOOQ|V$q(9 zb&)>ty`QBM31G&)NsD9Ktn#i%|> zk}N+Iv((U5%y*^-p%7|Ht_)-5uK7z7@+)#d`Nyf_2h2hn*fOJqS>(_`I)J?BUDPif{UgbPrBnae{i5ctLzo+`uAMafcJ| z4B4Uj?i|;5AL|2LS?+=>COCfOAp&U-=_2VKN$=I>aFIVYjvO1Oe|yDv{aoYk^sCx` D3oBo0 diff --git a/Bai6/Bai6/bin/Class/Nguoi.class b/Bai6/Bai6/bin/Class/Nguoi.class deleted file mode 100644 index b25d26a6c5518599f89000070ba13df16130a801..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2103 zcmZ`)ZBrXn6n-uQHl#~wDK7;}8z@o;fz*~lC0J{DvDhR<6H&ysCD|rR!){DAPWkFT z@K^Z7ajYX@#?JTy{88$2?uM5Dg_*tga?X9ubIy70;h%s1`WwI;d;@I?mzK*`t(M3X z>z-pEq;O@|`q4_1Ew`9>zO!rReT9yam$O}k-qeXL>sKAOm{bV6MQcCnxFuc<>~-HM zCsr)qrZu#j&a5b?b%o9)$94Qi3hk3qn_}?_b_DI{F>wi|LQl$Z?M!`d$FAnAow6MUG;z`*em8?2Vk zn%UM~GK_JB%Uu~pik7^nZ@Y`p2qrLT;EuvIUE|g(CZ-T$A1Z=E*b8!<+KeEMSpzc) zS2e_G&L$GLE4{K``BG+uzR9Wc1qB`6w*T6^Ymrl{=Mp{;Wq?l^;O=k_>M=(gbKPg?X|)Sg&RR87xJWN z6^l50%B2;H4&7Pb%D+rglJWu!e9@{n{RRzeQBEf<4|>y6a%?wOa*niY;A@3J?WNy# z@P41vopQmhhVd;s+x7HVjN4d^U>lZ+9k3ytR;6OQ1%;WnclKS@9+Aul zhVdcm+QwfFnsX8*Fd&eshTLVt=B)f$tkAkoA$F7#Ic{ za9R!Jz%bN+8yHT+(5oB%fMn)z4-0sPho?lAYNn;|1D2Y#OmNi#B!{72Ni0yQNEvjx KNTF5jRr?=g3A8-` diff --git a/Bai6/Bai6/bin/Testing/Test.class b/Bai6/Bai6/bin/Testing/Test.class deleted file mode 100644 index 69991530baf0b373be1a9fcf3fdf783e52fca7a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmZuwYflqF6g^W4+m;ndc`7IiinhEeh!0*xX+0TrpN3^a7q`2$-4gvrew7bx zB8fl1A7wn#qJWT1X7wYC};=>=mo3l+wM_P?HYmt(PMcclaA!s z&cU%|`T`v*wrl$-fwp*JPav4~4y_2<5Z2L-4uS5R?ONNl(t%Ye$OFd`h~+#}I(xEW zEBpK~=ojs(Kv(W^&1L2*N!t||h=0so)Xw`A!dg!3Y3LE?X*z1Y?IiQ2bX}_wMlbp` z^j!g*|628}l8ylk3ItTr{#HucOJ?12&1Y6imX;%k;*!; z=|5T(1xX!`F(;t8))zmkVmaWfh9?4p|4(AQW;=&gC4{G(?&@mFD0uEs6OQ3Xg=ikn z6{9nXokbl>;ABGzbAgaK ds; - - // phuong thuc - // ham khoi tao - public KhachSan() { - ds = new ArrayList(10); - } - - // ham them khach tro vao khach san - public void themKhachTro(KhachTro kt) { - ds.add(kt); - } - - // ham nhap danh sach - public void nhapDanhSach(Scanner sc) { - KhachTro khach; - - System.out.print("Nhap vao so luong khach: "); - int n = sc.nextInt(); - sc.nextLine(); - - System.out.println("Nhap vao thong tin khach tro:"); - for (int i = 0; i < n; i++) { - System.out.println("Khach tro thu " + (i + 1) + " la:"); - khach = new KhachTro(); - khach.nhapThongTin(sc); - themKhachTro(khach); - } - } - - // ham hien thi - public void hienThiDanhSach() { - for (KhachTro khach : ds) { - khach.hienThiThongTin(); - } - } - - // ham tinh tien - public double tinhTien(int CMND) { - double tien = 0; - - for (KhachTro khach : ds) { - if (khach.getCMND() == CMND) { - tien = khach.getSoNgayTro() * khach.getGiaPhong(); - } - } - - return tien; - } -} diff --git a/Bai6/Bai6/src/Class/KhachTro.java b/Bai6/Bai6/src/Class/KhachTro.java deleted file mode 100644 index d49a4a0..0000000 --- a/Bai6/Bai6/src/Class/KhachTro.java +++ /dev/null @@ -1,58 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class KhachTro extends Nguoi { - // thuoc tinh - private int soNgayTro; - private String loaiPhong; - private double giaPhong; - - // phuong thuc - // ham khoi tao khong doi so - public KhachTro() { - - } - - // ham khoi tao co doi so - public KhachTro(String hoTen, int CMND, int soNgayTro, String loaiPhong, double giaPhong) { - this.hoTen = hoTen; - this.CMND = CMND; - this.soNgayTro = soNgayTro; - this.loaiPhong = loaiPhong; - this.giaPhong = giaPhong; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - - System.out.print("\tNhap so ngay tro: "); - soNgayTro = sc.nextInt(); - sc.nextLine(); - System.out.print("\tNhap loai phong: "); - loaiPhong = sc.nextLine(); - System.out.print("\tNhap gia phong: "); - giaPhong = sc.nextDouble(); - sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - - System.out.println("\tSo ngay tro: " + soNgayTro); - System.out.println("\tLoai phong: " + loaiPhong); - System.out.println("\tGia phong: " + giaPhong); - } - - // ham lay ra thong tin so ngay tro - public int getSoNgayTro() { - return soNgayTro; - } - - // ham lay thong tin gia phong - public double getGiaPhong() { - return giaPhong; - } -} diff --git a/Bai6/Bai6/src/Class/Nguoi.java b/Bai6/Bai6/src/Class/Nguoi.java deleted file mode 100644 index ce4cf62..0000000 --- a/Bai6/Bai6/src/Class/Nguoi.java +++ /dev/null @@ -1,62 +0,0 @@ -package Class; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Scanner; - -public class Nguoi { - // thuoc tinh - protected String hoTen; - protected Date ngaySinh; - protected int CMND; - - // phuong thuc - // ham khoi tao khong doi so - public Nguoi() { - - } - - // ham khoi tao co doi so - public Nguoi(String hoTen, Date ngaySinh, int CMND) { - this.hoTen = hoTen; - this.ngaySinh = ngaySinh; - this.CMND = CMND; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap ho ten: "); - hoTen = sc.nextLine(); - System.out.print("\tNhap ngay sinh: "); - String strDate = sc.nextLine(); - ngaySinh = strToDate(strDate); - System.out.print("\tNhap CMND: "); - CMND = sc.nextInt(); - } - - private Date strToDate(String strDate) { - Date date = null; - SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); - - try { - date = sdf.parse(strDate); - } catch (ParseException e) { - System.out.println("Loi dinh dang ngay thang!"); - } - - return date; - } - - // ham hien thi - public void hienThiThongTin() { - System.out.println("\tHo ten: " + hoTen); - System.out.println("\tNgay sinh: " + ngaySinh); - System.out.println("\tCMND: " + CMND); - } - - // ham lay ra thong tin CMND - public int getCMND() { - return CMND; - } -} diff --git a/Bai6/Bai6/src/Testing/Test.java b/Bai6/Bai6/src/Testing/Test.java deleted file mode 100644 index e9d494d..0000000 --- a/Bai6/Bai6/src/Testing/Test.java +++ /dev/null @@ -1,24 +0,0 @@ -package Testing; - -import java.util.Scanner; - -import Class.KhachSan; - -public class Test { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - - KhachSan ql = new KhachSan(); - - ql.nhapDanhSach(sc); - - System.out.print("Nhap vao khach tro can tinh tien: "); - int cmnd = sc.nextInt(); - - System.out.println("==> Tong tien la: " + ql.tinhTien(cmnd)); - - sc.close(); - } - -} diff --git a/Bai7/Bai7/.classpath b/Bai7/Bai7/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai7/Bai7/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai7/Bai7/.project b/Bai7/Bai7/.project deleted file mode 100644 index 35ffd2f..0000000 --- a/Bai7/Bai7/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai7 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272605 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs b/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai7/Bai7/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai7/Bai7/bin/Class/HocSinh.class b/Bai7/Bai7/bin/Class/HocSinh.class deleted file mode 100644 index 5f2738ff4796676658cfba07824b3d3130b6d767..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1524 zcmbVMU2hXd6g}fOUfWC(u)!pzPzNZ)>m+U=q-_kLC44p^1Z*PlxHv2Cg0pMc>#BL{ zQy=t!h2$`a!Fvkb3Kde5f$__Q0&E+kW6j z>wL6O-c?9$gnMol6PVJ-AgeI5zF)s;5nU!7Y40{ zA1D-twEB_XuGX7Q5V+l1c~>$oX6Y| zt2>l9qR_6hUrS?wMagV4W{JgED`jD0(LzNbZ{R-l*I2?bbLt2LF+Zc3aQhlJEPSJI z#z2fy*SLulg>>Nl5=p_R(?a>A%xSDLpO}^?Q}V**S}Be16sCvPgV?5!=&?)kF~)c( z)^x`6-Js$5ALSI)?r7AIwQ!dO857L(-Mzlw-gCQY{Ky8(Y{h!4V?$bOIg52X(0GVP zymUGpH`r5H`kVqM@)_dR1mcOtPey_$jGJ8)-_m$0!dgbyc96z1Da+dzH2naxqw zsg@g&phC7D_Pb5@p)W13*+MdF%aR%9*=iG<#|b2)^SDb$- zk&Sq*+La@G`4{GM*9R!ul>w?GCFfhm=UF*_dwd>adYRb31xCF{6)urSiMx3Y*AB-{{CX--6Fckd8 N*yG93 z$5Id!IKOZFWTfkcT}?mR+c(RuK&a*vO;P`&Sz9`d?QJxtEfS>&1g12EFe-P`8We=(ZdOACqXL>; zGaAL3V^@n7i->j8cqJCfhHab8jEpjmD+(?Tu~#^3x#oce9dQ=zv`OTY55aQM+horr zho*6m3FBRXiAbKA^qQl)roFDKxQh1_TobtHaX###VF?NLr6Hp*>>0%;N-CC-Qm`U$ z!3!~nS;H#QvUlc7SMn|}xs*7~PZ;mh+eaqbthd-_2~OaqMhSf&5NWy1q9eO4uy_`Z zx4RI=8fo%lQXKjVs$*Rj2(-#9cEI|CUW$l0WCjKI1m?VATmnxQtb<0~ls8*W^T2S! zpuE&dC6&vi4*5?-1`njX5_0!Y!-hm0Y8cIy8O9@aIqO(@g*E9F>RtCrbZgwkCI6pj zcr0mFJeuo#FP{p`^wV$4IFDYI&4z0^6i2Y)u`trA{3vkAujEXe)TgUwD?KuD!;k=t2jJ$>k1`1R&4Xd6vgqGP!b$ z8$=|3z1_DO0Jq@rGtcj30@4XB&Y8G?Ygpu{xr*D|NfLBFT@UCQ?%*!L%oEf);RX1g zbEOOKH(JZ0<0AJ4nce7z$GD$Q5!1)HUopNOlz28f*jjnzIYi0M6S_$D=e$NG7;c#y zuafgLIlGQ4Y?lOb%MaWG68F+`4AJ5#%LveG3R&bBZ<^;ko{{5idd?#7uWSQFpkPNq zLE&)W_KEzv@p(@bKhs<`AWM*MP}+@td5o`;e_*nMuRHjjs825T{EJuzmEnu3e=*bZ z=!+rhHT(|2+{Fz-e@YB}k!5=#vskt-GPz1TA!3+$#f`7hQSZn51J0qI^FE%R;T(J0 MdGk!?x|ibMKd^?qYXATM diff --git a/Bai7/Bai7/bin/Class/QLHS.class b/Bai7/Bai7/bin/Class/QLHS.class deleted file mode 100644 index 3e2954f68e4ba07855170b9a16000f60150b3109..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2517 zcmZ`*TUQfT6#h;Um=Fe#Ab26#RI3f)<`tDh1f`bL5TrpY_T~_#%xIXw$;67i+S>cQ z4_&K$s!u-m7FO$8U48bcf1zvjZ?yJ1lYs=Z4>>t!pL6#9_P4)%lKcPu_B((h_*y|g zAabUtl}dxt*@?V@kieEJ+I4NPs9B4HQ}b8!f-4YOC>bSz&aAgpcFp48nB!;*l7AX-#3A)=s7 zpyLtYB4|asJQC%dM5br92?ASHG@wzSEo)kOuDmp_J2TpRk#M3}yPy?kHOG`|-xzWY zlj*2FDw(+iqJ&9ZbSC9`<~`xWflP=@?U$<>!sJc$Iu+htb7FNJ9jo_9>k z&AX1SEv3Rp3dC{@6~C_8@sb@cmThY>ZrFu*iNp`bBk03`g8nsfH#$%;hywx*%hKnj z92vs276~zeLpY+~ut0mQK7Ix&j$%kavGf~mM!H~eGhrMT=<`syhJ@pqR=i-?>#*Xk zBh3q>Cte~y!xH7Nij)MScwmZ_f|CNL!MxejG=4*WXuMc@Mt6~y4 zfv{^=&r_?3hr^~6oEK=>&?FH|p+ydP6*JgFxk?GmNCIa}D?-)Js@Q>@lw7I6a@O_T znw$iL#ZQJGlkW4bR=7GzAJx`qGfdr@G0ZhpN{zp);<7AYsAS$`H@0G4MFC_hxTt%A z*uYu!c}Pi+uc%l=gv$4wuHmG`HJ8qr`clo(mB>6qny0H)TvbuT68SP+-O*gzk&WW> z<#kHNx2Kw6p=52<@YE9E@=>>)lZK}#bs!E0sjRomPLUJ*W1@wp7$$k17v)C7xi zjO6XIQ_#oB?Ab$v`Ao+aqTj45zus7!;OiME@;|OsEM3bvfllRa% zwGq0r?DPDjsHFj2udp1Fsqxm8S0_VMPk$-W9M+zyG((5^cV?n`Jv$Rv{t z4yF-iA}xr~whP_ZjS~bkMmT4&7w2f3!9EZAkt(Ql=ofGi&k^z%Z_6YC{GPxZF46yX zz824O7QzdR(Sg7Nx^7S)6h60t^mD|E>ovK`YtaaW;@sWpA+CIi7#IlW5lNAVh zm^&rg{0l+0N%t+bfej?Q1P=HKe8Wr9>42X=?k-~eYw#y~DVR^IcsbL#;lcf@Ms5}E zFeQ^>*ff9ThtW^KvQMhS4y?l+z!wC`pI@~3GLe$lDnT|Q*zzmKn(p1LnR^Y!?1Q@H!A$ZwHZ<+&*JV8 zZwPh1zKjNr@EHb6-JAu&t8pP2#xkEu9qw|_AX$akBMnK0WGfH`!p)T}E~VW_AdOKC zBmW34pZkGbGcbm6hKK?kZ9@t#cOdIwK&Upa6?6>awi17bVItErMG@a+(2Fkj{oKdW zep$yP5^9+;U}BmIkq)o#a_N-0H}4IqbiOk z49ka3D66L9S*9_n07?dzTtI;x6 l*61H7V7#TtZ1dtJcIeFj#b2RFs?wCbi`T6p_b3vNo%Z diff --git a/Bai7/Bai7/src/Class/HocSinh.java b/Bai7/Bai7/src/Class/HocSinh.java deleted file mode 100644 index bb12ffd..0000000 --- a/Bai7/Bai7/src/Class/HocSinh.java +++ /dev/null @@ -1,52 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class HocSinh extends Nguoi { - // thuoc tinh - private String lop; - private String khoHoc; - private String kyHoc; - - // phuong thuc - // ham khoi tao khong doi so - public HocSinh() { - - } - - // ham khoi tao co doi so - public HocSinh(String hoTen, String lop, String khoaHoc, String kyHoc) { - this.hoTen = hoTen; - this.lop = lop; - this.khoHoc = khoaHoc; - this.kyHoc = kyHoc; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - - System.out.print("\tNhap lop: "); - lop = sc.nextLine(); - - System.out.print("\tNhap khoa hoc: "); - khoHoc = sc.nextLine(); - - System.out.print("\tNhap ky hoc: "); - kyHoc = sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - - System.out.println("\tLop: " + lop); - System.out.println("\tKhoa hoc: " + khoHoc); - System.out.println("\tKy hoc: " + kyHoc); - } - - // ham lay ra thong tin ve lop - public String getLop() { - return lop; - } -} diff --git a/Bai7/Bai7/src/Class/Nguoi.java b/Bai7/Bai7/src/Class/Nguoi.java deleted file mode 100644 index d84603f..0000000 --- a/Bai7/Bai7/src/Class/Nguoi.java +++ /dev/null @@ -1,70 +0,0 @@ -package Class; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Scanner; - -public class Nguoi { - // thuoc tinh - protected String hoTen; - protected Date ngaySinh; - protected String queQuan; - - // phuong thuc - // ham khoi tao khong doi so - public Nguoi() { - - } - - // ham khoi tao co doi so - public Nguoi(String hoTen, Date ngaySinh, String queQuan) { - this.hoTen = hoTen; - this.ngaySinh = ngaySinh; - this.queQuan = queQuan; - } - - // ham nhap vao thong tin - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap ho ten: "); - hoTen = sc.nextLine(); - - System.out.print("\tNhap ngay sinh: "); - String strDate = sc.nextLine(); - ngaySinh = strToDate(strDate); - - System.out.print("\tNhap que quan: "); - queQuan = sc.nextLine(); - } - - private Date strToDate(String strDate) { - Date date = null; - - SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); - - try { - date = sdf.parse(strDate); - } catch (ParseException e) { - System.out.println("Loi dinh dang ngay thang!"); - } - - return date; - } - - // ham hien thi - public void hienThiThongTin() { - System.out.println("\tHo ten: " + hoTen); - System.out.println("\tNgay sinh: " + ngaySinh); - System.out.println("\tQue quan: " + queQuan); - } - - // ham lay ra que quan - public String getQueQuan() { - return queQuan; - } - - // ham lay ra thong tin ve ngay sinh - public Date getNgaySinh() { - return ngaySinh; - } -} diff --git a/Bai7/Bai7/src/Class/QLHS.java b/Bai7/Bai7/src/Class/QLHS.java deleted file mode 100644 index 95a4c52..0000000 --- a/Bai7/Bai7/src/Class/QLHS.java +++ /dev/null @@ -1,64 +0,0 @@ -package Class; - -import java.util.ArrayList; -import java.util.Scanner; - -public class QLHS { - // thuoc tinh - private ArrayList dshs; - - // phuong thuc - // ham khoi tao - public QLHS() { - dshs = new ArrayList(10); - } - - // ham them hoc sinh - public void themHS(HocSinh hs) { - dshs.add(hs); - } - - // ham nhap danh sach - public void nhapDanhSachHS(Scanner sc) { - HocSinh hs; - - System.out.print("Nhap vao so luong hoc sinh: "); - int n = sc.nextInt(); - - System.out.println("Nhap thong tin cho hoc sinh trong danh sach:"); - for (int i = 0; i < n; i++) { - System.out.println("\tHoc sinh thu " + (i + 1) + " la:"); - - hs = new HocSinh(); - hs.nhapThongTin(sc); - - themHS(hs); - } - } - - // ham hien thi - public void hienThiDanhSach() { - int n = dshs.size(); - for (int i = 0; i < n; i++) { - System.out.println("\tHoc sinh thu " + (i + 1) + " la:"); - dshs.get(i).hienThiThongTin(); - } - } - - // ham tim kiem thong tin - public void timKiemThongTin(int nam, String que) { - for (HocSinh hs : dshs) { - if ((hs.getNgaySinh().getYear() + 1900 == nam) && (que.equals(hs.getQueQuan()))) { - hs.hienThiThongTin(); - } - } - } - - public void timKiemThongTin(String lop) { - for (HocSinh hs : dshs) { - if (lop.equals(hs.getLop())) { - hs.hienThiThongTin(); - } - } - } -} diff --git a/Bai7/Bai7/src/Testing/Test.java b/Bai7/Bai7/src/Testing/Test.java deleted file mode 100644 index 1f5515e..0000000 --- a/Bai7/Bai7/src/Testing/Test.java +++ /dev/null @@ -1,25 +0,0 @@ -package Testing; - -import java.util.Scanner; - -import Class.QLHS; - -public class Test { - - public static void main(String[] args) { - Scanner sc=new Scanner(System.in); - - QLHS list=new QLHS(); - - list.nhapDanhSachHS(sc); - - System.out.print("Nhung hoc sinh sinh nam 1985 va que Thai Nguyen la:"); - list.timKiemThongTin(1985, "Thai Nguyen"); - - System.out.println("Nhung hoc sinh hoc lop 10A1 la:"); - list.timKiemThongTin("10A1"); - - sc.close(); - } - -} diff --git a/Bai8/Bai8/.classpath b/Bai8/Bai8/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai8/Bai8/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai8/Bai8/.project b/Bai8/Bai8/.project deleted file mode 100644 index 1279f85..0000000 --- a/Bai8/Bai8/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai8 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272615 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs b/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai8/Bai8/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai8/Bai8/bin/Class/CBGV.class b/Bai8/Bai8/bin/Class/CBGV.class deleted file mode 100644 index c4179f3f7f9e612afcfedb2b49396cb016836029..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1419 zcmZuwYg5xe6g^v@O-evS9zIa3qLvn@f{L_0kXC$EL|cn|3? z4J0uvaExKrX1Kp=wW{W>YYB{({krMa%$6h1UE^S2J8c1@+y__S(X-8F)n@&w;|WZq z%WuthW-bgIH&>~fo@ccRb2V9R%D@Rs=s1bf37irbQ-QAOHFA{??ZDbMa0W9(>4$7$ zGRoulxviGt1(l#>nfnC|=ZH?MhCh9!Z~sEJ6rd`f1zVIYCHhFfGc@=84;-)#dL;xa04Ku264)~>VL|FBI# zZO8Jew)0mO$^Lx<_jA6zbJS}q<+=ns;82PNij&V)$Ixxy~WBkBS6@=p$=ZT_Vf~!n$ zz;ZHnJCi-YE3*78*SV}TzG1Zw zX-SovV7V!bU>cM1mGQgCCzZhr=kgp@a31$be~GW5hFJxDDuUOAPM|2@4#5jKEZrtP zvQgQfLl*84?hmZ(jISS{B=K~x(ZSOWp8s`hMULeoj#rUm<%pviIaYg)ep{!NC}{%7 y;4HGZg?Wz70&FZEV&3U7Ut?Uve2$Gp(tXA1C!&u*N*7ngr9+p8dY89V)SEwx0UP=N diff --git a/Bai8/Bai8/bin/Class/Nguoi.class b/Bai8/Bai8/bin/Class/Nguoi.class deleted file mode 100644 index 1aefa9149b0411bf3a2dc129ce8e1230f5c6ecfc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1368 zcma)5ZBNrs6n-unv@1nmZ-Bg5RB$UV14NV!Q9%)9nUXC_{8&b_mXvmEt&tCY@gHeq zB%1gG{87ep+p!JD2eV}No}PQ3^E}Tv_xGP4zW}TwFQAWMaM#irjZC5HIi`Rx!^nyD zQOj7GUCq2ZI?*dGL%-pabekcX@8pVZ-L$JY2GOo+=S9;t7=$xVKlC&@Ik08grn}7$ zN~OyT;a%rgmk`2`j0hx#;k;?<1@H7oua~qVOXt{5MYGCU-Q;oWW7sv!2E$OkizJoY zO!X4^pD*ch1PpN*{TSf8qzob0jmr=*z#!X(Rx25fT`id;BiSnCxu%sVRy5nz>p6}x zg&6_U*UT!OH(dQx#vLdm+wsV^L_o@PGVjSOmn_q@)0~LA47VZ$s-zf>;_7x*k#HaL z0_GTEzQxzC$asJhwV}pQ2=)f~>9PbBivkuHMtz8G&N7y;%v+^@a=G(lLMq+sn1~g+ z9WdivRT|XRtRiBKlm?%v!^#=8I7=e?8WrLjz;sum4hHhzwN~aa(qrw5;pKu#x|bOL}|5}ZXYu&-K4%pOA9*3AzsMX@#VWtFtyz6 zmoi>)Qw85t%NFsP+8-%&%YH-8BXZcKSSmVRy`t}#d}1a4%`9_Kn5Ah7(W?p}%!iA1 zVLn>^N`vLEq!ALG8>HwVt&G-w^%C+|+VtTT{Y$h0Lv(qVet;Yt!U#qw;s8chcbu&5QH diff --git a/Bai8/Bai8/bin/Class/QuanLy.class b/Bai8/Bai8/bin/Class/QuanLy.class deleted file mode 100644 index 4e559c059ec46151a079b738c9b4fe0d2835d2a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2041 zcmZ`(TUQ%Z7~Llc9Tca#8lOIge1bN_|!`WM7~CKD2BeaOk2%eTM%?Qfs+K2TWBuJ!aGv8QRroF0R1lLGd&*i8@v{q)5Mv2(IKucD)mTYR;48W;X(2rJhtB}&O z1%ZA)+7mLx5X*29vX~d~vVxZ`H6V3Tc8!vTn}{;GU12Z$HkfvN%P}oCY9)AH+%hIg?> z59&uphQ(%HrIY@{$H$_q>-1WrsFTMcHe~Fkz+`j(>-zjJhK$_OaL<#$wQJ`Uqy*H) zy-=}@4mqSX?Ba%RnwjlQR05JS9+xp(eKtVyCx2nOWBUHK_l240}9K|Y2| zBwrE!E1U(;${8OvNZs4HvVsu5fbiHUw6QaE?scoD=>7%0KYHi;ICgqS8c%khhqHdJ zX|*T};Car3Y@m<0#4G`>sbfE*cf5+>-3F5C?Sz@X*F)*Ao%B%{gX@S8N09#wAMbDG zZ6V(NPZ$lysu(BctpyIR@5+@#6>kM+Lys}b*%=o1!b_)E=?jJKSFsv?uZm<9cX{Rv z+k2R7qeAT29Gc|S>HSA*_ACmhj5o9$1{%_zTe9Rmpn8zpl3gJ^m_9Af311$=K!UshN z$PxE1n)3x`vWcTo$}04Y$LN{(73}pN*iN#LL(X_JzB~V`QA3#MK$P{w*p(>RjyGvN z>htX5DTm30$D~IxX-AMu=#vK^Wq~qWj?yHL{1(K09&?m?cra9FvN>5r<>t5FL*d7v zT=zKr+2GXgX%uJfY395|<>J(O#^V+7N|bxjN#M>2WZ?rOAsGfehGEH&79_)9jp6{$ Ke97|xeDyELx~3ig diff --git a/Bai8/Bai8/bin/Testing/Test.class b/Bai8/Bai8/bin/Testing/Test.class deleted file mode 100644 index a72e60052591cf5ba170c9f909d75da58c0f7eb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 916 zcmZuvYikox5Ir|dvdwl)^J-14)~&B5P0aeJTAMaSS_E-@krF6^aI-GSmVLy12>mAF zAF>}3u;35yM~QPc)kMgbJ3Dvoo;l~t{QCXlCx9*NOGq#%M`jROZch_YLXshO!asA( z=5+U_dtw?PLweV8t+2%~SE+Uwk_X;LQ^p)J3Q|ZjEb5kPzK)!(=^yc~Z88*e&){~4 z`oBO%X_j|)*~*;?D+u50=k6tN_s z^dI5&X%L!@f@NH0NC?oSF{I^bFWf;C5~|6ari>g`1oh=2@Km=SxjmKSs$EYtJk^do%3FKtwo2xhk!tfD8CBFIY%&yMi%94cq=Gu`GDri_ z#TIs4FpS6h&*Jp658uAfQb1_Cuiyb5(odn~ytGV*=2JPWc7$b*6g(F5P8qfr(3F$h z@6kYuGv-G22L_d97(%5_wpfE{YiSMSwio$^`P>oz?pm>S046<0H8}aj3f)t?jbL5WCP#B@CpJVlSgln(r zwISBdaHDW%h)TVL#t`@DYHQMCEyj?kheET>qD ds; - - // phuong thuc - // ham khoi tao - public QuanLy() { - ds = new ArrayList(10); - } - - // ham them can bo vao danh sach - public void themCBGV(CBGV canBo) { - ds.add(canBo); - } - - // ham nhap vao danh sach - public void nhapDanhSach(Scanner sc) { - CBGV canBo; - - System.out.print("Nhap vao so luong can bo: "); - int n = sc.nextInt(); - sc.nextLine(); - - System.out.println("Nhap vao danh sach:"); - for (int i = 0; i < n; i++) { - System.out.println("Can bo thu " + (i + 1) + " la:"); - canBo = new CBGV(); - canBo.nhapThongTin(sc); - themCBGV(canBo); - } - } - - // ham hien thi danh sach - public void hienThiDanhSach() { - for (CBGV cb : ds) { - cb.hienThiThongTin(); - } - } - - // ham tim kiem - public void timKiem(double luong) { - for (CBGV cb : ds) { - if (cb.getLuongThucLinh() >= luong) { - cb.hienThiThongTin(); - } - } - } -} diff --git a/Bai8/Bai8/src/Testing/Test.java b/Bai8/Bai8/src/Testing/Test.java deleted file mode 100644 index c5c796d..0000000 --- a/Bai8/Bai8/src/Testing/Test.java +++ /dev/null @@ -1,22 +0,0 @@ -package Testing; - -import java.util.Scanner; - -import Class.QuanLy; - -public class Test { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - - QuanLy ql = new QuanLy(); - - ql.nhapDanhSach(sc); - - System.out.println("Danh sach nhung can bo co luong >= 8 trieu la:"); - ql.timKiem(8000000); - - sc.close(); - } - -} diff --git a/Bai9/Bai9/.classpath b/Bai9/Bai9/.classpath deleted file mode 100644 index 51a8bba..0000000 --- a/Bai9/Bai9/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/Bai9/Bai9/.project b/Bai9/Bai9/.project deleted file mode 100644 index b972449..0000000 --- a/Bai9/Bai9/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Bai9 - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - - - 1671125272630 - - 30 - - org.eclipse.core.resources.regexFilterMatcher - node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ - - - - diff --git a/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs b/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index ec1937b..0000000 --- a/Bai9/Bai9/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Bai9/Bai9/bin/Class/QuanLy.class b/Bai9/Bai9/bin/Class/QuanLy.class deleted file mode 100644 index 3c303c46c1414123d80ffe21fd0efd445bf61d0d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1988 zcmZ`(U0WMP7(J7OZV1a)5NZpQShXf8kX8|uAW}dqHldV65d7+pY_m&~4Q@7A{JQd2 zc%xqR+OO~^&*S5Dul*bT1@X*gLjdc|?9A-E=RN1V@63~be*Xi&6u#CF5YQLPvQ|so zt4lj`pdlpCw=4H$sx0kN>h8|2QE&wU#hSoi#`{rst#ay??zE1GMU1%OQaaV%b3#e zia>w6QoaHmuVR`$*v2DwMM1F4D=Of19dBSpAgunVda-=*#3>hj_%LQk?L-vMP2}VB&Nmv>f_h3>CSiR zZid!h9Ts-!nyUHvdN-e#v{G5tQ32U@mJIi{v`I!?!_(=Oq-*f#9vlsy@(Q<8sXsbu zUehsLEfr*4$37ywhQ832cZ%*K9S8WFU1ZAIs>h5?%F7$%EfI+1s&%JeEL-Xw>1sX_ zlPVvcqwhh!pmbfmJN#-~1rSDvbG}|2ySTIDt$}Fr5PI?mJzIT|L-hTMfgio|gB*K2 zB%LR_(a+To_jJZH3K#J#zd{w*M_gc*0QVxvUoddJf#Jw_K6tno4vk*REXq>w| z^_jr8$A7i84S77{)S18plDLUDW;jzCnsrF~8U`_fFGx&yEGH2>rY%9TWDh+6j%k8g SX;}By!Bc;E>PsR9@YTO{53)i4 diff --git a/Bai9/Bai9/bin/Class/SinhVien.class b/Bai9/Bai9/bin/Class/SinhVien.class deleted file mode 100644 index 3abe5550f1e33e043ee8328968abad25f5078bb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1526 zcmbVL*-{!&5It8>mQ2(rB9e_P8Wxqrm`$>{WEaf>MO7Y0yd`773E#dT@Ay6^XE`3g9pZWsH3~YWuI~w)@vb=*%T#2bQDPAub}t3C zbhJ#YLfJaf*N=zn#>t^uYg&~ZSr3526%4-Y2$aQ&nyqvQS*#gY$5T$BS*uBVM_~Rm zN%{(GLuVDla|185Ca&WRyK2EJ1Fx0Reyw!H4j{*w2yXROyv0I-nHpUNpsvqGT#_1`53H~a8PkcE<8&d$O^dZ8jxkE%!^M{D0rhSKqbx~uQ zzywjl+=@x!M~E|pX+(9FB@d~cg_yb&l{uz1OLK~;&C;dD)MgP&-~ukT*?i_3#eDS} zE{$JrVK$X+fqcTsU+nr37`(gai4?IbIN4SO67M`{6@+h$31)_a{O)n7X m3%v0Hu}+|?eMD=Urq**<JSUBSV diff --git a/Bai9/Bai9/bin/Class/TheMuon.class b/Bai9/Bai9/bin/Class/TheMuon.class deleted file mode 100644 index 131a56f3ff254668f95dd17fd7b41e95444399ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2328 zcmaJ?YgZFj6x}xlXA%b=5dq^XSRWw}gNWLK^@UKV1Zk6E?R!Y3$!Ic@CKD@t_t*HX z%XVp4tFG0x`n5l*?LKz`1hM7A+|6F_Bs6Z_wRoIn8MEnA`1PpHM`Zy6{}9Z z?Ry5I3j4#K3a(dObsbM(Z_AfU1+}PPdKG&;JRV$nXg{`d?ZB<&?%07dL({756`Qv9 zS#X`ULLxM(*E3zN8{V0g}xU{N4gkVSF0Y~c#7O1XI>)le8nkM2&Q ziMNOwk``rb(N>tTa1C!O#9BeK=!-xU&b*FcPgb>zOx#e2U%HsRIGLTCn4FN3+_DgZ zX=1iFMO7*+OwpW$dC7#KGf`u)BCQg0)&sp+Fok_2w7jL_c=trv8dy?D>LdjWJ6CY) zjhZ8z=KW^f4oobQSh<|d=dFo)@%A(V)K& z*ri8#YFV1cz~?&!s=LwvyLSJ!K*D+*V2ZtB)!l3Y(R$g!8u|^8*pRmGk=yOITPr(F z6IDJDEBL8~)M!f-4p!oD@W?_9b&dhM(Qv#n157XO)>ap5Mm&5A4K2sOXSZ;Om}s&; zV^YQ*^gw_)bh5oNySMhxDFrkC{eX$DS=QKs?WKaIJ)JVKE@!ge6qti=1^K&IkV7i} zgG}*PoPfZ3CMGr;sCQz<3x2yjN&dL6H2da2EB4l zaotNx4o-ge^K^-;;@X$lz=2=2*&%-8bO#O*?l2PES)mb613U@95q<@rM$0JI0RhMy zdx62s_zMhYvM-R_#v3FlV33wW?9E|%9wk;%V`oDDE;f;L077a&hagM_WXLi=mLDg& zFaOE2yqwRBZQ$f@NF~m7kj{*CaDgniOx>3s-{g;S$Y(O+8<-}y#P#J&Cad>1#o~4c zcf@UK2jxiy37jOE6tgwLfKQX~8Gg^=JkDVPX=ZPfb88HDI9r#H?FlEp6;2-SV1bmy zXOTff=#|8~I-H11y>2+aFdRwJh|0gj-3N*M2JS6qN$b7*Q}je418wb3xmUpTmA2lo!#aBl;%<}mm(;U=u0>c5|s^}pJT9thaGrizIpLg zcrn~TYv;w|@Z#pKiznelvV(6zk8NdzvELwpTU5qvMm~#sEJzh|I`&YxZZ~#?@9{&I dbdGB%{pYy(jO-&inbIF%f?g;4AGOs_{{n<6?JocT diff --git a/Bai9/Bai9/bin/Testing/Test.class b/Bai9/Bai9/bin/Testing/Test.class deleted file mode 100644 index b2afd4551f2713c465d311041c9e5c71da0befa3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 915 zcmZuw*>2N76g`tBb>o^gOIreg;IbxdsM(jM;w2RllG&6fQpMB6jOwWzJ9vrIC%%b3 zBodYQ06q$F$7xBB@-la3?)aR0&$<5n=jSf~&v2k2!(enp6iffuQc**ep>V=S-10cx zee9nICuUeakiLxHFf7#@J%(&M_$qWPA#WguWrlTI`r<<}=!>w+`<`GZ*@45o9uK8D zUtDHmS4IqL_B>~c@CID^3|sXt_Kdp|hg4Rp(bG_5D5i-dmY&sdxbKTFk1{qjZ2VVn z=QN7Nz`z!+GGr9!<`hx});oWg#DpsNprxaLYpVF`43+xACyMw6>C^Uj6j`4W?%St2 zs>rM5mH`vnl=WRcJmkLH;f||1m_p6hNgb$C?-;m?d!%5Hkf5`wK2evKRjuFwLsP+- z5#gDUq}@mg-;6^(y&Cbrbdo@tu}cQ+>u6wC!wy3^6^PoL12oXYLk4ZAI6NiBMSZEc z{{&VISq2^{C#x>ebzOPcQ#a&oqU$O)CE61MPu07e;{_4z%v`(u^ zgC4BXYD^zcyh5iu*04@D>f`SOsX!a&C>))kG(p8aNA+leo9~;uW7N)YyL5kydUK3D zIzOHf)KUPQ2n@1z4HZ(xM3EdWqmGS~*qnmXkM^8MR#C$Xyd>%}4d*MoPCMDBOa`sL Dn2O9k diff --git a/Bai9/Bai9/src/Class/QuanLy.java b/Bai9/Bai9/src/Class/QuanLy.java deleted file mode 100644 index d15ed92..0000000 --- a/Bai9/Bai9/src/Class/QuanLy.java +++ /dev/null @@ -1,46 +0,0 @@ -package Class; - -import java.util.ArrayList; -import java.util.Scanner; - -public class QuanLy { - // thuoc tinh - private ArrayList ds; - - // phuong thuc - // ham khoi tao khong doi so - public QuanLy() { - ds = new ArrayList(10); - } - - // ham them the muon vao danh sach - public void themTheMuon(TheMuon theMuon) { - ds.add(theMuon); - } - - // ham nhap vao danh sach - public void nhapDanhSach(Scanner sc) { - TheMuon theMuon; - - System.out.print("Nhap vao so luong the muon: "); - int n = sc.nextInt(); - sc.nextLine(); - - System.out.println("Nhap vao danh sach:"); - for (int i = 0; i < n; i++) { - System.out.println("The muon thu " + (i + 1) + " la:"); - theMuon = new TheMuon(); - theMuon.nhapThongTin(sc); - themTheMuon(theMuon); - } - } - - // ham hien thi danh sach - public void hienThiDanhSachTraCuoiThang() { - for (TheMuon the : ds) { - if (the.getHanTra().getDate() == 31 || the.getHanTra().getDate() == 30) { - the.hienThiThongTin(); - } - } - } -} diff --git a/Bai9/Bai9/src/Class/SinhVien.java b/Bai9/Bai9/src/Class/SinhVien.java deleted file mode 100644 index 3fdbd60..0000000 --- a/Bai9/Bai9/src/Class/SinhVien.java +++ /dev/null @@ -1,48 +0,0 @@ -package Class; - -import java.util.Scanner; - -public class SinhVien { - // thuoc tinh - protected String hoTen; - protected String maSV; - protected String ngaySinh; - protected String lop; - - // phuong thuc - // ham khoi tao khong doi so - public SinhVien() { - - } - - // ham khoi tao co doi so - public SinhVien(String hoTen, String maSV, String ngaySinh, String lop) { - this.hoTen = hoTen; - this.maSV = maSV; - this.ngaySinh = ngaySinh; - this.lop = lop; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - System.out.print("\tNhap ho ten: "); - hoTen = sc.nextLine(); - - System.out.print("\tNhap ma sinh vien: "); - maSV = sc.nextLine(); - - System.out.print("\tNhap ngay sinh: "); - ngaySinh = sc.nextLine(); - - System.out.print("\tNhap lop: "); - lop = sc.nextLine(); - } - - // ham hien thi - public void hienThiThongTin() { - System.out.println("\tHo ten: " + hoTen); - System.out.println("\tNgay sinh: " + ngaySinh); - System.out.println("\tMa sinh vien: " + maSV); - System.out.println("\tLop: " + lop); - } -} diff --git a/Bai9/Bai9/src/Class/TheMuon.java b/Bai9/Bai9/src/Class/TheMuon.java deleted file mode 100644 index 1ab7820..0000000 --- a/Bai9/Bai9/src/Class/TheMuon.java +++ /dev/null @@ -1,75 +0,0 @@ -package Class; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Scanner; - -public class TheMuon extends SinhVien { - // thuoc tinh - private int soMuon; - private Date ngayMuon; - private Date hanTra; - private String soHieu; - - // phuong thuc - // ham khoi tao khong doi so - public TheMuon() { - - } - - // ham khoi tao co doi so - public TheMuon(int soMuon, Date ngayMuon, String soHieu) { - this.soMuon = soMuon; - this.ngayMuon = ngayMuon; - this.soHieu = soHieu; - } - - // ham nhap - public void nhapThongTin(Scanner sc) { - super.nhapThongTin(sc); - - System.out.print("\tNhap so muon: "); - soMuon = sc.nextInt(); - sc.nextLine(); - - System.out.print("\tNhap ngay muon: "); - String strNgayMuon = sc.nextLine(); - ngayMuon = strToDate(strNgayMuon); - - String strNgayTra = "31-12-2020"; - hanTra = strToDate(strNgayTra); - - System.out.println("\tNhap so hieu: "); - soHieu = sc.nextLine(); - } - - private Date strToDate(String strNgayMuon) { - Date date = null; - - SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); - - try { - date = sdf.parse(strNgayMuon); - } catch (ParseException e) { - System.out.println("Loi dinh dang ngay thang!"); - } - - return date; - } - - // ham hien thi - public void hienThiThongTin() { - super.hienThiThongTin(); - - System.out.println("\tSo phieu muon: " + soMuon); - System.out.println("\tNgay muon: " + ngayMuon); - System.out.println("\tHan tra: " + hanTra); - System.out.println("\tSo hieu: " + soHieu); - } - - // ham lay ra thong tin ve han tra - public Date getHanTra() { - return hanTra; - } -} diff --git a/Bai9/Bai9/src/Testing/Test.java b/Bai9/Bai9/src/Testing/Test.java deleted file mode 100644 index 63eb244..0000000 --- a/Bai9/Bai9/src/Testing/Test.java +++ /dev/null @@ -1,22 +0,0 @@ -package Testing; - -import java.util.Scanner; - -import Class.QuanLy; - -public class Test { - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - - QuanLy ql = new QuanLy(); - - ql.nhapDanhSach(sc); - - System.out.println("Danh sach sinh vien tra sach vao cuoi thang:"); - ql.hienThiDanhSachTraCuoiThang(); - - sc.close(); - } - -} diff --git a/Java/1.6.java b/Java/1.6.java new file mode 100644 index 0000000..15c1f63 --- /dev/null +++ b/Java/1.6.java @@ -0,0 +1,44 @@ +// EX 1.6 Write a program to check whether the sequence of numbers 1, 2, 3 appears in a given array of integers somewhere. +// Write a program to check whether the sequence of numbers 1, 2, 3 appears in a given array of integers somewhere. + +// Example +// Input: +// 5 +// 1 1 2 3 1 +// Output: 1 +// Please note that: +// 5 as array size +// 1 1 2 3 1 as array + +import java.util.Scanner; + +/** + * array2 + */ +public class Main { + public static boolean test(int[] a) { + for (int i = 0; i < a.length-2 ; i++) { + if (a[i] == 1 && a[i + 1] == 2 && a[i + i] == 3) { + return true; + } + } + return false; + } + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int n = sc.nextInt(); + int[] a = new int[n]; + for (int i = 0; i < n; i++) { + a[i] = sc.nextInt(); + } + if (test(a)) { + System.out.print(0); + } else { + System.out.print(1); + } + } +} + + + diff --git a/Java/1.7.java b/Java/1.7.java new file mode 100644 index 0000000..bfef6cd --- /dev/null +++ b/Java/1.7.java @@ -0,0 +1,56 @@ +// EX 1.7 If a number appears three times in a row in an array it is called a triple. Write a program to check if a triple is presents in an array of integers or not. +// If a value appears three times in a row in an array it is called a triple. Write a program to check if a triple is presents in an array of integers or not. + +// Example +// Input: +// 7 +// 1 1 1 2 2 2 1 +// Output: +// 1 + +// Please note that: + +// 7 as array size +// 1 1 1 2 2 2 1 as array +import java.util.Scanner; + +/** + * array2 + */ +public class Main{ + public static boolean test(int[] a, int n) { + for (int i = 0; i < n-1; i++) { + if (a[i] == a[i + 1] && a[i] == a[i + 2] && a[i + 1] == a[i + 2]) { + { + return true; + } + } + } + return false; + +} + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int n = sc.nextInt(); + int[] a = new int[n]; + for (int i = 0; i < n; i++) { + a[i] = sc.nextInt(); + } + + if (test(a, n) == true) { + System.out.print(1); + } else { + System.out.print(0); + } + // for (int i = 0; i < a.length; i++) { + // System.out.print(a[i] + " "); + // } + } +} + + + + + + + diff --git a/Java/1.8.java b/Java/1.8.java new file mode 100644 index 0000000..53dcec5 --- /dev/null +++ b/Java/1.8.java @@ -0,0 +1,52 @@ +// EX 1.8 Write a program to find k largest even number in an array +// Write a program to find k largest even number in an array with size of n. + +// Example +// Input: +// 2 +// 8 +// 4 5 9 12 9 22 45 7 +// Output: +// 22 12 +// Please note that: +// 2 as k +// 8 as n +// 4 5 9 12 9 22 45 7 as array + +import java.util.PriorityQueue; +import java.util.Scanner; + +class GFG { + + static void kLargest(int a[], int l, int k) { + PriorityQueue pq = new PriorityQueue(); + + for (int i = 0; i < l; i++) { + if (a[i] % 2 == 0) { + pq.add(a[i]); + if (pq.size() > k) { + pq.poll(); + } + } + } + while (!pq.isEmpty()) { + System.out.print(pq.peek() + " "); + pq.poll(); + } + System.out.println(); + } + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int k = sc.nextInt(); + int n = sc.nextInt(); + int a[] = new int[n]; + int l = a.length; + for (int i = 0; i < n; i++) { + a[i] = sc.nextInt(); + } + kLargest(a, l, k); + + } +} + From f1f466f4296f96efe1cd08b660de918da1318cb3 Mon Sep 17 00:00:00 2001 From: idiotman-2212 Date: Tue, 24 Oct 2023 20:11:50 +0700 Subject: [PATCH 4/5] update --- Java/1.10 - Copy.java | 81 +++++++++++++++++++++++++++++++++++++++++++ Java/1.10.java | 81 +++++++++++++++++++++++++++++++++++++++++++ Java/1.2 - Copy.java | 26 ++++++++++++++ Java/1.2.java | 26 ++++++++++++++ Java/1.3 - Copy.java | 0 Java/1.3.java | 0 Java/1.4 - Copy.java | 65 ++++++++++++++++++++++++++++++++++ Java/1.4.java | 65 ++++++++++++++++++++++++++++++++++ Java/1.5 - Copy.java | 41 ++++++++++++++++++++++ Java/1.5.java | 41 ++++++++++++++++++++++ Java/1.6 - Copy.java | 44 +++++++++++++++++++++++ Java/1.7 - Copy.java | 56 ++++++++++++++++++++++++++++++ Java/1.8 - Copy.java | 52 +++++++++++++++++++++++++++ Java/1.9 - Copy.java | 57 ++++++++++++++++++++++++++++++ Java/1.9.java | 57 ++++++++++++++++++++++++++++++ 15 files changed, 692 insertions(+) create mode 100644 Java/1.10 - Copy.java create mode 100644 Java/1.10.java create mode 100644 Java/1.2 - Copy.java create mode 100644 Java/1.2.java create mode 100644 Java/1.3 - Copy.java create mode 100644 Java/1.3.java create mode 100644 Java/1.4 - Copy.java create mode 100644 Java/1.4.java create mode 100644 Java/1.5 - Copy.java create mode 100644 Java/1.5.java create mode 100644 Java/1.6 - Copy.java create mode 100644 Java/1.7 - Copy.java create mode 100644 Java/1.8 - Copy.java create mode 100644 Java/1.9 - Copy.java create mode 100644 Java/1.9.java diff --git a/Java/1.10 - Copy.java b/Java/1.10 - Copy.java new file mode 100644 index 0000000..142a762 --- /dev/null +++ b/Java/1.10 - Copy.java @@ -0,0 +1,81 @@ +// EX 1.10 Write a program to get next day of a given date +// Write a program to get next day of a given date. + +// Please don't use any library of Java. + +// Test data 1 +// Input: 2020, 02, 29 +// Output: 2020, 03, 01 +import java.util.Scanner; +public class Main { + public static void main(String[] Strings) { + Scanner scanner = new Scanner(System.in); + String string = scanner.nextLine(); + var year = string.substring(0,4); + int nam = Integer.parseInt(year); + var month = string.substring(6,8); + int thang = Integer.parseInt(month); + var day = string.substring(10,12); + int ngay = Integer.parseInt(day); + boolean nhuan = true; + int i; + if (nam % 400 == 0) { + nhuan = true; + } + else if (nam % 100 == 0) { + nhuan = false; + } + else if (nam % 4 == 0) { + nhuan = true; + } + else { + nhuan = false; + } + + if (thang == 1 || thang == 3 || thang == 5 || thang == 7 || thang == 8 || thang == 10 || thang == 12) { + i = 31; + } + else if (thang == 2) { + if (nhuan) { + i = 29; + } + else { + i = 28; + } + } + else { + i = 30; + } + + if (ngay < i) { + ngay = ngay + 1; + } + else { + ngay = 1; + if (thang == 12) { + thang = 1; + nam = nam + 1; + } + else { + thang = thang + 1; + } + } + System.out.print(nam); + System.out.print(", "); + if (thang < 10) { + System.out.print("0"); + System.out.print(thang); + } + else { + System.out.print(thang); + } + System.out.print(", "); + if (ngay < 10) { + System.out.print("0"); + System.out.print(ngay); + } + else { + System.out.print(ngay); + } + } +} diff --git a/Java/1.10.java b/Java/1.10.java new file mode 100644 index 0000000..142a762 --- /dev/null +++ b/Java/1.10.java @@ -0,0 +1,81 @@ +// EX 1.10 Write a program to get next day of a given date +// Write a program to get next day of a given date. + +// Please don't use any library of Java. + +// Test data 1 +// Input: 2020, 02, 29 +// Output: 2020, 03, 01 +import java.util.Scanner; +public class Main { + public static void main(String[] Strings) { + Scanner scanner = new Scanner(System.in); + String string = scanner.nextLine(); + var year = string.substring(0,4); + int nam = Integer.parseInt(year); + var month = string.substring(6,8); + int thang = Integer.parseInt(month); + var day = string.substring(10,12); + int ngay = Integer.parseInt(day); + boolean nhuan = true; + int i; + if (nam % 400 == 0) { + nhuan = true; + } + else if (nam % 100 == 0) { + nhuan = false; + } + else if (nam % 4 == 0) { + nhuan = true; + } + else { + nhuan = false; + } + + if (thang == 1 || thang == 3 || thang == 5 || thang == 7 || thang == 8 || thang == 10 || thang == 12) { + i = 31; + } + else if (thang == 2) { + if (nhuan) { + i = 29; + } + else { + i = 28; + } + } + else { + i = 30; + } + + if (ngay < i) { + ngay = ngay + 1; + } + else { + ngay = 1; + if (thang == 12) { + thang = 1; + nam = nam + 1; + } + else { + thang = thang + 1; + } + } + System.out.print(nam); + System.out.print(", "); + if (thang < 10) { + System.out.print("0"); + System.out.print(thang); + } + else { + System.out.print(thang); + } + System.out.print(", "); + if (ngay < 10) { + System.out.print("0"); + System.out.print(ngay); + } + else { + System.out.print(ngay); + } + } +} diff --git a/Java/1.2 - Copy.java b/Java/1.2 - Copy.java new file mode 100644 index 0000000..cd849f0 --- /dev/null +++ b/Java/1.2 - Copy.java @@ -0,0 +1,26 @@ +// EX 1.2 Write a program that takes a year from the user and print whether that year is a leap year or not. +// Write a program that takes a year from the user and print whether that year is a leap year or not. +// Test Data + +// Input the year: 2016 + +// Expected Output : True +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + try (Scanner scanner = new Scanner(System.in)) { + int year = scanner.nextInt(); + if ( year % 4 == 0 && year % 100 != 0) { + System.out.print("True"); + } + else if ( year % 400 == 0) { + System.out.print("True"); + } + else { + System.out.print("False"); + } + } + } +} diff --git a/Java/1.2.java b/Java/1.2.java new file mode 100644 index 0000000..cd849f0 --- /dev/null +++ b/Java/1.2.java @@ -0,0 +1,26 @@ +// EX 1.2 Write a program that takes a year from the user and print whether that year is a leap year or not. +// Write a program that takes a year from the user and print whether that year is a leap year or not. +// Test Data + +// Input the year: 2016 + +// Expected Output : True +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + try (Scanner scanner = new Scanner(System.in)) { + int year = scanner.nextInt(); + if ( year % 4 == 0 && year % 100 != 0) { + System.out.print("True"); + } + else if ( year % 400 == 0) { + System.out.print("True"); + } + else { + System.out.print("False"); + } + } + } +} diff --git a/Java/1.3 - Copy.java b/Java/1.3 - Copy.java new file mode 100644 index 0000000..e69de29 diff --git a/Java/1.3.java b/Java/1.3.java new file mode 100644 index 0000000..e69de29 diff --git a/Java/1.4 - Copy.java b/Java/1.4 - Copy.java new file mode 100644 index 0000000..9bdc8d6 --- /dev/null +++ b/Java/1.4 - Copy.java @@ -0,0 +1,65 @@ +// EX 1.4. Write a program which reads a sequence of integers and prints how often each number of this sequence occurs. +// Write a program which reads a sequence of integers and prints how often each number of this sequence occurs. + +// Example + +// Input: + +// 9 + +// 1 3 5 7 5 3 7 2 5 + +// Output: + +// 1(1), 3(2), 5(3), 7(2), 2(1) + + + +// Please note that: + +// 9 as array size + +// 1 3 5 7 5 3 7 2 5 as array +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int a = scanner.nextInt(); + int[] arr = new int[a]; + for (int i = 0; i < a; i++) { + arr[i] = scanner.nextInt(); + } + + boolean check = true; + boolean first = true; + for (int i = 0; i < arr.length; i++) { + check = true; + for (int j = 0; j < i; j++) { + if (arr[i] == arr[j]) { + check = false; + break; + } + } + + if (check == true) { + int sum = 1; + for (int j = i + 1; j < arr.length; j++) { + if (arr[j] == arr[i]) { + sum++; + } + } + if (first == true) { + System.out.print(arr[i] + "(" + sum + ")"); + first = false; + } else { + System.out.print(", " + arr[i] + "(" + sum + ")"); + } + + } + } + + } +} + diff --git a/Java/1.4.java b/Java/1.4.java new file mode 100644 index 0000000..9bdc8d6 --- /dev/null +++ b/Java/1.4.java @@ -0,0 +1,65 @@ +// EX 1.4. Write a program which reads a sequence of integers and prints how often each number of this sequence occurs. +// Write a program which reads a sequence of integers and prints how often each number of this sequence occurs. + +// Example + +// Input: + +// 9 + +// 1 3 5 7 5 3 7 2 5 + +// Output: + +// 1(1), 3(2), 5(3), 7(2), 2(1) + + + +// Please note that: + +// 9 as array size + +// 1 3 5 7 5 3 7 2 5 as array +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int a = scanner.nextInt(); + int[] arr = new int[a]; + for (int i = 0; i < a; i++) { + arr[i] = scanner.nextInt(); + } + + boolean check = true; + boolean first = true; + for (int i = 0; i < arr.length; i++) { + check = true; + for (int j = 0; j < i; j++) { + if (arr[i] == arr[j]) { + check = false; + break; + } + } + + if (check == true) { + int sum = 1; + for (int j = i + 1; j < arr.length; j++) { + if (arr[j] == arr[i]) { + sum++; + } + } + if (first == true) { + System.out.print(arr[i] + "(" + sum + ")"); + first = false; + } else { + System.out.print(", " + arr[i] + "(" + sum + ")"); + } + + } + } + + } +} + diff --git a/Java/1.5 - Copy.java b/Java/1.5 - Copy.java new file mode 100644 index 0000000..1108056 --- /dev/null +++ b/Java/1.5 - Copy.java @@ -0,0 +1,41 @@ +// EX 1.5. Write a program that accept an integer (n) from the user and outputs combinations that express n as a sum of two prime numbers. +// Write a program that accept an integer (n) from the user and outputs combinations that express n as a sum of two prime numbers. + +// Example + +// Input: 10 + +// Output: 7+3, 5+5 +import java.util.Scanner; + +public class Main { + private static boolean isPrime(int a) { + if ( a < 2) { + return false; + } + for ( int i = 2; i < a; i++) { + if ( a % i == 0) { + return false; + } + } + return true; + } + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int a = scanner.nextInt(); + boolean first = true; + for (int i = a -2; i >= a /2; i--) { + if ( isPrime(i) && isPrime(a-i)) { + if ( first == true) { + first = false; + System.out.print( i + "+" + (a - i)); + } + else { + System.out.print( ", " + i + "+" + (a - i)); + } + } + } + } +} + diff --git a/Java/1.5.java b/Java/1.5.java new file mode 100644 index 0000000..1108056 --- /dev/null +++ b/Java/1.5.java @@ -0,0 +1,41 @@ +// EX 1.5. Write a program that accept an integer (n) from the user and outputs combinations that express n as a sum of two prime numbers. +// Write a program that accept an integer (n) from the user and outputs combinations that express n as a sum of two prime numbers. + +// Example + +// Input: 10 + +// Output: 7+3, 5+5 +import java.util.Scanner; + +public class Main { + private static boolean isPrime(int a) { + if ( a < 2) { + return false; + } + for ( int i = 2; i < a; i++) { + if ( a % i == 0) { + return false; + } + } + return true; + } + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int a = scanner.nextInt(); + boolean first = true; + for (int i = a -2; i >= a /2; i--) { + if ( isPrime(i) && isPrime(a-i)) { + if ( first == true) { + first = false; + System.out.print( i + "+" + (a - i)); + } + else { + System.out.print( ", " + i + "+" + (a - i)); + } + } + } + } +} + diff --git a/Java/1.6 - Copy.java b/Java/1.6 - Copy.java new file mode 100644 index 0000000..15c1f63 --- /dev/null +++ b/Java/1.6 - Copy.java @@ -0,0 +1,44 @@ +// EX 1.6 Write a program to check whether the sequence of numbers 1, 2, 3 appears in a given array of integers somewhere. +// Write a program to check whether the sequence of numbers 1, 2, 3 appears in a given array of integers somewhere. + +// Example +// Input: +// 5 +// 1 1 2 3 1 +// Output: 1 +// Please note that: +// 5 as array size +// 1 1 2 3 1 as array + +import java.util.Scanner; + +/** + * array2 + */ +public class Main { + public static boolean test(int[] a) { + for (int i = 0; i < a.length-2 ; i++) { + if (a[i] == 1 && a[i + 1] == 2 && a[i + i] == 3) { + return true; + } + } + return false; + } + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int n = sc.nextInt(); + int[] a = new int[n]; + for (int i = 0; i < n; i++) { + a[i] = sc.nextInt(); + } + if (test(a)) { + System.out.print(0); + } else { + System.out.print(1); + } + } +} + + + diff --git a/Java/1.7 - Copy.java b/Java/1.7 - Copy.java new file mode 100644 index 0000000..bfef6cd --- /dev/null +++ b/Java/1.7 - Copy.java @@ -0,0 +1,56 @@ +// EX 1.7 If a number appears three times in a row in an array it is called a triple. Write a program to check if a triple is presents in an array of integers or not. +// If a value appears three times in a row in an array it is called a triple. Write a program to check if a triple is presents in an array of integers or not. + +// Example +// Input: +// 7 +// 1 1 1 2 2 2 1 +// Output: +// 1 + +// Please note that: + +// 7 as array size +// 1 1 1 2 2 2 1 as array +import java.util.Scanner; + +/** + * array2 + */ +public class Main{ + public static boolean test(int[] a, int n) { + for (int i = 0; i < n-1; i++) { + if (a[i] == a[i + 1] && a[i] == a[i + 2] && a[i + 1] == a[i + 2]) { + { + return true; + } + } + } + return false; + +} + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int n = sc.nextInt(); + int[] a = new int[n]; + for (int i = 0; i < n; i++) { + a[i] = sc.nextInt(); + } + + if (test(a, n) == true) { + System.out.print(1); + } else { + System.out.print(0); + } + // for (int i = 0; i < a.length; i++) { + // System.out.print(a[i] + " "); + // } + } +} + + + + + + + diff --git a/Java/1.8 - Copy.java b/Java/1.8 - Copy.java new file mode 100644 index 0000000..53dcec5 --- /dev/null +++ b/Java/1.8 - Copy.java @@ -0,0 +1,52 @@ +// EX 1.8 Write a program to find k largest even number in an array +// Write a program to find k largest even number in an array with size of n. + +// Example +// Input: +// 2 +// 8 +// 4 5 9 12 9 22 45 7 +// Output: +// 22 12 +// Please note that: +// 2 as k +// 8 as n +// 4 5 9 12 9 22 45 7 as array + +import java.util.PriorityQueue; +import java.util.Scanner; + +class GFG { + + static void kLargest(int a[], int l, int k) { + PriorityQueue pq = new PriorityQueue(); + + for (int i = 0; i < l; i++) { + if (a[i] % 2 == 0) { + pq.add(a[i]); + if (pq.size() > k) { + pq.poll(); + } + } + } + while (!pq.isEmpty()) { + System.out.print(pq.peek() + " "); + pq.poll(); + } + System.out.println(); + } + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int k = sc.nextInt(); + int n = sc.nextInt(); + int a[] = new int[n]; + int l = a.length; + for (int i = 0; i < n; i++) { + a[i] = sc.nextInt(); + } + kLargest(a, l, k); + + } +} + diff --git a/Java/1.9 - Copy.java b/Java/1.9 - Copy.java new file mode 100644 index 0000000..6b03b0d --- /dev/null +++ b/Java/1.9 - Copy.java @@ -0,0 +1,57 @@ +// EX 1.9 Write a program to separate and sort even and odd numbers of an array of integers +// EX 2.8 Write a program to separate and sort even and odd numbers of an array of integers. +// Put all sorted odd numbers first, and then sorted even numbers. +// Example: +// Input: +// 9 +// 0 1 3 4 5 6 7 8 10 +// Output: +// 1 3 5 7 0 4 6 8 10 + +// Please note that: +// 9 as size of array +// 0 1 3 4 5 6 7 8 10 as array + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int n = scanner.nextInt(); + ArrayList oddNumbers = new ArrayList<>(); + ArrayList evenNumbers = new ArrayList<>(); + + for (int i = 0; i < n; i++) { + int temp = 0; + temp = scanner.nextInt(); + if (temp % 2 != 0) { + oddNumbers.add(temp); + } else { + evenNumbers.add(temp); + } + } + Collections.sort(oddNumbers); + Collections.sort(evenNumbers); + + ArrayList numbers = new ArrayList<>(); + for (Integer i : oddNumbers) { + numbers.add(i); + } + for (Integer i : evenNumbers) { + numbers.add(i); + } + boolean first = true; + for (Integer i : numbers) { + if (first) { + first = false; + System.out.print(i); + } else { + System.out.print(" " + i); + } + } + } +} + diff --git a/Java/1.9.java b/Java/1.9.java new file mode 100644 index 0000000..6b03b0d --- /dev/null +++ b/Java/1.9.java @@ -0,0 +1,57 @@ +// EX 1.9 Write a program to separate and sort even and odd numbers of an array of integers +// EX 2.8 Write a program to separate and sort even and odd numbers of an array of integers. +// Put all sorted odd numbers first, and then sorted even numbers. +// Example: +// Input: +// 9 +// 0 1 3 4 5 6 7 8 10 +// Output: +// 1 3 5 7 0 4 6 8 10 + +// Please note that: +// 9 as size of array +// 0 1 3 4 5 6 7 8 10 as array + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int n = scanner.nextInt(); + ArrayList oddNumbers = new ArrayList<>(); + ArrayList evenNumbers = new ArrayList<>(); + + for (int i = 0; i < n; i++) { + int temp = 0; + temp = scanner.nextInt(); + if (temp % 2 != 0) { + oddNumbers.add(temp); + } else { + evenNumbers.add(temp); + } + } + Collections.sort(oddNumbers); + Collections.sort(evenNumbers); + + ArrayList numbers = new ArrayList<>(); + for (Integer i : oddNumbers) { + numbers.add(i); + } + for (Integer i : evenNumbers) { + numbers.add(i); + } + boolean first = true; + for (Integer i : numbers) { + if (first) { + first = false; + System.out.print(i); + } else { + System.out.print(" " + i); + } + } + } +} + From 9eaecad37d4dc48b849e0a37e0548ef4ed0ed0c8 Mon Sep 17 00:00:00 2001 From: idiotman-2212 Date: Tue, 24 Oct 2023 23:35:18 +0700 Subject: [PATCH 5/5] Update --- Java/1.10 - Copy.java | 81 ------------------------------------------- Java/1.2 - Copy.java | 26 -------------- Java/1.3 - Copy.java | 0 Java/1.4 - Copy.java | 65 ---------------------------------- Java/1.5 - Copy.java | 41 ---------------------- Java/1.6 - Copy.java | 44 ----------------------- Java/1.7 - Copy.java | 56 ------------------------------ Java/1.8 - Copy.java | 52 --------------------------- Java/1.9 - Copy.java | 57 ------------------------------ 9 files changed, 422 deletions(-) delete mode 100644 Java/1.10 - Copy.java delete mode 100644 Java/1.2 - Copy.java delete mode 100644 Java/1.3 - Copy.java delete mode 100644 Java/1.4 - Copy.java delete mode 100644 Java/1.5 - Copy.java delete mode 100644 Java/1.6 - Copy.java delete mode 100644 Java/1.7 - Copy.java delete mode 100644 Java/1.8 - Copy.java delete mode 100644 Java/1.9 - Copy.java diff --git a/Java/1.10 - Copy.java b/Java/1.10 - Copy.java deleted file mode 100644 index 142a762..0000000 --- a/Java/1.10 - Copy.java +++ /dev/null @@ -1,81 +0,0 @@ -// EX 1.10 Write a program to get next day of a given date -// Write a program to get next day of a given date. - -// Please don't use any library of Java. - -// Test data 1 -// Input: 2020, 02, 29 -// Output: 2020, 03, 01 -import java.util.Scanner; -public class Main { - public static void main(String[] Strings) { - Scanner scanner = new Scanner(System.in); - String string = scanner.nextLine(); - var year = string.substring(0,4); - int nam = Integer.parseInt(year); - var month = string.substring(6,8); - int thang = Integer.parseInt(month); - var day = string.substring(10,12); - int ngay = Integer.parseInt(day); - boolean nhuan = true; - int i; - if (nam % 400 == 0) { - nhuan = true; - } - else if (nam % 100 == 0) { - nhuan = false; - } - else if (nam % 4 == 0) { - nhuan = true; - } - else { - nhuan = false; - } - - if (thang == 1 || thang == 3 || thang == 5 || thang == 7 || thang == 8 || thang == 10 || thang == 12) { - i = 31; - } - else if (thang == 2) { - if (nhuan) { - i = 29; - } - else { - i = 28; - } - } - else { - i = 30; - } - - if (ngay < i) { - ngay = ngay + 1; - } - else { - ngay = 1; - if (thang == 12) { - thang = 1; - nam = nam + 1; - } - else { - thang = thang + 1; - } - } - System.out.print(nam); - System.out.print(", "); - if (thang < 10) { - System.out.print("0"); - System.out.print(thang); - } - else { - System.out.print(thang); - } - System.out.print(", "); - if (ngay < 10) { - System.out.print("0"); - System.out.print(ngay); - } - else { - System.out.print(ngay); - } - } -} diff --git a/Java/1.2 - Copy.java b/Java/1.2 - Copy.java deleted file mode 100644 index cd849f0..0000000 --- a/Java/1.2 - Copy.java +++ /dev/null @@ -1,26 +0,0 @@ -// EX 1.2 Write a program that takes a year from the user and print whether that year is a leap year or not. -// Write a program that takes a year from the user and print whether that year is a leap year or not. -// Test Data - -// Input the year: 2016 - -// Expected Output : True -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - try (Scanner scanner = new Scanner(System.in)) { - int year = scanner.nextInt(); - if ( year % 4 == 0 && year % 100 != 0) { - System.out.print("True"); - } - else if ( year % 400 == 0) { - System.out.print("True"); - } - else { - System.out.print("False"); - } - } - } -} diff --git a/Java/1.3 - Copy.java b/Java/1.3 - Copy.java deleted file mode 100644 index e69de29..0000000 diff --git a/Java/1.4 - Copy.java b/Java/1.4 - Copy.java deleted file mode 100644 index 9bdc8d6..0000000 --- a/Java/1.4 - Copy.java +++ /dev/null @@ -1,65 +0,0 @@ -// EX 1.4. Write a program which reads a sequence of integers and prints how often each number of this sequence occurs. -// Write a program which reads a sequence of integers and prints how often each number of this sequence occurs. - -// Example - -// Input: - -// 9 - -// 1 3 5 7 5 3 7 2 5 - -// Output: - -// 1(1), 3(2), 5(3), 7(2), 2(1) - - - -// Please note that: - -// 9 as array size - -// 1 3 5 7 5 3 7 2 5 as array -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - int a = scanner.nextInt(); - int[] arr = new int[a]; - for (int i = 0; i < a; i++) { - arr[i] = scanner.nextInt(); - } - - boolean check = true; - boolean first = true; - for (int i = 0; i < arr.length; i++) { - check = true; - for (int j = 0; j < i; j++) { - if (arr[i] == arr[j]) { - check = false; - break; - } - } - - if (check == true) { - int sum = 1; - for (int j = i + 1; j < arr.length; j++) { - if (arr[j] == arr[i]) { - sum++; - } - } - if (first == true) { - System.out.print(arr[i] + "(" + sum + ")"); - first = false; - } else { - System.out.print(", " + arr[i] + "(" + sum + ")"); - } - - } - } - - } -} - diff --git a/Java/1.5 - Copy.java b/Java/1.5 - Copy.java deleted file mode 100644 index 1108056..0000000 --- a/Java/1.5 - Copy.java +++ /dev/null @@ -1,41 +0,0 @@ -// EX 1.5. Write a program that accept an integer (n) from the user and outputs combinations that express n as a sum of two prime numbers. -// Write a program that accept an integer (n) from the user and outputs combinations that express n as a sum of two prime numbers. - -// Example - -// Input: 10 - -// Output: 7+3, 5+5 -import java.util.Scanner; - -public class Main { - private static boolean isPrime(int a) { - if ( a < 2) { - return false; - } - for ( int i = 2; i < a; i++) { - if ( a % i == 0) { - return false; - } - } - return true; - } - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - int a = scanner.nextInt(); - boolean first = true; - for (int i = a -2; i >= a /2; i--) { - if ( isPrime(i) && isPrime(a-i)) { - if ( first == true) { - first = false; - System.out.print( i + "+" + (a - i)); - } - else { - System.out.print( ", " + i + "+" + (a - i)); - } - } - } - } -} - diff --git a/Java/1.6 - Copy.java b/Java/1.6 - Copy.java deleted file mode 100644 index 15c1f63..0000000 --- a/Java/1.6 - Copy.java +++ /dev/null @@ -1,44 +0,0 @@ -// EX 1.6 Write a program to check whether the sequence of numbers 1, 2, 3 appears in a given array of integers somewhere. -// Write a program to check whether the sequence of numbers 1, 2, 3 appears in a given array of integers somewhere. - -// Example -// Input: -// 5 -// 1 1 2 3 1 -// Output: 1 -// Please note that: -// 5 as array size -// 1 1 2 3 1 as array - -import java.util.Scanner; - -/** - * array2 - */ -public class Main { - public static boolean test(int[] a) { - for (int i = 0; i < a.length-2 ; i++) { - if (a[i] == 1 && a[i + 1] == 2 && a[i + i] == 3) { - return true; - } - } - return false; - } - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - int n = sc.nextInt(); - int[] a = new int[n]; - for (int i = 0; i < n; i++) { - a[i] = sc.nextInt(); - } - if (test(a)) { - System.out.print(0); - } else { - System.out.print(1); - } - } -} - - - diff --git a/Java/1.7 - Copy.java b/Java/1.7 - Copy.java deleted file mode 100644 index bfef6cd..0000000 --- a/Java/1.7 - Copy.java +++ /dev/null @@ -1,56 +0,0 @@ -// EX 1.7 If a number appears three times in a row in an array it is called a triple. Write a program to check if a triple is presents in an array of integers or not. -// If a value appears three times in a row in an array it is called a triple. Write a program to check if a triple is presents in an array of integers or not. - -// Example -// Input: -// 7 -// 1 1 1 2 2 2 1 -// Output: -// 1 - -// Please note that: - -// 7 as array size -// 1 1 1 2 2 2 1 as array -import java.util.Scanner; - -/** - * array2 - */ -public class Main{ - public static boolean test(int[] a, int n) { - for (int i = 0; i < n-1; i++) { - if (a[i] == a[i + 1] && a[i] == a[i + 2] && a[i + 1] == a[i + 2]) { - { - return true; - } - } - } - return false; - -} - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - int n = sc.nextInt(); - int[] a = new int[n]; - for (int i = 0; i < n; i++) { - a[i] = sc.nextInt(); - } - - if (test(a, n) == true) { - System.out.print(1); - } else { - System.out.print(0); - } - // for (int i = 0; i < a.length; i++) { - // System.out.print(a[i] + " "); - // } - } -} - - - - - - - diff --git a/Java/1.8 - Copy.java b/Java/1.8 - Copy.java deleted file mode 100644 index 53dcec5..0000000 --- a/Java/1.8 - Copy.java +++ /dev/null @@ -1,52 +0,0 @@ -// EX 1.8 Write a program to find k largest even number in an array -// Write a program to find k largest even number in an array with size of n. - -// Example -// Input: -// 2 -// 8 -// 4 5 9 12 9 22 45 7 -// Output: -// 22 12 -// Please note that: -// 2 as k -// 8 as n -// 4 5 9 12 9 22 45 7 as array - -import java.util.PriorityQueue; -import java.util.Scanner; - -class GFG { - - static void kLargest(int a[], int l, int k) { - PriorityQueue pq = new PriorityQueue(); - - for (int i = 0; i < l; i++) { - if (a[i] % 2 == 0) { - pq.add(a[i]); - if (pq.size() > k) { - pq.poll(); - } - } - } - while (!pq.isEmpty()) { - System.out.print(pq.peek() + " "); - pq.poll(); - } - System.out.println(); - } - - public static void main(String[] args) { - Scanner sc = new Scanner(System.in); - int k = sc.nextInt(); - int n = sc.nextInt(); - int a[] = new int[n]; - int l = a.length; - for (int i = 0; i < n; i++) { - a[i] = sc.nextInt(); - } - kLargest(a, l, k); - - } -} - diff --git a/Java/1.9 - Copy.java b/Java/1.9 - Copy.java deleted file mode 100644 index 6b03b0d..0000000 --- a/Java/1.9 - Copy.java +++ /dev/null @@ -1,57 +0,0 @@ -// EX 1.9 Write a program to separate and sort even and odd numbers of an array of integers -// EX 2.8 Write a program to separate and sort even and odd numbers of an array of integers. -// Put all sorted odd numbers first, and then sorted even numbers. -// Example: -// Input: -// 9 -// 0 1 3 4 5 6 7 8 10 -// Output: -// 1 3 5 7 0 4 6 8 10 - -// Please note that: -// 9 as size of array -// 0 1 3 4 5 6 7 8 10 as array - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Scanner; - -public class Main { - - public static void main(String[] args) { - Scanner scanner = new Scanner(System.in); - int n = scanner.nextInt(); - ArrayList oddNumbers = new ArrayList<>(); - ArrayList evenNumbers = new ArrayList<>(); - - for (int i = 0; i < n; i++) { - int temp = 0; - temp = scanner.nextInt(); - if (temp % 2 != 0) { - oddNumbers.add(temp); - } else { - evenNumbers.add(temp); - } - } - Collections.sort(oddNumbers); - Collections.sort(evenNumbers); - - ArrayList numbers = new ArrayList<>(); - for (Integer i : oddNumbers) { - numbers.add(i); - } - for (Integer i : evenNumbers) { - numbers.add(i); - } - boolean first = true; - for (Integer i : numbers) { - if (first) { - first = false; - System.out.print(i); - } else { - System.out.print(" " + i); - } - } - } -} -