xerga 1 рік тому
батько
коміт
bd3a9a9af7
74 змінених файлів з 1362 додано та 75 видалено
  1. 1 0
      01_JavaSe/JavaSe/.idea/modules.xml
  2. 79 75
      01_JavaSe/JavaSe/.idea/workspace.xml
  3. 29 0
      01_JavaSe/JavaSe/day06/.gitignore
  4. 11 0
      01_JavaSe/JavaSe/day06/day06.iml
  5. 21 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance04/Person.java
  6. 29 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance04/Student.java
  7. 24 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance04/Test.java
  8. 18 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance05/Animal.java
  9. 14 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance05/Cat.java
  10. 15 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance05/Dog.java
  11. 28 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance06/Test.java
  12. 36 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/constructor2/Student.java
  13. 25 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/constructor2/TestStudent.java
  14. 63 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/encapsulation1/ArrayUtil.java
  15. 40 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/encapsulation1/Person.java
  16. 22 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/encapsulation1/TestArrayUtil.java
  17. 26 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/encapsulation1/TestPerson.java
  18. 30 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer1/Person.java
  19. 21 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer1/TestPerson.java
  20. 58 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer2/Book.java
  21. 22 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer2/TestBook.java
  22. 70 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer3/Account.java
  23. 49 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer3/Customer.java
  24. 38 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer3/Test.java
  25. 46 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer4/Boy.java
  26. 55 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer4/Girl.java
  27. 27 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer4/TestBoy.java
  28. 44 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer5/Account.java
  29. 44 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer5/Bank.java
  30. 50 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer5/Customer.java
  31. 35 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer5/Test.java
  32. 87 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/recursion/Demo01.java
  33. 28 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this1/DemoThis.java
  34. 40 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this1/Person.java
  35. 36 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this1/Rectangle.java
  36. 81 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this2/Student.java
  37. 20 0
      01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this2/TestStudent.java
  38. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance04/Person.class
  39. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance04/Student.class
  40. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance04/Test.class
  41. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance05/Animal.class
  42. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance05/Cat.class
  43. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance05/Dog.class
  44. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/A.class
  45. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/B.class
  46. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/C.class
  47. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/D.class
  48. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/Test.class
  49. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/constructor2/Student.class
  50. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/constructor2/TestStudent.class
  51. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/encapsulation1/ArrayUtil.class
  52. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/encapsulation1/Person.class
  53. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/encapsulation1/TestArrayUtil.class
  54. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/encapsulation1/TestPerson.class
  55. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer1/Person.class
  56. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer1/TestPerson.class
  57. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer2/Book.class
  58. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer2/TestBook.class
  59. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer3/Account.class
  60. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer3/Customer.class
  61. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer3/Test.class
  62. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer4/Boy.class
  63. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer4/Girl.class
  64. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer4/TestBoy.class
  65. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer5/Account.class
  66. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer5/Bank.class
  67. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer5/Customer.class
  68. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer5/Test.class
  69. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/recursion/Demo01.class
  70. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this1/DemoThis.class
  71. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this1/Person.class
  72. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this1/Rectangle.class
  73. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this2/Student.class
  74. BIN
      01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this2/TestStudent.class

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

@@ -8,6 +8,7 @@
       <module fileurl="file://$PROJECT_DIR$/day03/day03.iml" filepath="$PROJECT_DIR$/day03/day03.iml" />
       <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" />
     </modules>
   </component>
 </project>

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

@@ -5,51 +5,39 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="12140050-64bb-493c-b359-1ac1fbbf3cc2" name="Changes" comment="">
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArr01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArr02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArr03.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArr04.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArr05.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArr06.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArr07.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArrArr08.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArrArr09.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArrArr10.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/DemoArrArr11.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/Test01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/exer/Exer01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/exer/Exer02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/exer/Exer03.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/exer/Exer04.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/exer/Exer05.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/exer/Exer06.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/exer/Exer07.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day04/src/com/lc/day04/exer/Exer08.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/arr/Student.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/arr/TestStudent.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer1/Cat.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer1/TestCat.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer2/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer2/TestPerson.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer3/Circle.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer3/TestCircle.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer4/TestMethod.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer5/StringTools.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/exer/exer5/StringToolsTest.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/method1/DemoMethod01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/method1/DemoMethod02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/method2/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/obj/DemoObject01.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/obj/DemoObject02.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/obj/Person.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/overload1/DemoOverloadMethod.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/overload1/DemoOverloadMethod1.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/overload1/DemoOverloadMethod2.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/param/Param1.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/param/Param2.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/param/Pserson.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/recursion/RecursionMethod.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/day05/src/com/lc/day05/recursion/RecursionMethod1.java" afterDir="false" />
+      <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" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -104,20 +92,20 @@
 }</component>
   <component name="RecentsManager">
     <key name="CopyClassDialog.RECENTS_KEY">
+      <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" />
-      <recent name="com.lc.day05.param" />
-      <recent name="com.lc.day05.exer.exer5" />
-      <recent name="com.lc.day05.overload1" />
-      <recent name="com.lc.day05.method1" />
     </key>
   </component>
-  <component name="RunManager" selected="Application.RecursionMethod1">
-    <configuration name="Param1" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day05.param.Param1" />
-      <module name="day05" />
+  <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" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day05.param.*" />
+          <option name="PATTERN" value="com.lc.day06.this03.this1.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
@@ -125,12 +113,12 @@
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="Param2" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day05.param.Param2" />
-      <module name="day05" />
+    <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" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day05.param.*" />
+          <option name="PATTERN" value="com.lc.day06.exer3.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
@@ -138,12 +126,12 @@
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="RecursionMethod" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day05.recursion.RecursionMethod" />
-      <module name="day05" />
+    <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" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day05.recursion.*" />
+          <option name="PATTERN" value="com.lc.day06.Inheritance04.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
@@ -151,12 +139,12 @@
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="RecursionMethod1" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day05.recursion.RecursionMethod1" />
-      <module name="day05" />
+    <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" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day05.recursion.*" />
+          <option name="PATTERN" value="com.lc.day06.exer.exer5.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
@@ -164,12 +152,12 @@
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration name="StringToolsTest" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
-      <option name="MAIN_CLASS_NAME" value="com.lc.day05.exer.exer5.StringToolsTest" />
-      <module name="day05" />
+    <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" />
       <extension name="coverage">
         <pattern>
-          <option name="PATTERN" value="com.lc.day05.exer.exer5.*" />
+          <option name="PATTERN" value="com.lc.day06.this03.this2.*" />
           <option name="ENABLED" value="true" />
         </pattern>
       </extension>
@@ -179,11 +167,11 @@
     </configuration>
     <recent_temporary>
       <list>
-        <item itemvalue="Application.RecursionMethod1" />
-        <item itemvalue="Application.RecursionMethod" />
-        <item itemvalue="Application.Param2" />
-        <item itemvalue="Application.Param1" />
-        <item itemvalue="Application.StringToolsTest" />
+        <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" />
       </list>
     </recent_temporary>
   </component>
@@ -201,6 +189,7 @@
       <workItem from="1689468088880" duration="17301000" />
       <workItem from="1689643884392" duration="16542000" />
       <workItem from="1689672101731" duration="69000" />
+      <workItem from="1689727752702" duration="14494000" />
     </task>
     <servers />
   </component>
@@ -250,6 +239,21 @@
           <line>23</line>
           <option name="timeStamp" value="13" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day06/src/com/lc/day06/this03/this1/DemoThis.java</url>
+          <line>14</line>
+          <option name="timeStamp" value="17" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day06/src/com/lc/day06/this03/this1/Person.java</url>
+          <line>16</line>
+          <option name="timeStamp" value="18" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/day06/src/com/lc/day06/this03/this1/Person.java</url>
+          <line>32</line>
+          <option name="timeStamp" value="19" />
+        </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
   </component>

+ 29 - 0
01_JavaSe/JavaSe/day06/.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/day06/day06.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>

+ 21 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance04/Person.java

@@ -0,0 +1,21 @@
+package com.lc.day06.Inheritance04;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day06.Inheritance04
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 16:10
+ * @Version 1.0
+ */
+public class Person {
+    public String name;
+    public int age;
+
+
+    public void eat(){
+        System.out.println("eat");
+    }
+
+}

+ 29 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance04/Student.java

@@ -0,0 +1,29 @@
+package com.lc.day06.Inheritance04;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day06.Inheritance04
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 16:10
+ * @Version 1.0
+ */
+//继承 父类 就会继承属性
+// 只能继承非私有的属性
+public class Student extends Person {
+    //扩展 属性
+    public String schoolName;
+
+    public Student( String name , String schoolName ) {
+        this.name = name;
+        this.schoolName = schoolName;
+    }
+
+    public void showInfo(){
+        //this 本类 父类
+        //先找局部  本类  父类
+        System.out.println("name:" +name+" schoolName:"+schoolName);
+    }
+
+}

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

@@ -0,0 +1,24 @@
+package com.lc.day06.Inheritance04;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day06.Inheritance04
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 16:15
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+
+        Student student = new Student("kunkun","IKun大学");
+        //name 继承的属性
+        student.showInfo();
+        //eat 继承方法
+        student.eat();
+
+    }
+
+}

+ 18 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance05/Animal.java

@@ -0,0 +1,18 @@
+package com.lc.day06.Inheritance05;
+
+/**
+ * ClassName: Animal
+ * Package: com.lc.day06.Inheritance05
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 16:20
+ * @Version 1.0
+ */
+public class Animal {
+    //抽取 共同的属性
+    String name;
+
+    int age;
+
+}

+ 14 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance05/Cat.java

@@ -0,0 +1,14 @@
+package com.lc.day06.Inheritance05;
+
+/**
+ * ClassName: Cat
+ * Package: com.lc.day06.Inheritance05
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 16:19
+ * @Version 1.0
+ */
+public class Cat extends Animal {
+
+}

+ 15 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance05/Dog.java

@@ -0,0 +1,15 @@
+package com.lc.day06.Inheritance05;
+
+/**
+ * ClassName: Dog
+ * Package: com.lc.day06.Inheritance05
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 16:19
+ * @Version 1.0
+ */
+public class Dog extends Animal {
+
+
+}

+ 28 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/Inheritance06/Test.java

@@ -0,0 +1,28 @@
+package com.lc.day06.Inheritance06;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day06.Inheritance06
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 16:25
+ * @Version 1.0
+ */
+public class Test {
+}
+
+class A{
+
+}
+class B extends A{
+
+}
+class C extends B{
+
+}
+//class D extends A , B{ } java支持单继承
+
+class D extends B{
+
+}

+ 36 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/constructor2/Student.java

@@ -0,0 +1,36 @@
+package com.lc.day06.constructor2;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day06.constructor2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:15
+ * @Version 1.0
+ */
+public class Student {
+
+    private String name;
+    private int age;
+
+    // 构造方法
+    // 构造方法可以重载
+    // 没有给构造方法 系统给出默认的构造方法
+    // 如果给出一个构造方法  系统不会给出默认的构造方法
+    public Student(){
+        System.out.println("Student");
+    }
+
+    //没有无参数的构造方法
+    public Student( String n , int a ){
+        name = n;
+        age = a;
+    }
+
+    public void show(){
+        System.out.println("name:"+name+"-age:"+age);
+    }
+
+
+}

+ 25 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/constructor2/TestStudent.java

@@ -0,0 +1,25 @@
+package com.lc.day06.constructor2;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day06.constructor2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:15
+ * @Version 1.0
+ */
+public class TestStudent {
+    public static void main(String[] args) {
+        //创建对象执行构造方法
+        // new Student() 没有参数的构造
+        // 匹配
+        //Student student = new Student("zs",28);
+        Student student = new Student();
+
+        //show
+        student.show();
+    }
+
+
+}

+ 63 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/encapsulation1/ArrayUtil.java

@@ -0,0 +1,63 @@
+package com.lc.day06.encapsulation1;
+
+/**
+ * ClassName: ArrayUtil
+ * Package: com.lc.day06.encapsulation1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 10:13
+ * @Version 1.0
+ */
+public class ArrayUtil {
+
+    //高内聚
+    //私有化方法
+
+
+    //数组的交换
+    /*
+        1.传入数组
+        2.排序方式
+            asc 正序
+            desc 倒叙
+     */
+    public static void  sortArr( int[] arr, String type ){
+        //冒泡排序
+        if ("asc".equals(type)){
+            //排序
+            for (int i = 0; i < arr.length; i++) {
+                for (int j = 0; j < arr.length - i - 1; j++) {
+                    if (arr[j] > arr[j+1]) {
+                        //交换
+                        swap(arr,j,j+1);
+                     }
+                }
+            }
+        }else if ("desc".equals(type)){
+            //排序
+            for (int i = 0; i < arr.length; i++) {
+                for (int j = 0; j < arr.length - i - 1; j++) {
+                    if (arr[j] < arr[j+1]) {
+                        //交换
+//                        int temp = arr[j];
+//                        arr[j] = arr[j+1];
+//                        arr[j+1] = temp;
+                        swap(arr,j,j+1);
+                    }
+                }
+            }
+        }else {
+            System.out.println("没有这种排序规则");
+        }
+    }
+
+    //私有化
+    private static void swap(int[] arr , int index1 , int index2 ){
+        int temp = arr[index1];
+        arr[index1] = arr[index2];
+        arr[index2] = temp;
+    }
+
+
+}

+ 40 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/encapsulation1/Person.java

@@ -0,0 +1,40 @@
+package com.lc.day06.encapsulation1;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day06.encapsulation1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 9:58
+ * @Version 1.0
+ */
+public class Person {
+
+    // ? 如何隐藏  为什么隐藏 ?
+    private int age;  //人员管理系统,登记  信息  年龄  设置  -  计算奖金
+
+    private String name;
+
+    //修饰符
+    //public 公共的
+    //private 私有的  其他不能访问
+
+
+    //定义方法 访问 私有属性
+    public int getAge(){
+        return age;
+    }
+
+    public void setAge( int a ){
+        //设置检查
+        if ( a > 0  && a <150 ){
+            age = a;
+        }else {
+            System.out.println("范围不符合,不能设置");
+        }
+    }
+
+
+
+}

+ 22 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/encapsulation1/TestArrayUtil.java

@@ -0,0 +1,22 @@
+package com.lc.day06.encapsulation1;
+
+import java.util.Arrays;
+
+/**
+ * ClassName: ArrayUtil
+ * Package: com.lc.day06.encapsulation1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 10:13
+ * @Version 1.0
+ */
+public class TestArrayUtil {
+    public static void main(String[] args) {
+        int[] arr = {1,11,23,45,99,34,21,24};
+        //排序
+        ArrayUtil.sortArr(arr,"desc");
+        //输出
+        System.out.println(Arrays.toString(arr));
+    }
+}

+ 26 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/encapsulation1/TestPerson.java

@@ -0,0 +1,26 @@
+package com.lc.day06.encapsulation1;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day06.encapsulation1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 9:58
+ * @Version 1.0
+ */
+public class TestPerson {
+
+    public static void main(String[] args) {
+        Person person = new Person();
+
+        // 设置 值
+        // 凡凡  狱中  给预警 内部人员
+        // 检查
+        person.setAge(-1);
+        int age = person.getAge();
+        System.out.println(age);
+
+    }
+
+}

+ 30 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer1/Person.java

@@ -0,0 +1,30 @@
+package com.lc.day06.exer.exer1;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day06.exer1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:02
+ * @Version 1.0
+ */
+public class Person {
+
+    private int age;
+
+    //getset
+    public void setAge(int a){
+        if (a > 0 && a < 130 ){
+            age = a;
+        }else {
+            System.out.println("不符合");
+        }
+    }
+
+    public int getAge(){
+        return age;
+    }
+
+
+}

+ 21 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer1/TestPerson.java

@@ -0,0 +1,21 @@
+package com.lc.day06.exer.exer1;
+
+/**
+ * ClassName: TestPerson
+ * Package: com.lc.day06.exer1
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:04
+ * @Version 1.0
+ */
+public class TestPerson {
+    public static void main(String[] args) {
+        Person person = new Person();
+
+        person.setAge(-1);
+
+        int age = person.getAge();
+        System.out.println(age);
+    }
+}

+ 58 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer2/Book.java

@@ -0,0 +1,58 @@
+package com.lc.day06.exer.exer2;
+
+/**
+ * ClassName: Book
+ * Package: com.lc.day06.exer2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:05
+ * @Version 1.0
+ */
+public class Book {
+
+    //书名bookName,作者author,出版社名publisher,价格price;方法包括
+    private String bookName;
+    private String author;
+    private String publisher;
+    private double price;
+
+    //alt insert
+    //属性
+    public String getBookName() {
+        return bookName;
+    }
+
+    public void setBookName(String bookName) {
+        this.bookName = bookName;
+    }
+
+    public String getAuthor() {
+        return author;
+    }
+
+    public void setAuthor(String author) {
+        this.author = author;
+    }
+
+    public String getPublisher() {
+        return publisher;
+    }
+
+    public void setPublisher(String publisher) {
+        this.publisher = publisher;
+    }
+
+    public double getPrice() {
+        return price;
+    }
+
+    public void setPrice(double price) {
+        this.price = price;
+    }
+
+
+    public void showInfo(){
+        System.out.println("书名"+bookName+",作者"+author+",出版社名"+publisher+",价格"+price+";");
+    }
+}

+ 22 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer2/TestBook.java

@@ -0,0 +1,22 @@
+package com.lc.day06.exer.exer2;
+
+/**
+ * ClassName: TestBook
+ * Package: com.lc.day06.exer2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:08
+ * @Version 1.0
+ */
+public class TestBook {
+    public static void main(String[] args) {
+        Book book = new Book();
+        book.setBookName("神墓");
+        book.setAuthor("辰东");
+        book.setPublisher("北京出版社");
+        book.setPrice(29.9);
+
+        book.showInfo();
+    }
+}

+ 70 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer3/Account.java

@@ -0,0 +1,70 @@
+package com.lc.day06.exer.exer3;
+
+/**
+ * ClassName: Account
+ * Package: com.lc.day06.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:25
+ * @Version 1.0
+ */
+public class Account {
+
+    private int id;
+    private double balance;
+    private double annualInterestRate;
+
+    public Account( int _id ,double _balance , double _annualInterestRate ){
+        //名称
+        id = _id;
+        balance = _balance;
+        annualInterestRate = _annualInterestRate;
+    }
+
+    // 取款方法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 int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public double getBalance() {
+        return balance;
+    }
+
+    public void setBalance(double balance) {
+        this.balance = balance;
+    }
+
+    public double getAnnualInterestRate() {
+        return annualInterestRate;
+    }
+
+    public void setAnnualInterestRate(double annualInterestRate) {
+        this.annualInterestRate = annualInterestRate;
+    }
+
+    public String showInfo() {
+       return "id:"+id+"balance:"+balance+"ann:"+annualInterestRate;
+    }
+}

+ 49 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer3/Customer.java

@@ -0,0 +1,49 @@
+package com.lc.day06.exer.exer3;
+
+/**
+ * ClassName: Customer
+ * Package: com.lc.day06.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:30
+ * @Version 1.0
+ */
+public class Customer {
+    private String firstName;
+    private String lastName;
+    private Account account;
+
+    public Customer(String _firstName, String _lastName) {
+        firstName = _firstName;
+        lastName = _lastName;
+    }
+
+    public void showInfo(){
+        System.out.println("firstName:"+firstName+"-lastName:"+lastName+"账号信息:"+account.showInfo());
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public Account getAccount() {
+        return account;
+    }
+
+    public void setAccount(Account account) {
+        this.account = account;
+    }
+}

+ 38 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer3/Test.java

@@ -0,0 +1,38 @@
+package com.lc.day06.exer.exer3;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day06.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:33
+ * @Version 1.0
+ */
+public class Test {
+
+    /*
+       (1)创建一个Customer ,名字叫 Jane Smith, 他有一个账号为1000,余额为2000元,年利率为 1.23% 的账户。
+       (2)对Jane Smith操作。
+    存入 100 元,再取出960元。再取出2000元。
+    打印出Jane Smith 的基本信息
+     */
+    public static void main(String[] args) {
+        //客户
+        Customer customer = new Customer("尼古拉","赵四");
+        //账号
+        Account account = new Account(1001,2000,0.123);
+        //设置账号
+        customer.setAccount(account);
+
+        //存钱
+        account.deposit(100);
+        account.withdraw(960);
+        //account.withdraw(2000);
+
+        //打印信息
+        customer.showInfo();
+
+
+    }
+}

+ 46 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer4/Boy.java

@@ -0,0 +1,46 @@
+package com.lc.day06.exer.exer4;
+
+/**
+ * ClassName: Boy
+ * Package: com.lc.day06.exer.exer4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 15:12
+ * @Version 1.0
+ */
+public class Boy {
+
+    private String name;
+    private int age;
+
+    private Girl girl;
+
+    public Boy() {
+    }
+
+    public Boy(String name, int age) {
+        this.name = name;
+        this.age = age;
+    }
+
+     public void marry( Girl girl ){
+        this.girl = girl;
+     }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+}

+ 55 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer4/Girl.java

@@ -0,0 +1,55 @@
+package com.lc.day06.exer.exer4;
+
+/**
+ * ClassName: Girl
+ * Package: com.lc.day06.exer.exer4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 15:14
+ * @Version 1.0
+ */
+public class Girl {
+
+    private String name;
+    private int age;
+
+    private Boy boy;
+
+    public Girl() {
+    }
+
+    public Girl(String name, int age) {
+        this.name = name;
+        this.age = age;
+    }
+
+    public void marry( Boy boy ){
+        this.boy = boy;
+    }
+
+
+    public Boy getBoy() {
+        return boy;
+    }
+
+    public void setBoy(Boy boy) {
+        this.boy = boy;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+}

+ 27 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer4/TestBoy.java

@@ -0,0 +1,27 @@
+package com.lc.day06.exer.exer4;
+
+/**
+ * ClassName: TestBoy
+ * Package: com.lc.day06.exer.exer4
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 15:16
+ * @Version 1.0
+ */
+public class TestBoy {
+    public static void main(String[] args) {
+        //创建
+        Girl girl = new Girl("李若彤",28);
+
+        Boy boy = new Boy("古天乐",20);
+
+        boy.setName("杨过");
+
+        girl.setBoy(boy);
+
+        girl.setName("小龙女");
+
+
+    }
+}

+ 44 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer5/Account.java

@@ -0,0 +1,44 @@
+package com.lc.day06.exer.exer5;
+
+/**
+ * ClassName: Account
+ * Package: com.lc.day06.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:25
+ * @Version 1.0
+ */
+public class Account {
+
+    private double balance;
+
+    public Account() {
+    }
+
+    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;
+    }
+}

+ 44 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer5/Bank.java

@@ -0,0 +1,44 @@
+package com.lc.day06.exer.exer5;
+
+/**
+ * ClassName: Bank
+ * Package: com.lc.day06.exer.exer5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 15:25
+ * @Version 1.0
+ */
+public class Bank {
+
+    private Customer[] customers; //客户数组
+
+    private int numberOfCustom = 0; //数量
+
+    public Bank(){
+        //初始化长度
+        customers = new Customer[10];
+    }
+
+    public void addCustomer( String f , String l ){
+        //创建Custom对象
+        Customer customer = new Customer(f , l);
+        //添加到数组中
+        customers[numberOfCustom] = customer;
+        //++ 数量+1
+        numberOfCustom++;
+    }
+
+    public int getNumOfCustomers(){
+        return this.numberOfCustom;
+    }
+
+    public Customer getCustomer(int index){
+        if ( index <= numberOfCustom){
+            return customers[index];
+        }else {
+            return null;
+        }
+    }
+
+}

+ 50 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer5/Customer.java

@@ -0,0 +1,50 @@
+package com.lc.day06.exer.exer5;
+
+
+/**
+ * ClassName: Customer
+ * Package: com.lc.day06.exer3
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 11:30
+ * @Version 1.0
+ */
+public class Customer {
+    private String firstName;
+    private String lastName;
+    private Account account;
+
+    public Customer(String firstName, String lastName) {
+        this.firstName = firstName;
+        this.lastName = lastName;
+    }
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getLastName() {
+        return lastName;
+    }
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public Account getAccount() {
+        return account;
+    }
+
+    public void setAccount(Account account) {
+        this.account = account;
+    }
+
+    public void showInfo(){
+        System.out.println("f:"+firstName+"-l:"+lastName);
+    }
+}

+ 35 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/exer/exer5/Test.java

@@ -0,0 +1,35 @@
+package com.lc.day06.exer.exer5;
+
+/**
+ * ClassName: Test
+ * Package: com.lc.day06.exer.exer5
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 15:33
+ * @Version 1.0
+ */
+public class Test {
+
+    public static void main(String[] args) {
+        //银行
+        Bank bank = new Bank();
+        //客户
+
+        bank.addCustomer("尼古拉","赵四");
+        bank.addCustomer("完颜","能");
+
+        //数量
+        int numOfCustomers = bank.getNumOfCustomers();
+        System.out.println(numOfCustomers);
+
+        //获取
+        Customer customer = bank.getCustomer(3);
+
+        System.out.println(customer);
+        if (customer != null){
+            customer.showInfo();
+        }
+
+    }
+}

+ 87 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/recursion/Demo01.java

@@ -0,0 +1,87 @@
+package com.lc.day06.recursion;
+
+import java.util.Scanner;
+
+/**
+ * ClassName: Demo01
+ * Package: com.lc.day06.recursion
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 9:22
+ * @Version 1.0
+ */
+public class Demo01 {
+    //计算斐波那契数列(Fibonacci)的第n个值,斐波那契数列满足如下规律,
+    //1,1,2,3,5,8,13,21,34,55,....
+    //已知  f(1) = 1  f(2)=1  当前项 = 前1项 和前2项的和
+    // f(n) = f(n-)+f(n-2)
+
+    //static
+    public static int f(int n){
+        if ( n == 1 ||  n == 2){
+            return 1;
+        }
+        return f(n - 1 )+ f(n-2);
+    }
+
+    //不用递归
+    static int fValue(int n) {//计算斐波那契数列第n个值是多少
+        if (n < 1) {//负数是返回特殊值1,表示不计算负数情况
+            return 1;
+        }
+        if (n == 1 || n == 2) {
+            return 1;
+        }
+        //从第三个数开始,  等于 前两个整数相加
+        int beforeBefore = 1; //相当于n=1时的值
+        int before = 1;//相当于n=2时的值
+        int current = beforeBefore + before; //相当于n=3的值
+        //再完后
+        for (int i = 4; i <= n; i++) {
+            beforeBefore = before;
+            before = current;
+            current = beforeBefore + before;
+            /*
+            假设i=4
+                beforeBefore = before; //相当于n=2时的值
+                before = current; //相当于n=3的值
+                current = beforeBefore + before; //相当于n = 4的值
+            假设i=5
+                beforeBefore = before; //相当于n=3的值
+                before = current; //相当于n = 4的值
+                current = beforeBefore + before; //相当于n = 5的值
+                ....
+             */
+        }
+        return current;
+    }
+
+    /*
+    我今天去面试,遇到一个一个双重递归调用的问题,
+    我琢磨了一下,完全不知道为什么。打断点了,也还是没看懂为什么程序会那样走。您有空可以看一下,求指教。
+     */
+    private static int count = 0;
+
+    public static int recursion(int k) {
+        count++;
+        System.out.println("count1:" + count + "  k:" + k);
+        if (k <= 0) {
+            return 0;
+        }
+        return recursion(k - 1) + recursion(k - 2);//287
+        //return recursion(k - 1);//11
+        //return recursion(k - 1) + recursion(k - 1);//2047
+    }
+
+    public static void main(String[] args) {
+        //int f = f(50);
+        //int f = fValue(50);
+
+        int recursion = recursion(4);
+
+        System.out.println(recursion);
+    }
+
+
+}

+ 28 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this1/DemoThis.java

@@ -0,0 +1,28 @@
+package com.lc.day06.this03.this1;
+
+/**
+ * ClassName: DemoThis
+ * Package: com.lc.day06.this03
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 14:07
+ * @Version 1.0
+ */
+public class DemoThis {
+    public static void main(String[] args) {
+
+        Person person = new Person("zs");
+        //地址
+        System.out.println(person);
+
+        System.out.println(person.getName());
+
+        //方法中this
+        person.setName("lisi");
+
+        System.out.println(person.getName());
+
+        person.showInfo();
+    }
+}

+ 40 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this1/Person.java

@@ -0,0 +1,40 @@
+package com.lc.day06.this03.this1;
+
+/**
+ * ClassName: Person
+ * Package: com.lc.day06.this03
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 14:07
+ * @Version 1.0
+ */
+public class Person {
+    private String name;
+
+    public Person(String name){
+        //// this区分同名
+        this.name = name;
+        // new 的对象
+        System.out.println(this);
+    }
+
+
+    public void showInfo(){
+        String name = "tom";
+        //this 本类的属性
+        System.out.println("name:"+this.name);
+    }
+
+
+    public void setName( String name ){
+        // this区分同名
+        // 当前类下找属性
+        System.out.println(this); // 谁调用代表谁
+        this.name = name;
+    }
+
+    public String getName(){
+        return name;
+    }
+}

+ 36 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this1/Rectangle.java

@@ -0,0 +1,36 @@
+package com.lc.day06.this03.this1;
+
+/**
+ * ClassName: Rectangle
+ * Package: com.lc.day06.this03
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 14:19
+ * @Version 1.0
+ */
+public class Rectangle {
+    int length;
+    int width;
+
+    public Rectangle( int width , int length ){
+        this.length = length;
+        this.width = width;
+    }
+
+    public void setWidth(int width){
+        this.width = width;
+    }
+
+    public int getWidth(){
+        return this.width;
+    }
+
+    public void setLength(int length) {
+        this.length = length;
+    }
+
+    public int getLength() {
+        return length;
+    }
+}

+ 81 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this2/Student.java

@@ -0,0 +1,81 @@
+package com.lc.day06.this03.this2;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day06.this03.this2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 14:25
+ * @Version 1.0
+ */
+public class Student {
+
+    private int id;
+    private String name;
+    private int age;
+    private String password;
+
+    //this 构造调用
+    public Student(){
+        //this 其他构造
+        //给默认的初始值
+        this("123456"); //必须在第一行
+        //调用方法
+        showInfo();
+    }
+
+    public Student(String password){
+        this(1001,"jarry",28);
+        this.password = password;
+
+    }
+
+    public Student(int id, String name, int age) {
+        //this() 间接递归
+        this.id = id;
+        this.name = name;
+        this.age = age;
+    }
+
+    //this
+    //调用过程 中 最多 有  n-1
+    //this() 在第一行
+    //this( 参数) 匹配个数  在看类型
+    public void showInfo(){
+        System.out.println(this);
+        System.out.println("id"+id+"name"+name);
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

+ 20 - 0
01_JavaSe/JavaSe/day06/src/com/lc/day06/this03/this2/TestStudent.java

@@ -0,0 +1,20 @@
+package com.lc.day06.this03.this2;
+
+/**
+ * ClassName: Student
+ * Package: com.lc.day06.this03.this2
+ * Description:
+ *
+ * @Author 爱扣钉-陈晨
+ * @Create 2023/7/19 14:25
+ * @Version 1.0
+ */
+public class TestStudent {
+    public static void main(String[] args) {
+        Student student = new Student();
+        System.out.println(student);
+
+        System.out.println(student.getName()); // ? jarry
+    }
+
+}

BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance04/Person.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance04/Student.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance04/Test.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance05/Animal.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance05/Cat.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance05/Dog.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/A.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/B.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/C.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/D.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/Inheritance06/Test.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/constructor2/Student.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/constructor2/TestStudent.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/encapsulation1/ArrayUtil.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/encapsulation1/Person.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/encapsulation1/TestArrayUtil.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/encapsulation1/TestPerson.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer1/Person.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer1/TestPerson.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer2/Book.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer2/TestBook.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer3/Account.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer3/Customer.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer3/Test.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer4/Boy.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer4/Girl.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer4/TestBoy.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer5/Account.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer5/Bank.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer5/Customer.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/exer/exer5/Test.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/recursion/Demo01.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this1/DemoThis.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this1/Person.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this1/Rectangle.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this2/Student.class


BIN
01_JavaSe/JavaSe/out/production/day06/com/lc/day06/this03/this2/TestStudent.class