xerga 1 jaar geleden
bovenliggende
commit
c4d7afa025
100 gewijzigde bestanden met toevoegingen van 3168 en 81 verwijderingen
  1. 6 0
      01_JavaSe/JavaSe/.idea/inspectionProfiles/Project_Default.xml
  2. 1 1
      01_JavaSe/JavaSe/.idea/misc.xml
  3. 3 0
      01_JavaSe/JavaSe/.idea/modules.xml
  4. 210 79
      01_JavaSe/JavaSe/.idea/workspace.xml
  5. 0 1
      01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance04/Test.java
  6. 29 0
      01_JavaSe/JavaSe/day07/.gitignore
  7. 11 0
      01_JavaSe/JavaSe/day07/day07.iml
  8. 71 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer1/Account.java
  9. 68 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer1/CheckAccount.java
  10. 60 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer1/Test.java
  11. 39 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer2/a/FieldMethodTest.java
  12. 34 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer2/b/InterviewTest1.java
  13. 48 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer2/c/InterviewTest2.java
  14. 43 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer3/Circle.java
  15. 49 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer3/GeometricObject.java
  16. 48 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer3/GeometricTest.java
  17. 50 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer3/MyRectangle.java
  18. 29 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/obj8/Person.java
  19. 48 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/obj8/Test.java
  20. 37 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/overwrite1/DemeRideMethod1.java
  21. 30 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/overwrite1/Phone.java
  22. 33 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/overwrite1/SmartPhone.java
  23. 25 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Animal.java
  24. 36 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/AnimalShop.java
  25. 23 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Cat.java
  26. 22 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Dog.java
  27. 41 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Person.java
  28. 68 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Test.java
  29. 28 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/TestVariable.java
  30. 13 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/A.java
  31. 13 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/B.java
  32. 13 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/C.java
  33. 19 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/Person.java
  34. 24 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/Son.java
  35. 53 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/Test.java
  36. 13 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/A.java
  37. 17 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/B.java
  38. 13 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/C.java
  39. 37 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/Test.java
  40. 19 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/Word.java
  41. 43 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/super2/Person.java
  42. 53 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/super2/Student.java
  43. 23 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/super2/Test.java
  44. 28 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/super3/Test.java
  45. 37 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/super4/Dog.java
  46. 26 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/test/OtherThing.java
  47. 23 0
      01_JavaSe/JavaSe/day07/src/com/lc/day07/test/StaticTest.java
  48. 29 0
      01_JavaSe/JavaSe/day08/.gitignore
  49. 11 0
      01_JavaSe/JavaSe/day08/day08.iml
  50. 29 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract5/Animal.java
  51. 23 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract5/Cat.java
  52. 35 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract5/Test.java
  53. 43 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract6/BankTemplateMethod.java
  54. 17 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract6/Employee.java
  55. 20 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract6/Test.java
  56. 33 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer1/Son.java
  57. 56 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer2/Test04.java
  58. 17 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer3/Something.java
  59. 26 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer3/Something1.java
  60. 23 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer4/RiverBarge.java
  61. 23 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer4/Truck.java
  62. 20 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer4/Vehicle.java
  63. 65 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/Employee.java
  64. 33 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/HourlyEmployee.java
  65. 55 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/MyDate.java
  66. 68 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/PayrollSystem.java
  67. 28 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/SalariedEmployee.java
  68. 18 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/final5/SmallStudent.java
  69. 17 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/final5/Student.java
  70. 24 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/final5/Test.java
  71. 23 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface10/USB.java
  72. 32 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface10/USB2.java
  73. 31 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface10/USB3.java
  74. 14 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface11/A.java
  75. 15 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface11/B.java
  76. 14 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface11/C.java
  77. 22 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface11/D.java
  78. 14 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Compter.java
  79. 32 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Flash.java
  80. 25 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Mouse.java
  81. 50 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Test.java
  82. 38 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Usb3.java
  83. 13 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface8/A.java
  84. 13 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface8/B.java
  85. 13 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface8/C.java
  86. 13 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface8/D.java
  87. 16 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/BoyFriend.java
  88. 16 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/Father.java
  89. 16 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/Friend.java
  90. 32 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/Son.java
  91. 19 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/Test.java
  92. 34 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/keyword4/Person.java
  93. 51 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/keyword4/Student.java
  94. 31 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/keyword4/TestPerson.java
  95. 30 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/keyword4/TestStudent.java
  96. 29 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/singleton3/Singleton1.java
  97. 33 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/singleton3/Singleton2.java
  98. 30 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/singleton3/Test.java
  99. 37 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/static1/Person.java
  100. 62 0
      01_JavaSe/JavaSe/day08/src/com/lc/day08/static1/Test.java

+ 6 - 0
01_JavaSe/JavaSe/.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,6 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="MarkedForRemoval" enabled="false" level="ERROR" enabled_by_default="false" />
+  </profile>
+</component>

+ 1 - 1
01_JavaSe/JavaSe/.idea/misc.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="ProjectRootManager">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_17_PREVIEW" project-jdk-name="17" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>
 </project>

+ 3 - 0
01_JavaSe/JavaSe/.idea/modules.xml

@@ -9,6 +9,9 @@
       <module fileurl="file://$PROJECT_DIR$/day04/day04.iml" filepath="$PROJECT_DIR$/day04/day04.iml" />
       <module fileurl="file://$PROJECT_DIR$/day05/day05.iml" filepath="$PROJECT_DIR$/day05/day05.iml" />
       <module fileurl="file://$PROJECT_DIR$/day06/day06.iml" filepath="$PROJECT_DIR$/day06/day06.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day07/day07.iml" filepath="$PROJECT_DIR$/day07/day07.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day08/day08.iml" filepath="$PROJECT_DIR$/day08/day08.iml" />
+      <module fileurl="file://$PROJECT_DIR$/day09/day09.iml" filepath="$PROJECT_DIR$/day09/day09.iml" />
     </modules>
   </component>
 </project>

+ 210 - 79
01_JavaSe/JavaSe/.idea/workspace.xml

@@ -5,39 +5,137 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="12140050-64bb-493c-b359-1ac1fbbf3cc2" name="Changes" comment="">
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance04/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance04/Student.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance04/Test.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance05/Animal.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance05/Cat.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance05/Dog.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance06/Test.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/constructor2/Student.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/constructor2/TestStudent.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/encapsulation1/ArrayUtil.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/encapsulation1/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/encapsulation1/TestArrayUtil.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/encapsulation1/TestPerson.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer1/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer1/TestPerson.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer2/Book.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer2/TestBook.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer3/Account.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer3/Customer.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer3/Test.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer4/Boy.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer4/Girl.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer4/TestBoy.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer5/Account.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer5/Bank.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer5/Customer.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/exer/exer5/Test.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/recursion/Demo01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/this03/this1/DemoThis.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/this03/this1/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/this03/this1/Rectangle.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/this03/this2/Student.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/this03/this2/TestStudent.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer1/Account.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer1/CheckAccount.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer1/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer2/a/FieldMethodTest.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer2/b/InterviewTest1.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer2/c/InterviewTest2.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer3/Circle.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer3/GeometricObject.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer3/GeometricTest.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/exer/exer3/MyRectangle.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/obj8/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/obj8/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/overwrite1/DemeRideMethod1.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/overwrite1/Phone.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/overwrite1/SmartPhone.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism5/Animal.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism5/AnimalShop.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism5/Cat.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism5/Dog.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism5/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism5/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism5/TestVariable.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism6/A.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism6/B.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism6/C.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism6/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism6/Son.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism6/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism7/A.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism7/B.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism7/C.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism7/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/polymorphism7/Word.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/super2/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/super2/Student.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/super2/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/super3/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/super4/Dog.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/test/OtherThing.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day07/src/com/lc/day07/test/StaticTest.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/abstract5/Animal.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/abstract5/Cat.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/abstract5/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/abstract6/BankTemplateMethod.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/abstract6/Employee.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/abstract6/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer1/Son.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer2/Test04.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer3/Something.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer3/Something1.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer4/RiverBarge.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer4/Truck.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer4/Vehicle.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer5/Employee.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer5/HourlyEmployee.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer5/MyDate.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer5/PayrollSystem.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/exer/exer5/SalariedEmployee.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/final5/SmallStudent.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/final5/Student.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/final5/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface10/USB.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface10/USB2.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface10/USB3.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface11/A.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface11/B.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface11/C.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface11/D.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface7/Compter.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface7/Flash.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface7/Mouse.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface7/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface7/Usb3.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface8/A.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface8/B.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface8/C.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface8/D.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface9/BoyFriend.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface9/Father.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface9/Friend.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface9/Son.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/inte/interface9/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/keyword4/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/keyword4/Student.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/keyword4/TestPerson.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/keyword4/TestStudent.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/singleton3/Singleton1.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/singleton3/Singleton2.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/singleton3/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/static1/Person.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/static1/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/static2/Father.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/static2/Son.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/static2/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day08/src/com/lc/day08/test/com/lc/day08/TestAnnotation.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/anno4/DemoAnnotion.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/anno5/Column.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/anno5/Table.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/anno5/User.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/baozhuang7/Demo01.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/baozhuang7/Demo02.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/baozhuang7/TestExam.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/enum2/Season.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/enum2/Seasona.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/enum2/TestSeason.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/enum2/TestWeek.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/enum2/Week.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/enum3/DemoEnum01.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/enum3/Season.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer1/Ball.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer1/C.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer2/Circle.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer2/ComparableCircle.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer2/CompareObject.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer2/InterfaceTest.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer3/Bicycle.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer3/Car.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer3/Dev.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer3/ElectricVehicle.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer3/IPower.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer3/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer3/Vehicle.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer4/A.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer4/Test.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/exer/exer4/TestA.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/inner1/DemoInner.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/inner1/MethodClass.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/inner1/NoNameClassObj.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/inner1/OutClass.java" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/day09/src/com/lc/day09/test6/Test01.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance04/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/day06/src/com/lc/day06/Inheritance04/Test.java" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -51,6 +149,9 @@
   <component name="FileTemplateManagerImpl">
     <option name="RECENT_TEMPLATES">
       <list>
+        <option value="Interface" />
+        <option value="Enum" />
+        <option value="AnnotationType" />
         <option value="Class" />
       </list>
     </option>
@@ -58,6 +159,11 @@
   <component name="Git.Settings">
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../.." />
   </component>
+  <component name="HighlightingSettingsPerFile">
+    <setting file="jar://$PROJECT_DIR$/../../../../../Program Files/Java/jdk-17/lib/src.zip!/java.base/java/io/PrintStream.java" root0="SKIP_INSPECTION" />
+    <setting file="jar://$PROJECT_DIR$/../../../../../Program Files/Java/jdk-17/lib/src.zip!/java.base/java/lang/Object.java" root0="SKIP_INSPECTION" />
+    <setting file="jar://$PROJECT_DIR$/../../../../../Program Files/Java/jdk-17/lib/src.zip!/java.base/java/lang/String.java" root0="SKIP_INSPECTION" />
+  </component>
   <component name="MavenImportPreferences">
     <option name="generalSettings">
       <MavenGeneralSettings>
@@ -73,39 +179,44 @@
     <option name="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent">{
-  &quot;keyToString&quot;: {
-    &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
-    &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
-    &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
-    &quot;jdk.selected.JAVA_MODULE&quot;: &quot;17&quot;,
-    &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
-    &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
-    &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
-    &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
-    &quot;project.structure.last.edited&quot;: &quot;SDKs&quot;,
-    &quot;project.structure.proportion&quot;: &quot;0.0&quot;,
-    &quot;project.structure.side.proportion&quot;: &quot;0.2908046&quot;,
-    &quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;,
-    &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
+  <component name="PropertiesComponent"><![CDATA[{
+  "keyToString": {
+    "Downloaded.Files.Path.Enabled": "false",
+    "Repository.Attach.Annotations": "false",
+    "Repository.Attach.JavaDocs": "false",
+    "Repository.Attach.Sources": "false",
+    "RunOnceActivity.OpenProjectViewOnStart": "true",
+    "RunOnceActivity.ShowReadmeOnStart": "true",
+    "WebServerToolWindowFactoryState": "false",
+    "jdk.selected.JAVA_MODULE": "17",
+    "node.js.detected.package.eslint": "true",
+    "node.js.detected.package.tslint": "true",
+    "node.js.selected.package.eslint": "(autodetect)",
+    "node.js.selected.package.tslint": "(autodetect)",
+    "nodejs_package_manager_path": "npm",
+    "project.structure.last.edited": "Modules",
+    "project.structure.proportion": "0.15",
+    "project.structure.side.proportion": "0.2908046",
+    "settings.editor.selected.configurable": "reference.projectsettings.compiler.javacompiler",
+    "vue.rearranger.settings.migration": "true"
   }
-}</component>
+}]]></component>
   <component name="RecentsManager">
     <key name="CopyClassDialog.RECENTS_KEY">
+      <recent name="com.lc.day09.enum2" />
+      <recent name="com.lc.day08.inte.interface10" />
+      <recent name="com.lc.day08.singleton3" />
+      <recent name="com.lc.day07.exer.exer1" />
       <recent name="com.lc.day06.exer.exer5" />
-      <recent name="com.lc.day06.this03.this2" />
-      <recent name="com.lc.day06.constructor2" />
-      <recent name="com.lc.day06.encapsulation1" />
-      <recent name="com.lc.day05.recursion" />
     </key>
   </component>
-  <component name="RunManager" selected="Application.com.lc.day06.Inheritance04.Test">
-    <configuration name="DemoThis" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day06.this03.this1.DemoThis" />
-      <module name="day06" />
+  <component name="RunManager" selected="JUnit.Demo02.test03">
+    <configuration name="TestExam" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
+      <option name="MAIN_CLASS_NAME" value="com.lc.day09.baozhuang7.TestExam" />
+      <module name="day09" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day06.this03.this1.*" />
+          <option name="PATTERN" value="com.lc.day09.baozhuang7.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
@@ -113,65 +224,77 @@
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="Test" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day06.exer3.Test" />
-      <module name="day06" />
+    <configuration name="Demo01.test02" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="day09" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day06.exer3.*" />
+          <option name="PATTERN" value="com.lc.day09.baozhuang7.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
+      <option name="PACKAGE_NAME" value="com.lc.day09.baozhuang7" />
+      <option name="MAIN_CLASS_NAME" value="com.lc.day09.baozhuang7.Demo01" />
+      <option name="METHOD_NAME" value="test02" />
+      <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="com.lc.day06.Inheritance04.Test" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day06.Inheritance04.Test" />
-      <module name="day06" />
+    <configuration name="Demo02.test01" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="day09" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day06.Inheritance04.*" />
+          <option name="PATTERN" value="com.lc.day09.baozhuang7.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
+      <option name="PACKAGE_NAME" value="com.lc.day09.baozhuang7" />
+      <option name="MAIN_CLASS_NAME" value="com.lc.day09.baozhuang7.Demo02" />
+      <option name="METHOD_NAME" value="test01" />
+      <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="com.lc.day06.exer.exer5.Test" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day06.exer.exer5.Test" />
-      <module name="day06" />
+    <configuration name="Demo02.test02" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="day09" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day06.exer.exer5.*" />
+          <option name="PATTERN" value="com.lc.day09.baozhuang7.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
+      <option name="PACKAGE_NAME" value="com.lc.day09.baozhuang7" />
+      <option name="MAIN_CLASS_NAME" value="com.lc.day09.baozhuang7.Demo02" />
+      <option name="METHOD_NAME" value="test02" />
+      <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="com.lc.day06.this03.this2.TestStudent" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day06.this03.this2.TestStudent" />
-      <module name="day06" />
+    <configuration name="Demo02.test03" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
+      <module name="day09" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day06.this03.this2.*" />
+          <option name="PATTERN" value="com.lc.day09.baozhuang7.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
+      <option name="PACKAGE_NAME" value="com.lc.day09.baozhuang7" />
+      <option name="MAIN_CLASS_NAME" value="com.lc.day09.baozhuang7.Demo02" />
+      <option name="METHOD_NAME" value="test03" />
+      <option name="TEST_OBJECT" value="method" />
       <method v="2">
         <option name="Make" enabled="true" />
       </method>
     </configuration>
     <recent_temporary>
       <list>
-        <item itemvalue="Application.com.lc.day06.Inheritance04.Test" />
-        <item itemvalue="Application.com.lc.day06.exer.exer5.Test" />
-        <item itemvalue="Application.com.lc.day06.this03.this2.TestStudent" />
-        <item itemvalue="Application.DemoThis" />
-        <item itemvalue="Application.Test" />
+        <item itemvalue="JUnit.Demo02.test03" />
+        <item itemvalue="Application.TestExam" />
+        <item itemvalue="JUnit.Demo02.test02" />
+        <item itemvalue="JUnit.Demo02.test01" />
+        <item itemvalue="JUnit.Demo01.test02" />
       </list>
     </recent_temporary>
   </component>
@@ -190,6 +313,14 @@
       <workItem from="1689643884392" duration="16542000" />
       <workItem from="1689672101731" duration="69000" />
       <workItem from="1689727752702" duration="14494000" />
+      <workItem from="1689898697160" duration="19397000" />
+      <workItem from="1689933974907" duration="72000" />
+      <workItem from="1689934055143" duration="86000" />
+      <workItem from="1689936166819" duration="1266000" />
+      <workItem from="1689981531239" duration="19507000" />
+      <workItem from="1690114904679" duration="3000" />
+      <workItem from="1690114916552" duration="738000" />
+      <workItem from="1690154455002" duration="23097000" />
     </task>
     <servers />
   </component>

+ 0 - 1
01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance04/Test.java

@@ -20,5 +20,4 @@ public class Test {
         student.eat();
 
     }
-
 }

+ 29 - 0
01_JavaSe/JavaSe/day07/.gitignore

@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 11 - 0
01_JavaSe/JavaSe/day07/day07.iml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="jdk" jdkName="17" jdkType="JavaSDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 71 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer1/Account.java

@@ -0,0 +1,71 @@
+package com.lc.day07.exer.exer1;
+
+/**
+ * ClassName: Account
+ * Package: com.lc.day06.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:25
+ * @Version 1.0
+ */
+public class Account {
+
+    private int id;
+    protected double balance;
+    private double annualInterestRate;
+
+    public Account() {
+    }
+
+    public Account(int id, double balance) {
+        this.id = id;
+        this.balance = balance;
+    }
+
+    public Account(double balance ){
+        this.balance = balance;
+    }
+
+    // 取款方法withdraw(),
+    public void withdraw( double money ){
+        if (money > balance){
+            System.out.println("余额不足");
+        }else{
+            balance = balance - money;
+        }
+    }
+
+    // 存款方法deposit()。
+    public void deposit( double money ){
+        balance = balance + money;
+    }
+
+
+
+
+
+    public double getBalance() {
+        return balance;
+    }
+
+    public void setBalance(double balance) {
+        this.balance = balance;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public double getAnnualInterestRate() {
+        return annualInterestRate;
+    }
+
+    public void setAnnualInterestRate(double annualInterestRate) {
+        this.annualInterestRate = annualInterestRate;
+    }
+}

+ 68 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer1/CheckAccount.java

@@ -0,0 +1,68 @@
+package com.lc.day07.exer.exer1;
+
+/**
+ * ClassName: CheckAccount
+ * Package: com.lc.day07.exer.exer1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 11:18
+ * @Version 1.0
+ */
+public class CheckAccount extends Account{
+    private double overdraft;
+
+    public CheckAccount(double balance, double overdraft , int id) {
+        //初始化
+        super(id,balance);
+        this.overdraft = overdraft;
+    }
+
+    public CheckAccount() {
+    }
+
+    /*
+            如果(取款金额<账户余额),
+                可直接取款
+            如果(取款金额>账户余额),
+                计算需要透支的额度
+            判断可透支额overdraft是否足够支付本次透支需要,如果可以
+                将账户余额修改为0,减去可透支金额
+            如果不可以
+                提示用户超过可透支额的限额
+             */
+    @Override
+    public void withdraw(double money) {
+        //如果(取款金额<账户余额),
+        if ( balance > money ){
+            //获取
+            //double balance = balance;
+            //减去
+            double v = balance - money;
+            //设置
+            setBalance(v);
+        } else {
+           if (money > (balance+overdraft)){
+               //提示
+               System.out.println("可透支额度不足");
+           }else {
+               //减去 余额
+               double v = money - balance;
+
+               //余额赋值 0
+               balance = 0;
+
+               //透支额度 - v //设置
+               overdraft = overdraft - v;
+           }
+        }
+    }
+
+    public double getOverdraft() {
+        return overdraft;
+    }
+
+    public void setOverdraft(double overdraft) {
+        this.overdraft = overdraft;
+    }
+}

+ 60 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer1/Test.java

@@ -0,0 +1,60 @@
+package com.lc.day07.exer.exer1;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day07.exer.exer1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 11:15
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+        /*
+        写一个用户程序测试Account类。在用户程序中,创建一个账号为1122、余额为20000、、
+        年利率4.5%的Account对象。使用withdraw方法提款30000元,并打印余额。
+        再使用withdraw方法提款2500元,使用deposit方法存款3000元,然后打印余额和月利率。
+         */
+        Account account = new Account();
+        account.setId(1122);
+        account.setBalance(20000);
+        account.setAnnualInterestRate(0.0045);
+
+        account.withdraw(2500);
+        account.deposit(3000);
+
+        System.out.println(account.getBalance());
+        System.out.println(account.getAnnualInterestRate());
+
+        /*
+        要求:写一个用户程序测试CheckAccount类。在用户程序中,创建一个账号为1122、余额为20000、年利率4.5%,可透支限额为5000元的CheckAccount对象。
+        使用withdraw方法提款5000元,并打印账户余额和可透支额。
+        再使用withdraw方法提款18000元,并打印账户余额和可透支额。
+        再使用withdraw方法提款3000元,并打印账户余额和可透支额。
+        提示:
+        (1)子类CheckAccount的构造方法需要将从父类继承的3个属性和子类自己的属性全部初始化。
+        (2)父类Account的属性balance被设置为private,但在子类CheckAccount的withdraw方法中需要修改它的值,因此应修改父类的balance属性,定义其为protected。
+         */
+        CheckAccount checkAccount = new CheckAccount(1122,2000,5000);
+//        checkAccount.setId(1122);
+//        checkAccount.setBalance(20000);
+//        checkAccount.setAnnualInterestRate(0.0045);
+//        checkAccount.setOverdraft(5000);
+
+        //提款5000元
+        checkAccount.withdraw(5000);
+
+        System.out.println("余额:"+checkAccount.getBalance()+"透支额度:"+checkAccount.getOverdraft());
+
+        //提款5000元
+        checkAccount.withdraw(18000);
+        System.out.println("余额:"+checkAccount.getBalance()+"透支额度:"+checkAccount.getOverdraft());
+
+        //提款3000元
+        checkAccount.withdraw(3000);
+        System.out.println("余额:"+checkAccount.getBalance()+"透支额度:"+checkAccount.getOverdraft());
+
+    }
+}

+ 39 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer2/a/FieldMethodTest.java

@@ -0,0 +1,39 @@
+package com.lc.day07.exer.exer2.a;
+
+/**
+ * ClassName: FieldMethodTest
+ * Package: com.lc.day07.exer.exer2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:45
+ * @Version 1.0
+ */
+class Base {
+    int count = 10;
+    public void display() {
+        System.out.println(this.count);
+    }
+}
+
+class Sub extends Base {
+    int count = 20;
+    public void display() {
+        System.out.println(this.count);
+    }
+}
+
+public class FieldMethodTest {
+    public static void main(String[] args){
+        Sub s = new Sub();
+        System.out.println(s.count); // 20
+        s.display(); // 20
+        Base b = s;
+        System.out.println(b == s); //? == 比较 地址值
+        System.out.println(b.count); // 10
+        b.display();  // ?编译 20
+
+        //Base b = new new Sub();
+        //b.display() ; 运行看子类
+    }
+}

+ 34 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer2/b/InterviewTest1.java

@@ -0,0 +1,34 @@
+package com.lc.day07.exer.exer2.b;/**
+* ClassName: InterviewTest1
+* Package: com.lc.day07.exer.exer2
+* Description:
+* @Author 爱扣钉-陈晨
+* @Create 2023/7/21 15:58
+* @Version 1.0
+*/
+public class InterviewTest1 {
+
+    public static void main(String[] args) {
+        Base base = new Sub();
+        base.add(1, 2, 3); // 重写 参数一致 方法名一致
+                                   // 重载 把 数组和可变参数 看成一个方法
+		Sub s = (Sub)base;
+		s.add(1,2,3); //重载的问题  看匹配  先看个数 看类型
+    }
+}
+class Base {
+    public void add(int a, int... arr) { //可变参数
+        System.out.println("base");
+    }
+}
+class Sub extends Base {
+
+    public void add(int a, int[] arr) { //数组 和 可变参数 看成一样的 构成
+        System.out.println("sub_1");
+    }
+
+	public void add(int a, int b, int c) {
+		System.out.println("sub_2");
+	}
+
+}

+ 48 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer2/c/InterviewTest2.java

@@ -0,0 +1,48 @@
+package com.lc.day07.exer.exer2.c;
+
+/**
+ * ClassName: InterviewTest2
+ * Package: com.lc.day07.exer.exer2.c
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 16:06
+ * @Version 1.0
+ */
+//getXxx()和setXxx()声明在哪个类中,内部操作的属性就是哪个类里的。
+public class InterviewTest2 {
+    public static void main(String[] args) {
+        Father f = new Father();
+        Son s = new Son();
+        System.out.println(f.getInfo());//lovecoding
+        System.out.println(s.getInfo());//爱扣钉
+        s.test();//爱扣钉  lovecoding
+        System.out.println("-----------------");
+        s.setInfo("钉钉");
+        System.out.println(f.getInfo());//lovecoding
+        System.out.println(s.getInfo());//钉钉
+        s.test();//钉钉  lovecoding
+    }
+}
+class Father {
+    private String info = "lovecoding";
+    public void setInfo(String info) {
+        this.info = info;
+    }
+    public String getInfo() {
+        return info;
+    }
+}
+class Son extends Father {
+    private String info = "爱扣钉";
+    public void setInfo(String info) {
+        this.info = info;
+    }
+    public String getInfo() {
+        return info;
+    }
+    public void test() {
+        System.out.println(this.getInfo());
+        System.out.println(super.getInfo());
+    }
+}

+ 43 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer3/Circle.java

@@ -0,0 +1,43 @@
+package com.lc.day07.exer.exer3;
+
+/**
+ * ClassName: Circle
+ * Package: com.lc.day07.exer.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 16:55
+ * @Version 1.0
+ */
+public class Circle  extends  GeometricObject{
+
+    private double radius;
+
+
+    public Circle() {
+
+    }
+
+    public Circle(String color, double weight, double radius) {
+        super(color, weight);
+        this.radius = radius;
+    }
+
+    //面积
+    @Override
+    public double findArea() {
+        return Math.PI * radius* radius;
+    }
+
+//    public double showArae(){
+//        return findArea();
+//    }
+
+    public double getRadius() {
+        return radius;
+    }
+
+    public void setRadius(double radius) {
+        this.radius = radius;
+    }
+}

+ 49 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer3/GeometricObject.java

@@ -0,0 +1,49 @@
+package com.lc.day07.exer.exer3;
+
+/**
+ * ClassName: GeometricObject
+ * Package: com.lc.day07.exer.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 16:53
+ * @Version 1.0
+ */
+public class GeometricObject {
+    private String color;
+
+    private double weight;
+
+    public double showArae(){
+        //调用子类的方法
+        return findArea();
+    }
+
+    public GeometricObject() {
+    }
+
+    public GeometricObject(String color, double weight) {
+        this.color = color;
+        this.weight = weight;
+    }
+
+    public double findArea(){
+        return 0.0;
+    }
+
+    public String getColor() {
+        return color;
+    }
+
+    public void setColor(String color) {
+        this.color = color;
+    }
+
+    public double getWeight() {
+        return weight;
+    }
+
+    public void setWeight(double weight) {
+        this.weight = weight;
+    }
+}

+ 48 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer3/GeometricTest.java

@@ -0,0 +1,48 @@
+package com.lc.day07.exer.exer3;
+
+/**
+ * ClassName: GeometricTest
+ * Package: com.lc.day07.exer.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 16:59
+ * @Version 1.0
+ */
+public class GeometricTest {
+
+    public static void main(String[] args) {
+        Circle c1 = new Circle();
+        c1.setRadius(5);
+
+        Circle c2 = new Circle();
+        c2.setRadius(15);
+
+        MyRectangle myRectangle1 = new MyRectangle();
+        myRectangle1.setWidth(10);
+        myRectangle1.setHeight(10);
+
+        //比较
+        boolean b = equalsArea(c1, myRectangle1);
+        System.out.println(b);
+
+        //显示面积
+        displayGeometricObject(c1);
+    }
+
+    public static boolean equalsArea(GeometricObject g1, GeometricObject g2){
+        //null
+        if (g1 == g2){
+            return true;
+        }
+        return g1.findArea() == g2.findArea();
+    }
+
+    public static void displayGeometricObject(GeometricObject g){
+        //GeometricObject  g = new  c1
+        System.out.println(g.findArea());
+        //System.out.println(g.showArae());
+    }
+
+
+}

+ 50 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/exer/exer3/MyRectangle.java

@@ -0,0 +1,50 @@
+package com.lc.day07.exer.exer3;
+
+/**
+ * ClassName: MyRectangle
+ * Package: com.lc.day07.exer.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 16:57
+ * @Version 1.0
+ */
+public class MyRectangle extends GeometricObject{
+
+    private double height;
+    private double width;
+
+    public MyRectangle() {
+    }
+
+    public MyRectangle(String color, double weight, double height, double width) {
+        super(color, weight);
+        this.height = height;
+        this.width = width;
+    }
+
+    @Override
+    public double findArea() {
+        return width*height;
+    }
+
+//    public double showArae(){
+//        return findArea();
+//    }
+
+    public double getHeight() {
+        return height;
+    }
+
+    public void setHeight(double height) {
+        this.height = height;
+    }
+
+    public double getWidth() {
+        return width;
+    }
+
+    public void setWidth(double width) {
+        this.width = width;
+    }
+}

+ 29 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/obj8/Person.java

@@ -0,0 +1,29 @@
+package com.lc.day07.obj8;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day07.obj8
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 17:12
+ * @Version 1.0
+ */
+public class Person implements Cloneable{
+
+
+    String name = "person";
+
+//    @Override
+//    public String toString() {
+//        return "Person{" +
+//                "name='" + name + '\'' +
+//                '}';
+//    }
+
+
+    @Override
+    protected Object clone() throws CloneNotSupportedException {
+        return super.clone();
+    }
+}

+ 48 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/obj8/Test.java

@@ -0,0 +1,48 @@
+package com.lc.day07.obj8;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day07.obj8
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 17:12
+ * @Version 1.0
+ */
+public class Test {
+    public static void main(String[] args) {
+
+        Person person = new Person();
+
+        //person=null;
+
+        //com.lc.day07.obj8.Person@3b07d329
+
+        System.out.println(person);
+        //println
+
+        //没有重写调用  默认就用 toStrng显示
+        System.out.println(person.toString());
+
+        // 重写
+        System.out.println(person);
+
+
+        // com.lc.day07.obj8.Person@378bf509
+        String s = person.getClass().getName() + "@" + Integer.toHexString(person.hashCode());
+        System.out.println("拼写的:"+s);
+
+        //equals
+
+        Person person1 = new Person();
+
+        boolean equals = person1.equals(new Person());
+        System.out.println(equals);
+
+        System.out.println(person1 == new Person());
+
+
+
+
+    }
+}

+ 37 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/overwrite1/DemeRideMethod1.java

@@ -0,0 +1,37 @@
+package com.lc.day07.overwrite1;
+
+/**
+ * ClassName: DemeRideMethod1
+ * Package: com.lc.day07.overwrite
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 9:28
+ * @Version 1.0
+ */
+public class DemeRideMethod1 {
+
+    public static void main(String[] args) {
+
+        SmartPhone smartPhone = new SmartPhone();
+
+        //重写方法调用
+        smartPhone.call();
+        smartPhone.send();
+
+        //注意点
+        //父类方法  和  子类的方法 一致 名称 和参数
+        // @Override 标识 重写方法 不符合报错
+
+        //返回值
+        // 子类的返回值 不能大于父类的返回值类型。 引用数据类型
+        // 基本数据类型 必须一致。
+
+        // 修饰符
+        // 不能小于父类的修饰符
+        // 异常  后续
+
+        // 等于父类就可以  返回 = 父类 修饰符 等于
+
+    }
+}

+ 30 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/overwrite1/Phone.java

@@ -0,0 +1,30 @@
+package com.lc.day07.overwrite1;
+
+/**
+ * ClassName: Phone
+ * Package: com.lc.day07.overwrite
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 9:29
+ * @Version 1.0
+ */
+public class Phone {
+
+    String cpu;
+
+    public void call(){
+        System.out.println("打电话");
+    }
+
+    public void send(){
+        System.out.println("发短信");
+    }
+
+
+    Phone show(){
+        return null;
+    }
+
+
+}

+ 33 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/overwrite1/SmartPhone.java

@@ -0,0 +1,33 @@
+package com.lc.day07.overwrite1;
+
+/**
+ * ClassName: SmartPhone
+ * Package: com.lc.day07.overwrite
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 9:30
+ * @Version 1.0
+ */
+public class SmartPhone extends Phone {
+
+    //重写注解
+    @Override  // 是重写方法
+    public void call(){
+        System.out.println("打电话");
+        System.out.println("显示头像信息");
+    }
+
+    @Override
+    public void send(){
+        System.out.println("发彩信");
+    }
+
+    //重写
+
+
+    @Override
+    public SmartPhone show() {
+        return null;
+    }
+}

+ 25 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Animal.java

@@ -0,0 +1,25 @@
+package com.lc.day07.polymorphism5;
+
+/**
+ * ClassName: Animal
+ * Package: com.lc.day07.polymorphism5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 14:11
+ * @Version 1.0
+ */
+public class Animal {
+
+    String name;
+
+    public void eat(){
+        System.out.println(name+"吃食物");
+    }
+
+
+    public void showInfo(){
+        System.out.println(name+":被领养");
+    }
+
+}

+ 36 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/AnimalShop.java

@@ -0,0 +1,36 @@
+package com.lc.day07.polymorphism5;
+
+/**
+ * ClassName: AnimalShop
+ * Package: com.lc.day07.polymorphism5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 14:33
+ * @Version 1.0
+ */
+public class AnimalShop {
+
+    //提供宠物 多种 100中 ,提供100个方法。
+
+    //符合重写
+    public Animal getAnimal( String name ){
+        if ("狗".equals(name)){
+            return new Dog();
+        }
+        if ("猫".equals(name)){
+            return new Cat();
+        }
+        return null;
+    }
+
+
+//    //获取狗
+//    public Dog getDog(){
+//        return new Dog();
+//    }
+//    //获取猫
+//    public Cat getCat(){
+//        return new Cat();
+//    }
+}

+ 23 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Cat.java

@@ -0,0 +1,23 @@
+package com.lc.day07.polymorphism5;
+
+/**
+ * ClassName: Cat
+ * Package: com.lc.day07.polymorphism5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 14:10
+ * @Version 1.0
+ */
+public class Cat  extends Animal{
+
+    public void catchMouse(){
+        System.out.println("猫抓耗子");
+    }
+
+    public void eat(){
+        System.out.println(name+"吃小鱼");
+    }
+
+
+}

+ 22 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Dog.java

@@ -0,0 +1,22 @@
+package com.lc.day07.polymorphism5;
+
+/**
+ * ClassName: Dog
+ * Package: com.lc.day07.polymorphism5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 14:10
+ * @Version 1.0
+ */
+public class Dog extends Animal{
+
+    public void eat(){
+        System.out.println(name+"吃骨头");
+    }
+
+    public void lookHome(){
+        System.out.println("狗看家");
+    }
+
+}

+ 41 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Person.java

@@ -0,0 +1,41 @@
+package com.lc.day07.polymorphism5;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day07.polymorphism5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 14:23
+ * @Version 1.0
+ */
+public class Person {
+
+    //声明父类
+    public Animal animal;
+    // 多态当作参数
+    public void adpot( Animal animal ){
+        this.animal = animal;
+    }
+
+    //展示
+    public void  show(){
+        animal.showInfo();
+    }
+
+    //声明
+    //public Cat cat;
+
+    // 领养动物不确定 ??
+    // 宠物店有几种上几种
+    //    public void adpot( Cat cat ){
+    //        this.cat = cat;
+    //    }
+
+
+
+
+
+
+
+}

+ 68 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/Test.java

@@ -0,0 +1,68 @@
+package com.lc.day07.polymorphism5;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day07.polymorphism5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 14:14
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+
+        //声明 父类  = new 子类
+        //1.继承
+        //2.声明父类 new 子类 使用多态  只能调用 父类和子类共有的方法 或者 继承方法
+        //  编辑看左边 父类   运行右边看子类
+        //3. 特有的方法需要转换
+
+
+        //使用:
+        // 创建对象
+        // 声明参数
+        // 返回值
+        Animal dog = new Dog();
+
+        dog.name = "二哈";
+        //父类的方法
+        dog.eat();
+        //dog.lookHome();
+
+        Animal cat = new Cat();
+
+        cat.name = "波斯猫";
+        cat.eat();
+
+        //调用 特有方法
+        //cat.catchMouse();
+
+
+        //多态当做参数
+        Person person = new Person();
+
+        //领养狗
+        Dog dog1 = new Dog();
+        dog1.name = "沙皮";
+        person.adpot(dog1);
+        person.show();
+
+
+        person.adpot( new Cat() );
+
+
+        //获取
+        AnimalShop animalShop = new AnimalShop();
+
+        Animal cat1 = animalShop.getAnimal("猫");
+
+        cat1.name = "加菲猫";
+
+        cat1.eat();
+
+        cat1.showInfo();
+
+    }
+}

+ 28 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism5/TestVariable.java

@@ -0,0 +1,28 @@
+package com.lc.day07.polymorphism5;
+
+/**
+ * ClassName: TestVariable
+ * Package: com.lc.day07.polymorphism5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 14:48
+ * @Version 1.0
+ */
+public class TestVariable {
+    public static void main(String[] args) {
+        Base b = new Sub();
+        System.out.println(b.a);
+        System.out.println(((Sub)b).a);
+
+        Sub s = new Sub();
+        System.out.println(s.a);
+        System.out.println(((Base)s).a);
+    }
+}
+class Base{
+    int a = 1;
+}
+class Sub extends Base{
+    int a = 2;
+}

+ 13 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/A.java

@@ -0,0 +1,13 @@
+package com.lc.day07.polymorphism6;
+
+/**
+ * ClassName: A
+ * Package: com.lc.day07.polymorphism6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:23
+ * @Version 1.0
+ */
+public class A extends C {
+}

+ 13 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/B.java

@@ -0,0 +1,13 @@
+package com.lc.day07.polymorphism6;
+
+/**
+ * ClassName: B
+ * Package: com.lc.day07.polymorphism6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:24
+ * @Version 1.0
+ */
+public class B extends C{
+}

+ 13 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/C.java

@@ -0,0 +1,13 @@
+package com.lc.day07.polymorphism6;
+
+/**
+ * ClassName: C
+ * Package: com.lc.day07.polymorphism6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:25
+ * @Version 1.0
+ */
+public class C {
+}

+ 19 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/Person.java

@@ -0,0 +1,19 @@
+package com.lc.day07.polymorphism6;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day07.polymorphism6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:15
+ * @Version 1.0
+ */
+public class Person {
+
+
+    public void play(){
+        System.out.println("钓鱼");
+    }
+
+}

+ 24 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/Son.java

@@ -0,0 +1,24 @@
+package com.lc.day07.polymorphism6;
+
+/**
+ * ClassName: Son
+ * Package: com.lc.day07.polymorphism6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:15
+ * @Version 1.0
+ */
+public class Son extends Person{
+
+    @Override
+    public void play() {
+        System.out.println("打游戏:王者荣耀");
+    }
+
+    public void study() {
+        System.out.println("好好学习,天天向上");
+    }
+
+
+}

+ 53 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism6/Test.java

@@ -0,0 +1,53 @@
+package com.lc.day07.polymorphism6;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day07.polymorphism6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:15
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+        //多态
+        //转换 向上转换
+        Person son = new Son(); // 两种数据类型  符合父类的也符合子类的
+
+        //编译看父类 运行看子类
+        son.play();
+
+        //子类特有的不能调用
+        // 转换 向下转换
+        // 小 类型  名 = (小类型) 值
+        Son s = (Son) son;
+        s.study();
+
+        //检查
+        // instanceof 前面变量  后面类型
+        System.out.println(son instanceof  Person );
+        System.out.println(son instanceof  Son );
+
+        //转换过后  由于 s 是 Person的子类 也符合 父类和子类的类型
+        System.out.println(s instanceof  Person );
+        System.out.println(s instanceof  Son );
+
+
+        //转换异常
+        C a  = new A(); //多态
+        //格式上没有问题
+        if ( a instanceof B ){
+            B b  = (B) a;
+        }else{
+            System.out.println("类型检查");
+        }
+
+        //false
+        System.out.println(a instanceof B);
+
+        //异常
+        //ClassCastException 类型转换异常
+    }
+}

+ 13 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/A.java

@@ -0,0 +1,13 @@
+package com.lc.day07.polymorphism7;
+
+/**
+ * ClassName: A
+ * Package: com.lc.day07.polymorphism7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:31
+ * @Version 1.0
+ */
+public class A extends Word{
+}

+ 17 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/B.java

@@ -0,0 +1,17 @@
+package com.lc.day07.polymorphism7;
+
+/**
+ * ClassName: B
+ * Package: com.lc.day07.polymorphism7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:31
+ * @Version 1.0
+ */
+public class B extends Word{
+
+    public void showB(){
+        System.out.println("B");
+    }
+}

+ 13 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/C.java

@@ -0,0 +1,13 @@
+package com.lc.day07.polymorphism7;
+
+/**
+ * ClassName: C
+ * Package: com.lc.day07.polymorphism7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:31
+ * @Version 1.0
+ */
+public class C extends Word{
+}

+ 37 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/Test.java

@@ -0,0 +1,37 @@
+package com.lc.day07.polymorphism7;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day07.polymorphism7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:31
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+        //数组 字母 ABC都放入
+        //多态
+        //声明数组类型 声明为父类
+        Word[] arr = new Word[26];
+
+        //检查
+        arr[0] = new A();
+        arr[1] = new B();
+        arr[2] = new C();
+
+
+        for (int i = 0; i < arr.length  ; i++) {
+            //找出B类
+            if ( arr[i] instanceof  B ){
+                System.out.println(arr[i].show());
+
+                //转换
+                B b = (B) arr[i];
+                b.showB();
+            }
+        }
+    }
+}

+ 19 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/polymorphism7/Word.java

@@ -0,0 +1,19 @@
+package com.lc.day07.polymorphism7;
+
+/**
+ * ClassName: Word
+ * Package: com.lc.day07.polymorphism7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 15:34
+ * @Version 1.0
+ */
+public class Word {
+
+    public String show(){
+        //类名
+        return this.getClass().getName();
+    }
+
+}

+ 43 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/super2/Person.java

@@ -0,0 +1,43 @@
+package com.lc.day07.super2;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day07.super2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 10:09
+ * @Version 1.0
+ */
+public class Person {
+
+    String name = "zs" ;
+    int age = 20;
+
+    public Person(){
+        super(); // 父类 默认的父类  Object 是所有类的父类。
+        System.out.println("Person");
+    }
+
+    public Person(String name, int age) {
+        this.name = name;
+        this.age = age;
+    }
+
+    public void run(){
+        System.out.println("run");
+    }
+
+    public void eat(){
+        System.out.println("eat");
+    }
+
+
+    public void sleep(){
+        System.out.println("睡7个小时");
+    }
+
+
+
+
+}

+ 53 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/super2/Student.java

@@ -0,0 +1,53 @@
+package com.lc.day07.super2;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day07.super2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 10:09
+ * @Version 1.0
+ */
+public class Student extends Person{
+
+    String name = "kunkun";
+    String school;
+
+
+    //默认的
+    public Student(){
+        //调用父类的构造方法
+        super(); //默认的
+        //只能有一个 super() 在第一行  this 和super 只能有一个存在。
+        //不是调用自己的构造  就是调用父类的构造。
+        //super(); // 默认的
+        //super(参数)
+        //给属性赋值
+        //super("fanfan",28);
+    }
+
+
+    @Override
+    public void run() {
+        // super 属性
+        // 从本类 继承 name = zs
+        // 从本类 name = kunkun  没this和super 在本类中找
+        // 从父类 super
+        System.out.println( " Student run "+ super.name );
+
+        //没有 this 和 super 本类
+        //父类 super 没有this 默认this
+        super.sleep();
+    }
+
+
+    @Override
+    public void eat() {
+        System.out.println(" Student eat ");
+    }
+
+    public void sleep(){
+        System.out.println("睡8个小时");
+    }
+}

+ 23 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/super2/Test.java

@@ -0,0 +1,23 @@
+package com.lc.day07.super2;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day07.super2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 10:12
+ * @Version 1.0
+ */
+public class Test {
+    public static void main(String[] args) {
+        //new
+        Student student = new Student();
+
+        System.out.println(student.name);
+        System.out.println(student.age);
+
+        //student.run();
+
+    }
+}

+ 28 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/super3/Test.java

@@ -0,0 +1,28 @@
+package com.lc.day07.super3;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day07.super3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 10:29
+ * @Version 1.0
+ */
+public class Test {
+    public static void main(String[] args) {
+        new B();
+    }
+}
+class A{
+    A(int a){
+        System.out.println("A类有参构造器");
+    }
+}
+class B extends A{
+    B(){
+        //spuer()
+        super(1);
+        System.out.println("B类无参构造器");
+    }
+}

+ 37 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/super4/Dog.java

@@ -0,0 +1,37 @@
+package com.lc.day07.super4;
+
+/**
+ * ClassName: Dog
+ * Package: com.lc.day07.super04
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 11:50
+ * @Version 1.0
+ */
+class Creature {
+    public Creature() {
+        super();// Obj
+        System.out.println("Creature无参数的构造器  1");
+    }
+}
+class Animal extends Creature {
+    public Animal(String name) {
+        //super()
+        System.out.println("Animal带一个参数的构造器,该动物的name为" + name +" 2");
+    }
+    public Animal(String name, int age) {
+        this(name);
+        System.out.println("Animal带两个参数的构造器,其age为" + age+" 3");
+    }
+}
+public class Dog extends Animal {
+    public Dog() {
+        super("汪汪队阿奇", 3);
+        System.out.println("Dog无参数的构造器"+" 4");
+    }
+    public static void main(String[] args) {
+        new Dog();
+    }
+}
+

+ 26 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/test/OtherThing.java

@@ -0,0 +1,26 @@
+package com.lc.day07.test;
+
+/**
+ * ClassName: OtherThing
+ * Package: com.lc.day07.test
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 18:47
+ * @Version 1.0
+ */
+class OtherThing {
+}
+class Something {
+    public static void main(String[] something_to_do) {
+        System.out.println("Do something ...");
+    }
+
+    public int addOne(final int x) {
+        //return ++x;
+         return x + 1;
+    }
+
+
+
+}

+ 23 - 0
01_JavaSe/JavaSe/day07/src/com/lc/day07/test/StaticTest.java

@@ -0,0 +1,23 @@
+package com.lc.day07.test;
+
+/**
+ * ClassName: StaticTest
+ * Package: com.lc.day07.test
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/21 18:44
+ * @Version 1.0
+ */
+public class StaticTest {
+    public static void main(String[] args) {
+        Demo test = null;
+        test.hello();
+    }
+}
+
+class Demo{
+    public static void hello(){
+        System.out.println("hello!");
+    }
+}

+ 29 - 0
01_JavaSe/JavaSe/day08/.gitignore

@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store

+ 11 - 0
01_JavaSe/JavaSe/day08/day08.iml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+    </content>
+    <orderEntry type="jdk" jdkName="17" jdkType="JavaSDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 29 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract5/Animal.java

@@ -0,0 +1,29 @@
+package com.lc.day08.abstract5;
+
+/**
+ * ClassName: Animal
+ * Package: com.lc.day08.abstract5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:34
+ * @Version 1.0
+ */
+public abstract class Animal {
+
+    String name;
+
+    public Animal() {
+    }
+
+    public Animal(String name){
+        this.name = name;
+    }
+
+    //抽象方法
+    //run
+    public abstract void eat();
+
+    //eat
+    public abstract void run();
+}

+ 23 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract5/Cat.java

@@ -0,0 +1,23 @@
+package com.lc.day08.abstract5;
+
+/**
+ * ClassName: Cat
+ * Package: com.lc.day08.abstract5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:36
+ * @Version 1.0
+ */
+public class Cat extends Animal{
+
+    @Override
+    public void eat() {
+        System.out.println("猫在吃");
+    }
+
+    @Override
+    public void run() {
+        System.out.println("猫在跑");
+    }
+}

+ 35 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract5/Test.java

@@ -0,0 +1,35 @@
+package com.lc.day08.abstract5;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day08.abstract5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:38
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+        //不能被创建
+        // Animal animal = new Animal();
+        // 通过 抽象类 声明变量 是符合多态。
+        Animal cat = new Cat();
+
+        //new Animal() 抽象类 子类的
+        Animal animal = new Animal(){
+
+            @Override
+            public void eat() {
+
+            }
+
+            @Override
+            public void run() {
+
+            }
+        };
+
+    }
+}

+ 43 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract6/BankTemplateMethod.java

@@ -0,0 +1,43 @@
+package com.lc.day08.abstract6;
+
+/**
+ * ClassName: BankTemplateMethod
+ * Package: com.lc.day08.abstract6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:58
+ * @Version 1.0
+ */
+public abstract class BankTemplateMethod {
+
+    //步骤
+
+    //排号
+    public int takeNumber(){
+        return (int) (Math.random()*1000);
+    }
+
+    //办理业务
+    public abstract void service();
+
+
+    //评价
+    public static String eav(){
+        return (Math.random()*10)+"-星好评" ;
+    }
+
+    //模板方法
+    public static void templateMethod( BankTemplateMethod templateMethod ){
+        //获取号码
+        int i = templateMethod.takeNumber();
+        System.out.println(i);
+
+        //业务
+        templateMethod.service();
+
+        //评价
+        System.out.println(eav());
+    }
+
+}

+ 17 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract6/Employee.java

@@ -0,0 +1,17 @@
+package com.lc.day08.abstract6;
+
+/**
+ * ClassName: Employee
+ * Package: com.lc.day08.abstract6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 15:02
+ * @Version 1.0
+ */
+public class Employee extends BankTemplateMethod{
+    @Override
+    public void service() {
+        System.out.println("取钱业务");
+    }
+}

+ 20 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/abstract6/Test.java

@@ -0,0 +1,20 @@
+package com.lc.day08.abstract6;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day08.abstract6
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 15:05
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+
+        Employee employee = new Employee();
+
+        employee.templateMethod(employee);
+    }
+}

+ 33 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer1/Son.java

@@ -0,0 +1,33 @@
+package com.lc.day08.exer.exer1;
+
+/**
+ * ClassName: Son
+ * Package: com.lc.day08.exer.exer1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 11:23
+ * @Version 1.0
+ */
+class Father {
+    static {	System.out.println("11111111111");	}
+    { 	System.out.println("22222222222");	}
+    public Father() {
+        System.out.println("33333333333");
+    }
+}
+public class Son extends Father {
+    static {	System.out.println("44444444444");	}
+    {	System.out.println("55555555555");	}
+    public Son() {
+        System.out.println("66666666666");
+    }
+    public static void main(String[] args) {
+        System.out.println("************************");
+        new Son();
+        System.out.println("************************");
+        new Son();
+        System.out.println("************************");
+        new Father();
+    }
+}

+ 56 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer2/Test04.java

@@ -0,0 +1,56 @@
+package com.lc.day08.exer.exer2;
+
+/**
+ * ClassName: Test04
+ * Package: com.lc.day08.exer.exer2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 11:28
+ * @Version 1.0
+ */
+public class Test04 {
+    public static void main(String[] args) {
+        Zi zi = new Zi();
+    }
+}
+class Fu{
+    private static int i = getNum("(1)i");
+    private int j = getNum("(2)j"); //静态完 成员初始化
+    static{
+        print("(3)父类静态代码块");
+    }
+    {
+        print("(4)父类非静态代码块,又称为构造代码块");
+    }
+    Fu(){
+        print("(5)父类构造器");
+    }
+    public static void print(String str){
+        System.out.println(str + "->" + i);
+    }
+    public static int getNum(String str){
+        print(str);
+        return ++i;
+    }
+}
+class Zi extends Fu{
+    private static int k = getNum("(6)k");
+    private int h = getNum("(7)h");
+    static{
+        print("(8)子类静态代码块");
+    }
+    {
+        print("(9)子类非静态代码块,又称为构造代码块");
+    }
+    Zi(){
+        print("(10)子类构造器");
+    }
+    public static void print(String str){
+        System.out.println(str + "->" + k);
+    }
+    public static int getNum(String str){
+        print(str);
+        return ++k;
+    }
+}

+ 17 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer3/Something.java

@@ -0,0 +1,17 @@
+package com.lc.day08.exer.exer3;
+
+/**
+ * ClassName: Something
+ * Package: com.lc.day08.exer.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:22
+ * @Version 1.0
+ */
+public class Something {
+    public int addOne(final int x) {
+        //return ++x; // 自身加1 不能改
+        return x + 1;
+    }
+}

+ 26 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer3/Something1.java

@@ -0,0 +1,26 @@
+package com.lc.day08.exer.exer3;
+
+/**
+ * ClassName: Something1
+ * Package: com.lc.day08.exer.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:25
+ * @Version 1.0
+ */
+public class Something1 {
+    public static void main(String[] args) {
+        Other o = new Other(); // 地址 0x1122 属性 i = 0;
+        new Something1().addOne(o);
+    }
+    public void addOne(final Other o) {
+        // final Other o;
+        // o = 0x1122 final 赋值一次
+        // o = new Other(); //赋值2次
+        o.i++;
+    }
+}
+class Other {
+    public int i;
+}

+ 23 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer4/RiverBarge.java

@@ -0,0 +1,23 @@
+package com.lc.day08.exer.exer4;
+
+/**
+ * ClassName: RiverBarge
+ * Package: com.lc.day08.exer.exer4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:51
+ * @Version 1.0
+ */
+public class RiverBarge extends Vehicle{
+
+    @Override
+    public double calculateFuel() {
+        return 0;
+    }
+
+    @Override
+    public double calculateDistance() {
+        return 0;
+    }
+}

+ 23 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer4/Truck.java

@@ -0,0 +1,23 @@
+package com.lc.day08.exer.exer4;
+
+/**
+ * ClassName: Truck
+ * Package: com.lc.day08.exer.exer4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:51
+ * @Version 1.0
+ */
+public class Truck extends Vehicle{
+
+    @Override
+    public double calculateFuel() {
+        return 0;
+    }
+
+    @Override
+    public double calculateDistance() {
+        return 0;
+    }
+}

+ 20 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer4/Vehicle.java

@@ -0,0 +1,20 @@
+package com.lc.day08.exer.exer4;
+
+/**
+ * ClassName: Vehicle
+ * Package: com.lc.day08.exer.exer4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:49
+ * @Version 1.0
+ */
+public abstract class Vehicle {
+
+    //计算燃料
+    public abstract double calculateFuel();
+
+    //计算距离
+    public abstract double calculateDistance();
+
+}

+ 65 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/Employee.java

@@ -0,0 +1,65 @@
+package com.lc.day08.exer.exer5;
+
+/**
+ * ClassName: Employee
+ * Package: com.lc.day08.exer.exer5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 15:32
+ * @Version 1.0
+ */
+public abstract class Employee {
+
+    private String name;
+    private int number;
+
+    //生日
+    private MyDate birthday;
+
+    //薪资
+    public abstract double earnings();
+
+    public Employee() {
+    }
+
+    public Employee(String name, int number, MyDate birthday) {
+        this.name = name;
+        this.number = number;
+        this.birthday = birthday;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getNumber() {
+        return number;
+    }
+
+    public void setNumber(int number) {
+        this.number = number;
+    }
+
+    public MyDate getBirthday() {
+        return birthday;
+    }
+
+    public void setBirthday(MyDate birthday) {
+        this.birthday = birthday;
+    }
+
+
+    @Override
+    public String toString() {
+        return "Employee{" +
+                "name='" + name + '\'' +
+                ", number=" + number +
+                ", birthday=" + birthday +
+                '}';
+    }
+}

+ 33 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/HourlyEmployee.java

@@ -0,0 +1,33 @@
+package com.lc.day08.exer.exer5;
+
+/**
+ * ClassName: HourlyEmployee
+ * Package: com.lc.day08.exer.exer5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 15:39
+ * @Version 1.0
+ */
+public class HourlyEmployee extends Employee{
+
+    private int wage;
+    private int hour;
+
+    @Override
+    public double earnings() {
+        return wage*hour*30;
+    }
+
+    public HourlyEmployee(int wage, int hour) {
+        this.wage = wage;
+        this.hour = hour;
+    }
+
+    public HourlyEmployee(String name, int number, MyDate birthday, int wage, int hour) {
+        super(name, number, birthday);
+        this.wage = wage;
+        this.hour = hour;
+    }
+
+}

+ 55 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/MyDate.java

@@ -0,0 +1,55 @@
+package com.lc.day08.exer.exer5;
+
+/**
+ * ClassName: MyDate
+ * Package: com.lc.day08.exer.exer5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 15:33
+ * @Version 1.0
+ */
+public class MyDate {
+
+    private int year;
+    private int month;
+    private int day;
+
+    public MyDate() {
+    }
+
+    public MyDate(int year, int month, int day) {
+        this.year = year;
+        this.month = month;
+        this.day = day;
+    }
+
+    public int getYear() {
+        return year;
+    }
+
+    public void setYear(int year) {
+        this.year = year;
+    }
+
+    public int getMonth() {
+        return month;
+    }
+
+    public void setMonth(int month) {
+        this.month = month;
+    }
+
+    public int getDay() {
+        return day;
+    }
+
+    public void setDay(int day) {
+        this.day = day;
+    }
+
+    @Override
+    public String toString() {
+        return  year +"-年-" + month + "-月" + day +"日";
+    }
+}

+ 68 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/PayrollSystem.java

@@ -0,0 +1,68 @@
+package com.lc.day08.exer.exer5;
+
+import java.util.Scanner;
+
+/**
+ * ClassName: PayrollSystem
+ * Package: com.lc.day08.exer.exer5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 15:40
+ * @Version 1.0
+ */
+public class PayrollSystem {
+    public static void main(String[] args) {
+        Employee[] employees = new Employee[2];
+
+        SalariedEmployee salariedEmployee = new SalariedEmployee();
+
+        salariedEmployee.setMonthlySalary(18000);
+        salariedEmployee.setName("kunkun");
+        salariedEmployee.setNumber(1001);
+        //生日
+        MyDate myDate = new MyDate();
+        myDate.setYear(2023);
+        myDate.setMonth(10);
+        myDate.setDay(22);
+        salariedEmployee.setBirthday(myDate);
+
+
+        Employee hourlyEmployee = new HourlyEmployee(30,4);
+
+        hourlyEmployee.setName("zhangsan");
+        hourlyEmployee.setNumber(2001);
+        //生日
+        myDate = new MyDate();
+
+        myDate.setYear(2000);
+        myDate.setMonth(7);
+        myDate.setDay(22);
+        hourlyEmployee.setBirthday(myDate);
+
+        employees[0] = salariedEmployee;
+        employees[1] = hourlyEmployee;
+
+        //遍历
+        for (int i = 0; i < employees.length; i++) {
+            System.out.println(employees[i].toString());
+        }
+
+        //当键盘输入本月月份值时,如果本月是某个Employee对象的生日,还要输出增加工资信息
+        Scanner scanner = new Scanner(System.in);
+
+        System.out.println("请输入月份");
+        int m = scanner.nextInt();
+
+        for (int i = 0; i < employees.length; i++) {
+            Employee employee = employees[i];
+            if (m == employee.getBirthday().getMonth()){
+                double v = employee.earnings() + 100;
+                System.out.println("原薪资"+employee.earnings() + "-"+employee);
+                System.out.println("原薪资+100----"+v);
+            }
+        }
+
+
+    }
+}

+ 28 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/exer/exer5/SalariedEmployee.java

@@ -0,0 +1,28 @@
+package com.lc.day08.exer.exer5;
+
+/**
+ * ClassName: SalariedEmployee
+ * Package: com.lc.day08.exer.exer5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 15:37
+ * @Version 1.0
+ */
+public class SalariedEmployee extends Employee {
+
+    private double monthlySalary;
+
+    @Override
+    public double earnings() {
+        return monthlySalary;
+    }
+
+    public double getMonthlySalary() {
+        return monthlySalary;
+    }
+
+    public void setMonthlySalary(double monthlySalary) {
+        this.monthlySalary = monthlySalary;
+    }
+}

+ 18 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/final5/SmallStudent.java

@@ -0,0 +1,18 @@
+package com.lc.day08.final5;
+
+/**
+ * ClassName: SmallStudent
+ * Package: com.lc.day08.final5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:14
+ * @Version 1.0
+ */
+public class SmallStudent extends Student{
+
+//    final void say(){
+//        System.out.println("say");
+//    }
+
+}

+ 17 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/final5/Student.java

@@ -0,0 +1,17 @@
+package com.lc.day08.final5;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day08.final5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:14
+ * @Version 1.0
+ */
+public /*final*/ class Student {
+
+    final void say(){
+        System.out.println("say");
+    }
+}

+ 24 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/final5/Test.java

@@ -0,0 +1,24 @@
+package com.lc.day08.final5;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day08.final5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 14:14
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+
+        final int a = 10;
+        //a=11;
+
+        final  int b ;
+        b = 20;
+        //b = 40;
+
+    }
+}

+ 23 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface10/USB.java

@@ -0,0 +1,23 @@
+package com.lc.day08.inte.interface10;
+
+/**
+ * ClassName: USB
+ * Package: com.lc.day08.inte.interface10
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:11
+ * @Version 1.0
+ */
+public interface USB extends USB2,USB3{
+
+    @Override
+    default void start() {
+        USB2.super.start();
+    }
+
+    @Override
+    default void stop() {
+        USB2.super.stop();
+    }
+}

+ 32 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface10/USB2.java

@@ -0,0 +1,32 @@
+package com.lc.day08.inte.interface10;
+
+/**
+ * ClassName: USB2
+ * Package: com.lc.day08.inte.interface10
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:10
+ * @Version 1.0
+ */
+public interface USB2 {
+    //静态常量
+    long MAX_SPEED = 60*1024*1024;//60MB/s
+
+    //抽象方法
+    void in();
+    void out();
+
+    //默认方法
+    public default void start(){
+        System.out.println("开始");
+    }
+    public default void stop(){
+        System.out.println("结束");
+    }
+
+    //静态方法
+    public static void show(){
+        System.out.println("USB 2.0可以高速地进行读写操作");
+    }
+}

+ 31 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface10/USB3.java

@@ -0,0 +1,31 @@
+package com.lc.day08.inte.interface10;
+
+/**
+ * ClassName: Usb3
+ * Package: com.lc.day08.interface7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:42
+ * @Version 1.0
+ */
+public interface USB3 {
+
+    //常量 = 不能改变 final static
+    // public static  final  int  tranfer  =  100;
+    int  TRANFER  =  100; //ctrl + shirt + u 变大写
+
+    void in();
+
+    void out();
+
+    //默认方法
+    public default void start(){
+        System.out.println("开始");
+    }
+    public default void stop(){
+        System.out.println("结束");
+    }
+
+
+}

+ 14 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface11/A.java

@@ -0,0 +1,14 @@
+package com.lc.day08.inte.interface11;
+
+/**
+ * ClassName: A
+ * Package: com.lc.day08.inte.interface11
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:14
+ * @Version 1.0
+ */
+public class A {
+    int x = 1;
+}

+ 15 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface11/B.java

@@ -0,0 +1,15 @@
+package com.lc.day08.inte.interface11;
+
+/**
+ * ClassName: B
+ * Package: com.lc.day08.inte.interface11
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:14
+ * @Version 1.0
+ */
+public interface B {
+    int x = 2;
+    int y = 2;
+}

+ 14 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface11/C.java

@@ -0,0 +1,14 @@
+package com.lc.day08.inte.interface11;
+
+/**
+ * ClassName: C
+ * Package: com.lc.day08.inte.interface11
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:14
+ * @Version 1.0
+ */
+public interface C {
+    int x = 3;
+}

+ 22 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface11/D.java

@@ -0,0 +1,22 @@
+package com.lc.day08.inte.interface11;
+
+/**
+ * ClassName: D
+ * Package: com.lc.day08.inte.interface11
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:14
+ * @Version 1.0
+ */
+public class D extends A implements B,C {
+
+
+    public void main(String[] args) {
+        //System.out.println("x = " + x);//模糊不清
+        System.out.println("super.x = " + super.x);
+        System.out.println("B.x = " + B.x);
+        System.out.println("C.x = " + C.x);
+        System.out.println("y = " + y);//没有重名问题,可以直接访问
+    }
+}

+ 14 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Compter.java

@@ -0,0 +1,14 @@
+package com.lc.day08.inte.interface7;
+
+/**
+ * ClassName: Compter
+ * Package: com.lc.day08.interface7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:54
+ * @Version 1.0
+ */
+public class Compter {
+
+}

+ 32 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Flash.java

@@ -0,0 +1,32 @@
+package com.lc.day08.inte.interface7;
+
+/**
+ * ClassName: Flash
+ * Package: com.lc.day08.interface7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:55
+ * @Version 1.0
+ */
+public class Flash implements Usb3 {
+
+    @Override
+    public void in() {
+        System.out.println("无 输入信号");
+    }
+
+    @Override
+    public void out() {
+        System.out.println("输出信号");
+    }
+
+    //重写默认  需要 把default去掉
+    @Override
+    public void defaultMethod() {
+        //调用父类的默认。
+        //类名.super.默认方法名称
+        //Usb3.super.defaultMethod();
+        System.out.println(" 重写 默认方法");
+    }
+}

+ 25 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Mouse.java

@@ -0,0 +1,25 @@
+package com.lc.day08.inte.interface7;
+
+/**
+ * ClassName: Mouse
+ * Package: com.lc.day08.interface7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:46
+ * @Version 1.0
+ */
+public class Mouse extends Compter implements Usb3 {
+    //实现方法
+    //红线 自动 解决 alt + enter
+    @Override
+    public void in() {
+        System.out.println(" 输入信号");
+    }
+
+    @Override
+    public void out() {
+        System.out.println(" 无 输出信号");
+    }
+
+}

+ 50 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Test.java

@@ -0,0 +1,50 @@
+package com.lc.day08.inte.interface7;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day08.interface7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:50
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+
+        //继承  接口
+        Usb3 m = new Mouse();
+
+        m.in();
+        m.out();
+        //默认
+        m.defaultMethod();
+        //类名.方法
+        Usb3.staticMethod();
+
+
+        Usb3 f = new Flash();
+
+        //重写
+        f.defaultMethod();
+
+        //接口不能实例化
+        //Usb3 usb3 = new Usb3();
+        // new 接口  是接口子类
+        new Usb3(){
+            @Override
+            public void in() {
+
+            }
+
+            @Override
+            public void out() {
+
+            }
+        };
+
+
+
+    }
+}

+ 38 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface7/Usb3.java

@@ -0,0 +1,38 @@
+package com.lc.day08.inte.interface7;
+
+/**
+ * ClassName: Usb3
+ * Package: com.lc.day08.interface7
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:42
+ * @Version 1.0
+ */
+public interface Usb3 {
+
+    //常量 = 不能改变 final static
+    // public static  final  int  tranfer  =  100;
+    int  TRANFER  =  100; //ctrl + shirt + u 变大写
+
+    void in();
+
+    void out();
+
+    //默认
+    default void defaultMethod(){
+        System.out.println("default");
+    }
+
+    //静态
+    static void staticMethod(){
+        System.out.println("static");
+    }
+
+    //私有
+    private void privateMethod(){
+        System.out.println("private");
+    }
+
+
+}

+ 13 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface8/A.java

@@ -0,0 +1,13 @@
+package com.lc.day08.inte.interface8;
+
+/**
+ * ClassName: A
+ * Package: com.lc.day08.interface8
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:57
+ * @Version 1.0
+ */
+public interface A {
+}

+ 13 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface8/B.java

@@ -0,0 +1,13 @@
+package com.lc.day08.inte.interface8;
+
+/**
+ * ClassName: B
+ * Package: com.lc.day08.interface8
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:57
+ * @Version 1.0
+ */
+public interface B {
+}

+ 13 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface8/C.java

@@ -0,0 +1,13 @@
+package com.lc.day08.inte.interface8;
+
+/**
+ * ClassName: C
+ * Package: com.lc.day08.interface8
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:58
+ * @Version 1.0
+ */
+public class C implements A,B{
+}

+ 13 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface8/D.java

@@ -0,0 +1,13 @@
+package com.lc.day08.inte.interface8;
+
+/**
+ * ClassName: D
+ * Package: com.lc.day08.interface8
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 16:59
+ * @Version 1.0
+ */
+public interface D extends A,B{
+}

+ 16 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/BoyFriend.java

@@ -0,0 +1,16 @@
+package com.lc.day08.inte.interface9;
+
+/**
+ * ClassName: BoyFriend
+ * Package: com.lc.day08.inte.interface9
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:08
+ * @Version 1.0
+ */
+public interface BoyFriend {
+    default void date(){//约会
+        System.out.println("神秘约会");
+    }
+}

+ 16 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/Father.java

@@ -0,0 +1,16 @@
+package com.lc.day08.inte.interface9;
+
+/**
+ * ClassName: Father
+ * Package: com.lc.day08.interface9
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:04
+ * @Version 1.0
+ */
+public class Father {
+    public void date(){//约会
+        System.out.println("爸爸约吃饭");
+    }
+}

+ 16 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/Friend.java

@@ -0,0 +1,16 @@
+package com.lc.day08.inte.interface9;
+
+/**
+ * ClassName: Friend
+ * Package: com.lc.day08.interface9
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:04
+ * @Version 1.0
+ */
+public interface Friend {
+    default void date(){//约会
+        System.out.println("吃喝玩乐");
+    }
+}

+ 32 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/Son.java

@@ -0,0 +1,32 @@
+package com.lc.day08.inte.interface9;
+
+/**
+ * ClassName: Son
+ * Package: com.lc.day08.interface9
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:04
+ * @Version 1.0
+ */
+public class Son /*extends Father*/ implements Friend , BoyFriend{
+    //必须选择一个
+    @Override
+    public void date() {
+        //必须选择
+        BoyFriend.super.date();
+    }
+    //ctrl + shirl + /
+//    @Override
+//    public void date() {
+//        //父类的
+//        //super.date();
+//        //接口
+//        Friend.super.date();
+//        // 大有游戏
+//        System.out.println("打游戏");
+//    }
+
+
+
+}

+ 19 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/inte/interface9/Test.java

@@ -0,0 +1,19 @@
+package com.lc.day08.inte.interface9;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day08.interface9
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 17:05
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+        Son son = new Son();
+        //类有优先原则
+        son.date();
+    }
+}

+ 34 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/keyword4/Person.java

@@ -0,0 +1,34 @@
+package com.lc.day08.keyword4;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day08.keyword4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 11:11
+ * @Version 1.0
+ */
+public class Person {
+
+    static double salary ;
+    String name;
+
+    static {
+        System.out.println("静态1");
+        salary = 1000;
+    }
+
+    static {
+        System.out.println("静态2");
+        salary = 2000;
+    }
+
+    {
+        System.out.println("非静态");
+    }
+
+    public Person() {
+        System.out.println("Person构造");
+    }
+}

+ 51 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/keyword4/Student.java

@@ -0,0 +1,51 @@
+package com.lc.day08.keyword4;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day08.keyword4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 11:03
+ * @Version 1.0
+ */
+public class Student {
+
+    String name;
+    int age;
+
+    //代码块
+    // 属性赋值
+    // 中性特点  构造执行一次 跟着执行一次
+    // 多个代码块  从上倒下执行
+    // 优先构造 执行
+    {
+        System.out.println("代码块执行");
+        name = "zs";
+        age = 20;
+    }
+
+    {
+        name = "kk";
+        age = 28;
+    }
+
+    public Student() {
+        name = "lisi";
+        age = 25;
+    }
+
+    public Student(String name, int age) {
+        this.name = name;
+        this.age = age;
+    }
+
+
+    @Override
+    public String toString() {
+        return "Student{" +
+                "name='" + name + '\'' +
+                ", age=" + age +
+                '}';
+    }
+}

+ 31 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/keyword4/TestPerson.java

@@ -0,0 +1,31 @@
+package com.lc.day08.keyword4;
+
+/**
+ * ClassName: TestPerson
+ * Package: com.lc.day08.keyword4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 11:14
+ * @Version 1.0
+ */
+public class TestPerson {
+
+
+    public static void main(String[] args) {
+        //静态的代码块
+
+        //第一次使用 加载Person 进行初始化 类初始化
+        //静态代码块就会执行
+        //多个 从上倒下 执行
+        //System.out.println(Person.salary);
+
+        //构造方法和代码块执行
+        // 静态代码块 优先 最高  代码块  构造
+        // 第一次使用 执行  执行一次
+        Person person = new Person();
+
+        System.out.println(Person.salary);
+    }
+
+}

+ 30 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/keyword4/TestStudent.java

@@ -0,0 +1,30 @@
+package com.lc.day08.keyword4;
+
+/**
+ * ClassName: TestStudent
+ * Package: com.lc.day08.keyword4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 11:05
+ * @Version 1.0
+ */
+public class TestStudent {
+
+    public static void main(String[] args) {
+        //new
+        Student student1 = new Student();
+        Student student2 = new Student();
+
+        System.out.println(student1);
+        System.out.println(student2);
+
+
+        // name ? age ?
+        Student student = new Student();
+        System.out.println(student);
+
+        // name kk age 28
+
+    }
+}

+ 29 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/singleton3/Singleton1.java

@@ -0,0 +1,29 @@
+package com.lc.day08.singleton3;
+
+/**
+ * ClassName: Singleton1
+ * Package: com.lc.day08.singleton3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 10:36
+ * @Version 1.0
+ */
+public class Singleton1 {
+
+    //声明静态实例 一份
+    private static Singleton1 singleton1 =  new Singleton1();
+
+    //构造方法 私有化
+    private Singleton1(){
+
+    }
+
+    //提供访问方法
+    public static Singleton1 getSingleton1(){
+        return singleton1;
+    }
+
+
+
+}

+ 33 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/singleton3/Singleton2.java

@@ -0,0 +1,33 @@
+package com.lc.day08.singleton3;
+
+/**
+ * ClassName: Singleton1
+ * Package: com.lc.day08.singleton3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 10:36
+ * @Version 1.0
+ */
+public class Singleton2 {
+
+    //声明静态实例 一份
+    private static Singleton2 singleton2;
+
+    //构造方法 私有化
+    private Singleton2(){
+
+    }
+
+    //提供访问方法
+    public static Singleton2 getSingleton2(){
+        if (singleton2 == null){
+            //赋值
+            singleton2 = new Singleton2();
+            return singleton2;
+        }else {
+            return singleton2;
+        }
+    }
+
+}

+ 30 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/singleton3/Test.java

@@ -0,0 +1,30 @@
+package com.lc.day08.singleton3;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day08.singleton3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 10:36
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+        //不允许创建对象
+        //Singleton1 singleton1 = new Singleton1();
+
+        Singleton1 singleton1 = Singleton1.getSingleton1();
+        Singleton1 singleton2 = Singleton1.getSingleton1();
+        //true 只有一个
+        System.out.println(singleton1 == singleton2);
+
+
+        //测试 懒汉式
+        Singleton2 singleton3 = Singleton2.getSingleton2();
+        Singleton2 singleton4 = Singleton2.getSingleton2();
+
+        System.out.println(singleton3==singleton4);
+    }
+}

+ 37 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/static1/Person.java

@@ -0,0 +1,37 @@
+package com.lc.day08.static1;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day08.static1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 9:37
+ * @Version 1.0
+ */
+public class Person {
+
+    String name;
+    int age;
+
+    //国籍
+    static String nation = "中国";
+
+    public Person() {
+    }
+
+    public Person(String name, int age, String nation) {
+        this.name = name;
+        this.age = age;
+        this.nation = nation;
+    }
+
+    @Override
+    public String toString() {
+        return "Person{" +
+                "name='" + name + '\'' +
+                ", age=" + age +
+                ", nation='" + nation + '\'' +
+                '}';
+    }
+}

+ 62 - 0
01_JavaSe/JavaSe/day08/src/com/lc/day08/static1/Test.java

@@ -0,0 +1,62 @@
+package com.lc.day08.static1;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day08.static1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/22 9:38
+ * @Version 1.0
+ */
+public class Test {
+    public static void main(String[] args) {
+
+        //new
+        Person person1 = new Person("zs",22,"中国");
+        Person person2 = new Person("zs",22,"中国");
+        Person person3 = new Person("zs",22,"中国");
+
+        //new Person()  所有中国共有
+        Person p1 = new Person();
+        System.out.println(p1);
+
+
+        Person p2 = null;
+        System.out.println(p2.nation);
+
+        p1.nation = "民国";
+
+        Person p3 = new Person();
+        System.out.println(p3);
+
+        System.out.println(p1);
+        System.out.println(p2);
+        //没有 占内存空间
+
+        //static 修饰之后变为类共有的
+        // 类中只有一份
+        // 修改  所有都是修改过后的。
+
+        //内存图
+
+        //类变量 类名 调用 静态属性  推荐
+        // 类名.属性
+        System.out.println(Person.nation);
+
+        Person.nation = "中华人民共和国";
+
+        System.out.println(p1.nation);
+
+
+        //
+
+    }
+
+    //普通方法 调用静态变量
+    public void show(){
+        //先后
+        System.out.println(Person.nation);
+    }
+
+}

Some files were not shown because too many files changed in this diff