├── .idea
├── compiler.xml
├── description.html
├── encodings.xml
├── misc.xml
├── modules.xml
├── uiDesigner.xml
├── vcs.xml
└── workspace.xml
├── Class.iml
├── out
└── production
│ └── Class
│ ├── DesignPatterns
│ ├── Decorator
│ │ └── Pattern
│ │ │ ├── CarExtensions
│ │ │ ├── BasicCar.class
│ │ │ ├── CarExtension.class
│ │ │ ├── CushionSeat.class
│ │ │ ├── Main.class
│ │ │ ├── MusicSystem.class
│ │ │ └── RearCamera.class
│ │ │ └── CarService
│ │ │ ├── BasicCarService.class
│ │ │ ├── CarService.class
│ │ │ ├── EngineFix.class
│ │ │ ├── Main.class
│ │ │ ├── OilChange.class
│ │ │ └── TireRotation.class
│ ├── Factory
│ │ ├── Bike.class
│ │ ├── BikeFactory.class
│ │ ├── BikeShowRoom.class
│ │ ├── DirtBike.class
│ │ ├── SkyFlyingBike.class
│ │ ├── SportsBike.class
│ │ └── WaterDrowingBike.class
│ ├── Singleton
│ │ ├── Main.class
│ │ └── Steering.class
│ └── StrategyPattern
│ │ ├── ChineseStudent.class
│ │ ├── Facebook.class
│ │ ├── IndianStudent.class
│ │ ├── Main.class
│ │ ├── RussianStudent.class
│ │ ├── SocialNetwork.class
│ │ ├── Student.class
│ │ ├── Vk.class
│ │ └── Wechat.class
│ ├── arlist
│ ├── ALToA.class
│ ├── Main.class
│ └── SortComparator.class
│ ├── school
│ └── management
│ │ └── system
│ │ ├── Main.class
│ │ ├── School.class
│ │ ├── Student.class
│ │ └── Teacher.class
│ └── simple
│ └── textgui
│ └── Main.class
└── src
├── DesignPatterns
├── Decorator
│ └── Pattern
│ │ ├── CarExtensions
│ │ ├── BasicCar.java
│ │ ├── CarExtension.java
│ │ ├── CushionSeat.java
│ │ ├── Main.java
│ │ ├── MusicSystem.java
│ │ └── RearCamera.java
│ │ └── CarService
│ │ ├── BasicCarService.java
│ │ ├── CarService.java
│ │ ├── EngineFix.java
│ │ ├── Main.java
│ │ ├── OilChange.java
│ │ └── TireRotation.java
├── Factory
│ ├── Bike.java
│ ├── BikeFactory.java
│ ├── BikeShowRoom.java
│ ├── DirtBike.java
│ ├── SkyFlyingBike.java
│ ├── SportsBike.java
│ └── WaterDrowingBike.java
├── Singleton
│ ├── Main.java
│ └── Steering.java
└── StrategyPattern
│ ├── ChineseStudent.java
│ ├── Facebook.java
│ ├── IndianStudent.java
│ ├── Main.java
│ ├── RussianStudent.java
│ ├── SocialNetwork.java
│ ├── Student.java
│ ├── Vk.java
│ └── Wechat.java
├── arlist
├── ALToA.java
├── Main.java
└── SortComparator.java
├── school
└── management
│ └── system
│ ├── Main.java
│ ├── School.java
│ ├── Student.java
│ └── Teacher.java
└── simple
└── textgui
└── Main.java
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.idea/description.html:
--------------------------------------------------------------------------------
1 | Simple Java application that includes a class with main()
method
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/uiDesigner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | -
6 |
7 |
8 | -
9 |
10 |
11 | -
12 |
13 |
14 | -
15 |
16 |
17 | -
18 |
19 |
20 |
21 |
22 |
23 | -
24 |
25 |
26 |
27 |
28 |
29 | -
30 |
31 |
32 |
33 |
34 |
35 | -
36 |
37 |
38 |
39 |
40 |
41 | -
42 |
43 |
44 |
45 |
46 | -
47 |
48 |
49 |
50 |
51 | -
52 |
53 |
54 |
55 |
56 | -
57 |
58 |
59 |
60 |
61 | -
62 |
63 |
64 |
65 |
66 | -
67 |
68 |
69 |
70 |
71 | -
72 |
73 |
74 | -
75 |
76 |
77 |
78 |
79 | -
80 |
81 |
82 |
83 |
84 | -
85 |
86 |
87 |
88 |
89 | -
90 |
91 |
92 |
93 |
94 | -
95 |
96 |
97 |
98 |
99 | -
100 |
101 |
102 | -
103 |
104 |
105 | -
106 |
107 |
108 | -
109 |
110 |
111 | -
112 |
113 |
114 |
115 |
116 | -
117 |
118 |
119 | -
120 |
121 |
122 |
123 |
124 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 | true
126 | DEFINITION_ORDER
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 | Android
147 |
148 |
149 | Android > Lint > Correctness
150 |
151 |
152 | Android > Lint > Performance
153 |
154 |
155 | CorrectnessLintAndroid
156 |
157 |
158 | GSPGrailsGroovy
159 |
160 |
161 | General
162 |
163 |
164 | GrailsGroovy
165 |
166 |
167 | Groovy
168 |
169 |
170 | Kotlin
171 |
172 |
173 | LintAndroid
174 |
175 |
176 | Maven
177 |
178 |
179 | Plugin DevKit
180 |
181 |
182 | XPath
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
290 |
291 |
292 |
293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 | project
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
479 |
480 |
481 |
482 |
483 |
484 |
485 |
486 |
487 |
488 |
489 |
490 |
491 |
492 |
493 |
494 |
495 |
496 |
497 |
498 |
499 |
500 |
501 |
502 |
503 |
504 |
505 |
506 |
507 |
508 |
509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
519 |
520 |
521 |
522 |
523 |
524 |
525 |
526 |
527 |
528 |
529 |
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 |
553 |
554 |
555 |
556 |
557 |
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 |
599 |
600 |
601 |
602 |
603 |
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 |
626 |
627 |
628 |
629 |
630 |
631 |
632 |
633 |
634 |
635 |
636 |
637 |
638 |
639 |
640 |
641 |
642 |
643 |
644 |
645 |
646 |
647 |
648 |
649 |
650 |
651 |
652 |
653 |
654 |
655 |
656 |
657 |
658 |
659 |
660 |
661 |
662 |
663 |
664 |
665 |
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 |
701 |
702 |
703 |
704 |
705 |
706 |
707 |
708 |
709 |
710 |
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 | project
719 |
720 |
721 | true
722 |
723 |
724 |
725 | DIRECTORY
726 |
727 | false
728 |
729 |
730 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
738 |
739 |
740 |
741 |
742 |
743 |
744 |
745 |
746 |
747 |
748 |
749 |
750 |
751 |
752 |
753 |
754 |
755 |
756 |
757 |
758 |
759 | 1488598028892
760 |
761 |
762 | 1488598028892
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
802 |
803 |
804 |
805 |
806 |
807 |
808 |
809 |
810 |
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 |
841 |
842 |
843 |
844 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 |
859 |
860 |
861 |
862 |
863 |
864 |
865 |
866 |
867 |
868 |
869 |
870 |
871 |
872 |
873 |
874 |
875 |
876 |
877 |
878 |
879 |
880 |
881 |
882 |
883 |
884 |
885 |
886 |
887 |
888 |
889 |
890 |
891 |
892 |
893 |
894 |
895 |
896 |
897 |
898 |
899 |
900 |
901 |
902 |
903 |
904 |
905 |
906 |
907 |
908 |
909 |
910 |
911 |
912 |
913 | JAVA
914 | DesignPatterns.StrategyPattern
915 |
916 | DesignPatterns.StrategyPattern.Wechat
917 | DesignPatterns.StrategyPattern.Student
918 | DesignPatterns.StrategyPattern.RussianStudent
919 | DesignPatterns.StrategyPattern.Facebook
920 | DesignPatterns.StrategyPattern.IndianStudent
921 | DesignPatterns.StrategyPattern.SocialNetwork
922 | DesignPatterns.StrategyPattern.Vk
923 | DesignPatterns.StrategyPattern.ChineseStudent
924 |
925 |
926 |
927 |
928 |
929 |
930 |
931 |
932 |
933 |
934 |
935 |
936 |
937 |
938 |
939 |
940 |
941 |
942 |
943 |
944 |
945 |
946 |
947 |
948 |
949 |
950 |
951 |
952 |
953 |
954 |
955 |
956 |
957 |
958 |
959 |
960 |
961 |
962 |
963 |
964 |
965 |
966 |
967 |
968 |
969 |
970 |
971 |
972 |
973 |
974 |
975 |
976 |
977 |
978 |
979 |
980 |
981 |
982 |
983 |
984 |
985 |
986 |
987 | Fields
988 | Inner Classes
989 | Constructors
990 | Properties
991 | Methods
992 |
993 | All
994 | private
995 |
996 |
997 |
998 |
999 |
1000 |
1001 |
1002 |
1003 |
1004 |
1005 |
1006 |
1007 |
1008 | JAVA
1009 | DesignPatterns.Singleton
1010 |
1011 | DesignPatterns.Singleton.Steering
1012 |
1013 |
1014 |
1015 |
1016 |
1017 |
1018 | Fields
1019 | Constructors
1020 | Properties
1021 | Methods
1022 |
1023 | All
1024 | private
1025 |
1026 |
1027 |
1028 |
1029 |
1030 |
1031 |
1032 |
1033 |
1034 |
1035 |
1036 |
1037 |
1038 |
1039 |
1040 |
1041 |
1042 |
1043 |
1044 |
1045 |
1046 |
1047 |
1048 |
1049 |
1050 |
1051 |
1052 |
1053 |
1054 |
1055 |
1056 |
1057 |
1058 |
1059 |
1060 |
1061 |
1062 |
1063 |
1064 |
1065 |
1066 |
1067 |
1068 |
1069 |
1070 |
1071 |
1072 |
1073 |
1074 |
1075 |
1076 |
1077 |
1078 |
1079 |
1080 |
1081 |
1082 |
1083 |
1084 |
1085 |
1086 |
1087 |
1088 |
1089 |
1090 |
1091 |
1092 |
1093 |
1094 |
1095 |
1096 |
1097 |
1098 |
1099 |
1100 |
1101 |
1102 |
1103 |
1104 |
1105 |
1106 |
1107 |
1108 |
1109 |
1110 |
1111 |
1112 |
1113 |
1114 |
1115 |
1116 |
1117 |
1118 |
1119 |
1120 |
1121 |
1122 |
1123 |
1124 |
1125 |
1126 |
1127 |
1128 |
1129 |
1130 |
1131 |
1132 |
1133 |
1134 |
1135 |
1136 |
1137 |
1138 |
1139 |
1140 |
1141 |
1142 |
1143 |
1144 |
1145 |
1146 |
1147 |
1148 |
1149 |
1150 |
1151 |
1152 |
1153 |
1154 |
1155 |
1156 |
1157 |
1158 |
1159 |
1160 |
1161 |
1162 |
1163 |
1164 |
1165 |
1166 | JAVA
1167 | DesignPatterns.Decorator.Pattern.CarExtensions
1168 |
1169 | DesignPatterns.Decorator.Pattern.CarExtensions.BasicCar
1170 | DesignPatterns.Decorator.Pattern.CarExtensions.MusicSystem
1171 | DesignPatterns.Decorator.Pattern.CarExtensions.CushionSeat
1172 | DesignPatterns.Decorator.Pattern.CarExtensions.RearCamera
1173 | DesignPatterns.Decorator.Pattern.CarExtensions.CarExtension
1174 |
1175 |
1176 |
1177 |
1178 |
1179 |
1180 |
1181 |
1182 |
1183 |
1184 |
1185 |
1186 |
1187 |
1188 |
1189 |
1190 |
1191 |
1192 |
1193 |
1194 |
1195 |
1196 |
1197 |
1198 |
1199 |
1200 |
1201 |
1202 |
1203 |
1204 | DesignPatterns.Decorator.Pattern.CarExtensions.CarExtension
1205 |
1206 |
1207 | Fields
1208 | Constructors
1209 | Properties
1210 | Methods
1211 |
1212 | All
1213 | private
1214 |
1215 |
1216 |
1217 |
1218 |
1219 |
1220 |
1221 |
1222 |
1223 |
1224 |
1225 |
1226 |
1227 |
1228 |
1229 |
1230 |
1231 |
1232 |
1233 |
1234 |
1235 |
1236 |
1237 |
1238 |
1239 |
1240 |
1241 |
1242 |
1243 |
1244 |
1245 | JAVA
1246 | DesignPatterns.Factory
1247 |
1248 | DesignPatterns.Factory.Bike
1249 | DesignPatterns.Factory.BikeFactory
1250 | DesignPatterns.Factory.SportsBike
1251 | DesignPatterns.Factory.WaterDrowingBike
1252 | DesignPatterns.Factory.SkyFlyingBike
1253 | DesignPatterns.Factory.DirtBike
1254 |
1255 |
1256 |
1257 |
1258 |
1259 |
1260 |
1261 |
1262 |
1263 |
1264 |
1265 |
1266 |
1267 |
1268 |
1269 |
1270 |
1271 |
1272 |
1273 |
1274 |
1275 |
1276 |
1277 |
1278 |
1279 |
1280 |
1281 |
1282 |
1283 |
1284 |
1285 |
1286 |
1287 |
1288 |
1289 |
1290 |
1291 |
1292 |
1293 |
1294 |
1295 |
1296 |
1297 |
1298 |
1299 |
1300 |
1301 |
1302 |
1303 |
1304 |
1305 |
1306 |
1307 |
1308 |
1309 | Fields
1310 | Inner Classes
1311 | Methods
1312 |
1313 | All
1314 | private
1315 |
1316 |
1317 |
1318 |
1319 |
1320 |
1321 |
1322 |
1323 |
1324 |
1325 |
1326 |
1327 |
1328 |
1329 |
1330 |
1331 |
1332 |
1333 |
1334 |
1335 |
1336 |
1337 |
1338 |
1339 |
1340 |
1341 |
1342 |
1343 |
1344 |
1345 |
1346 |
1347 |
1348 |
1349 |
1350 |
1351 |
1352 |
1353 |
1354 |
1355 |
1356 |
1357 |
1358 |
1359 |
1360 |
1361 |
1362 |
1363 |
1364 |
1365 |
1366 |
1367 |
1368 |
1369 |
1370 |
1371 |
1372 |
1373 |
1374 |
1375 |
1376 |
1377 |
1378 |
1379 |
1380 |
1381 |
1382 |
1383 |
1384 |
1385 |
1386 |
1387 |
1388 |
1389 |
1390 |
--------------------------------------------------------------------------------
/Class.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/BasicCar.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/BasicCar.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/CarExtension.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/CarExtension.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/CushionSeat.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/CushionSeat.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/Main.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/MusicSystem.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/MusicSystem.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/RearCamera.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarExtensions/RearCamera.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/BasicCarService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/BasicCarService.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/CarService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/CarService.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/EngineFix.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/EngineFix.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/Main.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/OilChange.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/OilChange.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/TireRotation.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Decorator/Pattern/CarService/TireRotation.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Factory/Bike.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Factory/Bike.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Factory/BikeFactory.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Factory/BikeFactory.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Factory/BikeShowRoom.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Factory/BikeShowRoom.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Factory/DirtBike.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Factory/DirtBike.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Factory/SkyFlyingBike.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Factory/SkyFlyingBike.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Factory/SportsBike.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Factory/SportsBike.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Factory/WaterDrowingBike.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Factory/WaterDrowingBike.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Singleton/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Singleton/Main.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/Singleton/Steering.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/Singleton/Steering.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/ChineseStudent.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/ChineseStudent.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/Facebook.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/Facebook.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/IndianStudent.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/IndianStudent.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/Main.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/RussianStudent.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/RussianStudent.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/SocialNetwork.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/SocialNetwork.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/Student.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/Vk.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/Vk.class
--------------------------------------------------------------------------------
/out/production/Class/DesignPatterns/StrategyPattern/Wechat.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/DesignPatterns/StrategyPattern/Wechat.class
--------------------------------------------------------------------------------
/out/production/Class/arlist/ALToA.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/arlist/ALToA.class
--------------------------------------------------------------------------------
/out/production/Class/arlist/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/arlist/Main.class
--------------------------------------------------------------------------------
/out/production/Class/arlist/SortComparator.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/arlist/SortComparator.class
--------------------------------------------------------------------------------
/out/production/Class/school/management/system/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/school/management/system/Main.class
--------------------------------------------------------------------------------
/out/production/Class/school/management/system/School.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/school/management/system/School.class
--------------------------------------------------------------------------------
/out/production/Class/school/management/system/Student.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/school/management/system/Student.class
--------------------------------------------------------------------------------
/out/production/Class/school/management/system/Teacher.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/school/management/system/Teacher.class
--------------------------------------------------------------------------------
/out/production/Class/simple/textgui/Main.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rakshithvasudev/Java-Basic-Tutorials/1ad76b14e7bcff0066ca8f20edf8e15831253d60/out/production/Class/simple/textgui/Main.class
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarExtensions/BasicCar.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarExtensions;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class BasicCar implements CarExtension {
7 |
8 | @Override
9 | public String getDescription() {
10 | return "Basic Car";
11 | }
12 |
13 | @Override
14 | public int getCost() {
15 | return 100000;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarExtensions/CarExtension.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarExtensions;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public interface CarExtension {
7 | String getDescription();
8 | int getCost();
9 | }
10 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarExtensions/CushionSeat.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarExtensions;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class CushionSeat implements CarExtension {
7 | CarExtension carExtension;
8 |
9 | public CushionSeat(CarExtension carExtension) {
10 | this.carExtension = carExtension;
11 | }
12 |
13 | @Override
14 | public String getDescription() {
15 | return carExtension.getDescription()+ ", CushionSeat";
16 | }
17 |
18 | @Override
19 | public int getCost() {
20 | return carExtension.getCost()+ 50;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarExtensions/Main.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarExtensions;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class Main {
7 | public static void main(String[] args) {
8 |
9 | CarExtension extension = new RearCamera(new CushionSeat
10 | (new CushionSeat(new MusicSystem(new BasicCar()))));
11 | System.out.println(extension.getDescription());
12 | System.out.println(extension.getCost());
13 |
14 |
15 | }
16 |
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarExtensions/MusicSystem.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarExtensions;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class MusicSystem implements CarExtension {
7 | CarExtension carExtension;
8 |
9 | public MusicSystem(CarExtension carExtension) {
10 | this.carExtension = carExtension;
11 | }
12 |
13 | @Override
14 | public String getDescription() {
15 | return carExtension.getDescription()+ ", MusicSystem";
16 | }
17 |
18 | @Override
19 | public int getCost() {
20 | return carExtension.getCost() + 50;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarExtensions/RearCamera.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarExtensions;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class RearCamera implements CarExtension {
7 | CarExtension carExtension;
8 |
9 | public RearCamera(CarExtension carExtension) {
10 | this.carExtension = carExtension;
11 | }
12 |
13 | @Override
14 | public String getDescription() {
15 | return carExtension.getDescription()+ ", RearCamera";
16 | }
17 |
18 | @Override
19 | public int getCost() {
20 | return carExtension.getCost() + 70;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarService/BasicCarService.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarService;
2 |
3 | /**
4 | * Created by Rakshith on 4/19/2017.
5 | */
6 | public class BasicCarService implements CarService {
7 |
8 | @Override
9 | public String getDescription() {
10 | return "Basic Car Service";
11 | }
12 |
13 | @Override
14 | public int getCost() {
15 | return 10;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarService/CarService.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarService;
2 |
3 | /**
4 | * Created by Rakshith on 4/19/2017.
5 | */
6 | public interface CarService {
7 | public String getDescription();
8 | public int getCost();
9 | }
10 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarService/EngineFix.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarService;
2 |
3 | /**
4 | * Created by Rakshith on 4/19/2017.
5 | */
6 | public class EngineFix implements CarService {
7 | CarService carService;
8 |
9 | public EngineFix(CarService carService) {
10 | this.carService = carService;
11 | }
12 |
13 | @Override
14 | public String getDescription() {
15 | return carService.getDescription() + ", EngineFix";
16 | }
17 |
18 | @Override
19 | public int getCost() {
20 | return carService.getCost() +50;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarService/Main.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarService;
2 |
3 | /**
4 | * Created by Rakshith on 4/19/2017.
5 | */
6 | public class Main {
7 |
8 | public static void main(String[] args) {
9 | CarService carService = new EngineFix(new OilChange(new OilChange(new TireRotation(new BasicCarService()))));
10 | System.out.println(carService.getDescription());
11 | System.out.println(carService.getCost());
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarService/OilChange.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarService;
2 |
3 | /**
4 | * Created by Rakshith on 4/19/2017.
5 | */
6 | public class OilChange implements CarService {
7 | CarService carService;
8 |
9 | public OilChange(CarService carService) {
10 | this.carService = carService;
11 | }
12 |
13 | @Override
14 | public String getDescription() {
15 | return carService.getDescription() + ", OilChange";
16 | }
17 |
18 | @Override
19 | public int getCost() {
20 | return carService.getCost() + 10;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Decorator/Pattern/CarService/TireRotation.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Decorator.Pattern.CarService;
2 |
3 | /**
4 | * Created by Rakshith on 4/19/2017.
5 | */
6 | public class TireRotation implements CarService {
7 | CarService carService;
8 | public TireRotation(CarService carService) {
9 | this.carService = carService;
10 | }
11 |
12 | @Override
13 | public String getDescription() {
14 | return carService.getDescription()+ ", Tire Rotation";
15 | }
16 |
17 | @Override
18 | public int getCost() {
19 | return carService.getCost() + 20;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Factory/Bike.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Factory;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public abstract class Bike {
7 |
8 | public abstract String getDescription();
9 | public abstract int getCost();
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Factory/BikeFactory.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Factory;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class BikeFactory {
7 | public static Bike createBike(String bikeName){
8 | Bike bike=null;
9 | if(bikeName.equalsIgnoreCase("DirtyBike"))
10 | bike = new DirtBike();
11 | else if(bikeName.equalsIgnoreCase("SkyFlyingBike"))
12 | bike = new SkyFlyingBike();
13 | else if(bikeName.equalsIgnoreCase("SportsBike"))
14 | bike = new SportsBike();
15 | else if(bikeName.equalsIgnoreCase("WaterDrowingBike"))
16 | bike = new WaterDrowingBike();
17 |
18 | return bike;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Factory/BikeShowRoom.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Factory;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class BikeShowRoom {
7 | public static void main(String[] args) {
8 | String bikeName = "SportsBike";
9 | Bike bike = BikeFactory.createBike(bikeName);
10 | System.out.println("Bike is: "+ bike.getDescription());
11 | System.out.println("Bike cost is :"+ bike.getCost());
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Factory/DirtBike.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Factory;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class DirtBike extends Bike {
7 |
8 | @Override
9 | public String getDescription() {
10 | return "DirtBike";
11 | }
12 |
13 | @Override
14 | public int getCost() {
15 | return 1000;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Factory/SkyFlyingBike.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Factory;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class SkyFlyingBike extends Bike {
7 | @Override
8 | public String getDescription() {
9 | return "Sky Flying Bike";
10 | }
11 |
12 | @Override
13 | public int getCost() {
14 | return 5000;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Factory/SportsBike.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Factory;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class SportsBike extends Bike {
7 | @Override
8 | public String getDescription() {
9 | return "SportsBike";
10 | }
11 |
12 | @Override
13 | public int getCost() {
14 | return 660;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Factory/WaterDrowingBike.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Factory;
2 |
3 | /**
4 | * Created by Rakshith on 4/21/2017.
5 | */
6 | public class WaterDrowingBike extends Bike {
7 | @Override
8 | public String getDescription() {
9 | return "Water Drowing Bike";
10 | }
11 |
12 | @Override
13 | public int getCost() {
14 | return 10;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Singleton/Main.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Singleton;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class Main {
7 | public static void main(String[] args) {
8 | Steering steering1 = Steering.getUniqueInstance();
9 | Steering steering2 = Steering.getUniqueInstance();
10 | Steering steering3 = Steering.getUniqueInstance();
11 |
12 |
13 | System.out.println(steering1);
14 | System.out.println(steering2);
15 | System.out.println(steering3);
16 |
17 |
18 |
19 |
20 |
21 |
22 | }
23 |
24 |
25 |
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/DesignPatterns/Singleton/Steering.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.Singleton;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class Steering {
7 | private String size;
8 | private volatile static Steering uniqueInstance = new Steering();
9 |
10 | private Steering() {
11 | size = "Big";
12 | }
13 |
14 | public static Steering getUniqueInstance() {
15 | if (uniqueInstance == null) {
16 | synchronized (Steering.class) {
17 | if (uniqueInstance == null) {
18 | uniqueInstance = new Steering();
19 | }
20 | }
21 |
22 | }
23 | return uniqueInstance;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/ChineseStudent.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class ChineseStudent extends Student {
7 | public ChineseStudent(String name) {
8 | super(name);
9 | socialNetwork = new Wechat();
10 | }
11 |
12 | @Override
13 | public void useSocialNetwork() {
14 | socialNetwork.useIt();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/Facebook.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class Facebook implements SocialNetwork {
7 | @Override
8 | public void useIt() {
9 | System.out.println("Using Facebook");
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/IndianStudent.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class IndianStudent extends Student {
7 |
8 | public IndianStudent(String name) {
9 | super(name);
10 | socialNetwork = new Facebook();
11 | }
12 |
13 | @Override
14 | public void useSocialNetwork() {
15 | socialNetwork.useIt();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/Main.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class Main {
7 | public static void main(String[] args) {
8 |
9 | Student rakshith = new IndianStudent("Rakshith");
10 | System.out.println("Rakshith uses :");
11 | rakshith.useSocialNetwork();
12 |
13 | Student vadim = new RussianStudent("Vadim");
14 | System.out.println("Vadim uses :");
15 | vadim.useSocialNetwork();
16 |
17 | Student zhang = new ChineseStudent("Zhang");
18 | System.out.println("Zhang uses :");
19 | zhang.useSocialNetwork();
20 |
21 |
22 | zhang.setSocialNetwork(new Facebook());
23 | System.out.println("Zhang Changed to :");
24 | zhang.useSocialNetwork();
25 |
26 |
27 |
28 |
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/RussianStudent.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class RussianStudent extends Student {
7 | public RussianStudent(String name) {
8 | super(name);
9 | socialNetwork = new Vk();
10 | }
11 |
12 | @Override
13 | public void useSocialNetwork() {
14 | socialNetwork.useIt();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/SocialNetwork.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public interface SocialNetwork {
7 |
8 | void useIt();
9 |
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/Student.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public abstract class Student{
7 | protected String Name;
8 | protected SocialNetwork socialNetwork; //Composition
9 |
10 | public Student(String name) {
11 | Name = name;
12 | }
13 |
14 | public abstract void useSocialNetwork();
15 |
16 | public void setSocialNetwork(SocialNetwork socialNetwork){
17 | this.socialNetwork = socialNetwork;
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/Vk.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class Vk implements SocialNetwork {
7 | @Override
8 | public void useIt() {
9 | System.out.println("Using Vk");
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/DesignPatterns/StrategyPattern/Wechat.java:
--------------------------------------------------------------------------------
1 | package DesignPatterns.StrategyPattern;
2 |
3 | /**
4 | * Created by Rakshith on 4/18/2017.
5 | */
6 | public class Wechat implements SocialNetwork {
7 | @Override
8 | public void useIt() {
9 | System.out.println("Using WeChat");
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/arlist/ALToA.java:
--------------------------------------------------------------------------------
1 | package arlist;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Arrays;
5 |
6 | import java.util.Collections;
7 | import java.util.List;
8 |
9 | /**
10 | * Created by Rakshith on 4/14/2017.
11 | */
12 | public class ALToA{
13 |
14 | public static void main(String[] args) {
15 | List stringList = new ArrayList<>();
16 |
17 | stringList.add(5);
18 | stringList.add(10);
19 | stringList.add(3);
20 | stringList.add(22);
21 | stringList.add(76);
22 |
23 |
24 | System.out.println("Before sort: "+ stringList);
25 | Collections.sort(stringList, new SortComparator());
26 | System.out.println("After sort: "+ stringList);
27 |
28 |
29 |
30 |
31 |
32 |
33 | }
34 |
35 |
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/arlist/Main.java:
--------------------------------------------------------------------------------
1 | package arlist;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | /**
7 | * Created by Rakshith on 4/13/2017.
8 | */
9 | public class Main {
10 | public static void main(String[] args) {
11 |
12 | List integerList = new ArrayList<>();
13 | integerList.add(5);
14 | integerList.add(35);
15 | integerList.add(75);
16 | integerList.add(105);
17 |
18 | // for (int currentInt:integerList) {
19 | // System.out.println("first: "+currentInt);
20 | // }
21 | //
22 | // for (int i=0;i {
9 | @Override
10 | public int compare(Integer o1, Integer o2) {
11 | return o2.compareTo(o1);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/school/management/system/Main.java:
--------------------------------------------------------------------------------
1 | package school.management.system;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | /**
7 | * Created by Rakshith on 4/3/2017.
8 | */
9 | public class Main {
10 | public static void main(String[] args) {
11 | Teacher lizzy = new Teacher(1,"Lizzy",500);
12 | Teacher mellisa = new Teacher(2,"Mellisa",700);
13 | Teacher vanderhorn = new Teacher(3,"Vanderhorn",600);
14 |
15 | List teacherList = new ArrayList<>();
16 | teacherList.add(lizzy);
17 | teacherList.add(mellisa);
18 | teacherList.add(vanderhorn);
19 |
20 |
21 | Student tamasha = new Student(1,"Tamasha",4);
22 | Student rakshith = new Student(2,"Rakshith Vasudev",12);
23 | Student rabbi = new Student(3,"Rabbi",5);
24 | List studentList = new ArrayList<>();
25 |
26 | studentList.add(tamasha);
27 | studentList.add(rabbi);
28 | studentList.add(rakshith);
29 |
30 |
31 |
32 |
33 | School ghs = new School(teacherList,studentList);
34 |
35 | Teacher megan = new Teacher(6,"Megan", 900);
36 |
37 | ghs.addTeacher(megan);
38 |
39 |
40 | tamasha.payFees(5000);
41 | rakshith.payFees(6000);
42 | System.out.println("GHS has earned $"+ ghs.getTotalMoneyEarned());
43 |
44 | System.out.println("------Making SCHOOL PAY SALARY----");
45 | lizzy.receiveSalary(lizzy.getSalary());
46 | System.out.println("GHS has spent for salary to " + lizzy.getName()
47 | +" and now has $" + ghs.getTotalMoneyEarned());
48 |
49 | vanderhorn.receiveSalary(vanderhorn.getSalary());
50 | System.out.println("GHS has spent for salary to " + vanderhorn.getName()
51 | +" and now has $" + ghs.getTotalMoneyEarned());
52 |
53 |
54 | System.out.println(rakshith);
55 |
56 | mellisa.receiveSalary(mellisa.getSalary());
57 |
58 | System.out.println(mellisa);
59 |
60 |
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/school/management/system/School.java:
--------------------------------------------------------------------------------
1 | package school.management.system;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Many teachers, many students.
7 | * Implements teachers and student
8 | * using an ArrayList.
9 | * Created by Rakshith on 4/3/2017.
10 | */
11 | public class School {
12 |
13 | private List teachers;
14 | private List students;
15 | private static int totalMoneyEarned;
16 | private static int totalMoneySpent;
17 |
18 | /**
19 | * new school object is created.
20 | * @param teachers list of teachers in the school.
21 | * @param students list of students int the school.
22 | */
23 | public School(List teachers, List students) {
24 | this.teachers = teachers;
25 | this.students = students;
26 | totalMoneyEarned=0;
27 | totalMoneySpent=0;
28 | }
29 |
30 | /**
31 | *
32 | * @return the list of teachers int the school.
33 | */
34 | public List getTeachers() {
35 | return teachers;
36 | }
37 |
38 | /**
39 | * Adds a teacher to the school.
40 | * @param teacher the teacher to be added.
41 | */
42 | public void addTeacher(Teacher teacher) {
43 | teachers.add(teacher);
44 | }
45 |
46 | /**
47 | *
48 | * @return the list of students in the school.
49 | */
50 | public List getStudents() {
51 | return students;
52 | }
53 |
54 | /**
55 | * Adds a student to the school
56 | * @param student the student to be added.
57 | */
58 | public void addStudent(Student student) {
59 | students.add(student);
60 | }
61 |
62 | /**
63 | *
64 | * @return the total money earned by the school.
65 | */
66 | public int getTotalMoneyEarned() {
67 | return totalMoneyEarned;
68 | }
69 |
70 | /**
71 | * Adds the total money earned by the school.
72 | * @param MoneyEarned money that is supposed to be added.
73 | */
74 | public static void updateTotalMoneyEarned(int MoneyEarned) {
75 | totalMoneyEarned += MoneyEarned;
76 | }
77 |
78 | /**
79 | *
80 | * @return the total money spent by the school.
81 | */
82 | public int getTotalMoneySpent() {
83 | return totalMoneySpent;
84 | }
85 |
86 | /**
87 | * update the money that is spent by the school which
88 | * is the salary given by the school to its teachers.
89 | * @param moneySpent the money spent by school.
90 | */
91 | public static void updateTotalMoneySpent(int moneySpent) {
92 | totalMoneyEarned-=moneySpent;
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/src/school/management/system/Student.java:
--------------------------------------------------------------------------------
1 | package school.management.system;
2 |
3 | /**
4 | * Created by Rakshith on 4/3/2017.
5 | * This class is responsible for keeping the
6 | * track of students fees, name ,grade & fees
7 | * paid.
8 | *
9 | */
10 | public class Student {
11 |
12 | private int id;
13 | private String name;
14 | private int grade;
15 | private int feesPaid;
16 | private int feesTotal;
17 |
18 | /**
19 | * To create a new student by initializing.
20 | * Fees for every student is $30,000.
21 | * Fees paid initially is 0.
22 | * @param id id for the student: unique.
23 | * @param name name of the student.
24 | * @param grade grade of the student.
25 | */
26 | public Student(int id, String name,int grade){
27 | this.feesPaid=0;
28 | this.feesTotal=30000;
29 | this.id=id;
30 | this.name=name;
31 | this.grade=grade;
32 |
33 | }
34 |
35 | //Not going to alter student's name, student's id.
36 |
37 |
38 | /**
39 | * Used to update the student's grade.
40 | * @param grade new grade of the student.
41 | */
42 | public void setGrade(int grade){
43 | this.grade=grade;
44 | }
45 |
46 |
47 | /**
48 | * Keep adding the fees to feesPaid Field.
49 | * Add the fees to the fees paid.
50 | * The school is going receive the funds.
51 | *
52 | * @param fees the fees that the student pays.
53 | */
54 | public void payFees(int fees){
55 | feesPaid+=fees;
56 | School.updateTotalMoneyEarned(feesPaid);
57 | }
58 |
59 | /**
60 | *
61 | * @return id of the student.
62 | */
63 | public int getId() {
64 | return id;
65 | }
66 |
67 | /**
68 | *
69 | * @return name of the student.
70 | */
71 | public String getName() {
72 | return name;
73 | }
74 |
75 | /**
76 | *
77 | * @return the grade of the student.
78 | */
79 | public int getGrade() {
80 | return grade;
81 | }
82 |
83 | /**
84 | *
85 | * @return fees paid by the student.
86 | */
87 | public int getFeesPaid() {
88 | return feesPaid;
89 | }
90 |
91 | /**
92 | *
93 | * @return the total fees of the student.
94 | */
95 | public int getFeesTotal() {
96 | return feesTotal;
97 | }
98 |
99 | /**
100 | *
101 | * @return the remaining fees.
102 | */
103 | public int getRemainingFees(){
104 | return feesTotal-feesPaid;
105 | }
106 |
107 | @Override
108 | public String toString() {
109 | return "Student's name :"+name+
110 | " Total fees paid so far $"+ feesPaid;
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/src/school/management/system/Teacher.java:
--------------------------------------------------------------------------------
1 | package school.management.system;
2 |
3 | /**
4 | * Created by Rakshith on 4/3/2017.
5 | * This class is responsible for keeping the track
6 | * of teacher's name, id, salary.
7 | */
8 | public class Teacher {
9 |
10 | private int id;
11 | private String name;
12 | private int salary;
13 | private int salaryEarned;
14 |
15 | /**
16 | * Creates a new Teacher object.
17 | * @param id id for the teacher.
18 | * @param name name of the teacher.
19 | * @param salary salary of the teacher.
20 | */
21 | public Teacher(int id, String name, int salary){
22 | this.id=id;
23 | this.name=name;
24 | this.salary=salary;
25 | this.salaryEarned=0;
26 | }
27 |
28 | /**
29 | *
30 | * @return the id of the teacher.
31 | */
32 | public int getId(){
33 | return id;
34 | }
35 |
36 | /**
37 | *
38 | * @return name of the teacher.
39 | */
40 | public String getName(){
41 | return name;
42 | }
43 |
44 |
45 | /**
46 | *
47 | * @return the salary of the teacher.
48 | */
49 | public int getSalary(){
50 | return salary;
51 | }
52 |
53 | /**
54 | * set the salary.
55 | * @param salary
56 | */
57 | public void setSalary(int salary){
58 | this.salary=salary;
59 | }
60 |
61 | /**
62 | * Adds to salaryEarned.
63 | * Removes from the total money earned by the school.
64 | * @param salary
65 | */
66 | public void receiveSalary(int salary){
67 | salaryEarned+=salary;
68 | School.updateTotalMoneySpent(salary);
69 | }
70 |
71 |
72 | @Override
73 | public String toString() {
74 | return "Name of the Teacher: " + name
75 | +" Total salary earned so far $"
76 | + salaryEarned;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/simple/textgui/Main.java:
--------------------------------------------------------------------------------
1 | package simple.textgui;
2 |
3 |
4 | // follow up for https://www.youtube.com/watch?v=e0X00EoFQbE
5 |
6 | import java.util.Scanner;
7 |
8 | public class Main {
9 |
10 |
11 | public static void main(String[] args) {
12 | Scanner in = new Scanner(System.in);
13 | int option;
14 | int number1, number2;
15 |
16 | while(true){
17 |
18 | System.out.println("Enter your choice. 1: Addition 2. Subtraction 3.Division 4.Multiplication 5. Exit : \n");
19 | option =Integer.parseInt(in.next());
20 |
21 | if(option==1){
22 | askForNumbers();
23 | number1 = Integer.parseInt(in.next());
24 | number2 = Integer.parseInt(in.next());
25 | float sum = number1 + number2;
26 | System.out.println("The sum is :" + sum);
27 | }
28 | else if(option == 2){
29 | askForNumbers();
30 | number1 = Integer.parseInt(in.next());
31 | number2 = Integer.parseInt(in.next());
32 | float diff = number1 - number2;
33 | System.out.println("The difference is :" + diff);
34 | }
35 | else if(option == 3){
36 | askForNumbers();
37 | number1 = Integer.parseInt(in.next());
38 | number2 = Integer.parseInt(in.next());
39 | float quotient = number1/number2;
40 | System.out.println("The quotient is :" + quotient);
41 | }
42 | else if(option == 4){
43 | askForNumbers();
44 | number1 = Integer.parseInt(in.next());
45 | number2 = Integer.parseInt(in.next());
46 | float quotient = number1*number2;
47 | System.out.println("The product is :" + quotient);
48 | }else{
49 | break;
50 | }
51 |
52 |
53 | }
54 |
55 |
56 | }
57 |
58 | public static void askForNumbers(){
59 | System.out.println("Enter 2 numbers:");
60 | }
61 |
62 | }
63 |
--------------------------------------------------------------------------------