-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmeta.yaml
9880 lines (6826 loc) · 326 KB
/
meta.yaml
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
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
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
719
720
721
722
723
724
725
726
727
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
760
761
762
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
914
915
916
917
918
919
920
921
922
923
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
988
989
990
991
992
993
994
995
996
997
998
999
1000
Level0:
Module0:
01_demo:
_readme: "# 01 Demo\n\nFor our first Java program, we're going to run a program\
\ that creates a\nrectangle on the screen, but to do that, you will have to\
\ first learn how to\nwork with code files in the LEAGUE's development environment.\
\ \n\nVisit this [Guide to Using Module Repositories](https://curriculum.jointheleague.org/java/module_repos.html)\
\ and follow the instructions to fork this module and run the demo program,\
\ or watch the video below. For convience, here is the green button you'll\
\ have to press to fork the module:\n\n<center>{{ forkrepo(fm_level, fm_module)\
\ }}</center><br/>\n\n<center><iframe width=\"700\" height=\"525\" src=\"\
https://www.youtube.com/embed/svTv-EmyU5c?si=7ZW8UjqhLbThYNSg\" title=\"YouTube\
\ video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write;\
\ encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"\
strict-origin-when-cross-origin\" allowfullscreen></iframe></center>\n\n*If\
\ you have already started a codespace,* clicking on the green \"Code\" button\
\ will give you a \npopup like this:\n\n<center><img src=\"./multiple_codespaces.png\"\
\ width=\"400px\"></center> \n\nJust click on one of the crazy names to open\
\ up that codespace. \n\nWhen you are done, you will have started a java program\
\ to draw a red square. \n\n<center><img src=\"./images/red_square.png\" width=\"\
500px\"/></center> \n\nNow go to the next lesson, **02 Code Flow**. "
assignments:
- assignment: 01_demo
dir: levels/Level0/Module0/src/_01_demo
lesson: 01_demo
level: Level0
module: Module0
oassignment: 01_demo
opath: levels/Level0/Module0/src/_01_demo
resources:
- levels/Level0/Module0/src/_01_demo/images/multiple_codespaces.png
- levels/Level0/Module0/src/_01_demo/images/red_square.png
text: "# 01 Demo\n\nFor our first Java program, we're going to run a program\
\ that creates a\nrectangle on the screen, but to do that, you will have\
\ to first learn how to\nwork with code files in the LEAGUE's development\
\ environment. \n\nVisit this [Guide to Using Module Repositories](https://curriculum.jointheleague.org/java/module_repos.html)\
\ and follow the instructions to fork this module and run the demo program,\
\ or watch the video below. For convience, here is the green button you'll\
\ have to press to fork the module:\n\n<center>{{ forkrepo(fm_level, fm_module)\
\ }}</center><br/>\n\n<center><iframe width=\"700\" height=\"525\" src=\"\
https://www.youtube.com/embed/svTv-EmyU5c?si=7ZW8UjqhLbThYNSg\" title=\"\
YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay;\
\ clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\"\
\ referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe></center>\n\
\n*If you have already started a codespace,* clicking on the green \"Code\"\
\ button will give you a \npopup like this:\n\n<center><img src=\"./multiple_codespaces.png\"\
\ width=\"400px\"></center> \n\nJust click on one of the crazy names to\
\ open up that codespace. \n\nWhen you are done, you will have started a\
\ java program to draw a red square. \n\n<center><img src=\"./images/red_square.png\"\
\ width=\"500px\"/></center> \n\nNow go to the next lesson, **02 Code Flow**. "
title: 01 Demo
02_code_flow:
_readme: "# Code Flow\n\nIn this lesson you will learn to use loops and logical\
\ conditions\nto make choices. \n\nTo complete these lessons, you should:\n\
\n* Visit your Github account on [Github.com](https://github.com)\n* Look\
\ for the Repository named `Level0-Module0`\n* Click on the green \"Code\"\
\ button.\n* Select the \"Codespaces\" tab\n* If you have a Green button that\
\ reads \"Create codespace on main\", click on it\n* If you don't have that\
\ green button, you have a running code space. Either open the window where\
\ it is running, or click on the name of the code space in the popup window.\
\ \n\n"
assignments:
- assignment: 02_code_flow
dir: levels/Level0/Module0/src/_02_code_flow/_1_robot_square
lesson: 02_code_flow
level: Level0
module: Module0
oassignment: 1_robot_square
opath: levels/Level0/Module0/src/_02_code_flow/_1_robot_square
resources:
- levels/Level0/Module0/src/_02_code_flow/_1_robot_square/.web/robotSquare.png
text: '
# Robot Square
<hr/>
<img alt="square image" src="./images/robotSquare.png"/>
## Goal:
Use a loop to draw a square using a Robot.
## Steps:
1. Find the RobotSquare recipe program ( RobotSquare.java ) and open it
using Eclipse.
2. Follow the instructions in the program to help you make a Robot draw
a square.
'
title: 02 Code Flow
- assignment: 02_code_flow
dir: levels/Level0/Module0/src/_02_code_flow/_2_robot_spiral
lesson: 02_code_flow
level: Level0
module: Module0
oassignment: 2_robot_spiral
opath: levels/Level0/Module0/src/_02_code_flow/_2_robot_spiral
resources:
- levels/Level0/Module0/src/_02_code_flow/_2_robot_spiral/.web/spiral.png
text: '
# Robot Spiral
<hr/>
<img alt="spiral image" src="./images/spiral.png"/>
## Goal:
Use a loop to draw a spiral pattern using a Robot
## Steps:
1. Find the RobotSpiral recipe program ( RobotSpiral.java ) and open it
using Eclipse.
2. Follow the instructions in the program to help you make a Robot draw
a spiral pattern.
'
title: 02 Code Flow
- assignment: 02_code_flow
dir: levels/Level0/Module0/src/_02_code_flow/_3_pentagon_crazy
lesson: 02_code_flow
level: Level0
module: Module0
oassignment: 3_pentagon_crazy
opath: levels/Level0/Module0/src/_02_code_flow/_3_pentagon_crazy
resources:
- levels/Level0/Module0/src/_02_code_flow/_3_pentagon_crazy/.web/pentagonCrazy.png
text: '
# Pentagon Crazy
<hr/>
<img alt="pentagon image" src="./images/pentagonCrazy.png"/>
## Goal:
Use int variables in a loop to draw a pentagonal pattern using a Robot
## Steps:
1. Find the Pentagon Crazy recipe program ( PentagonCrazy.java ) and open
it using Eclipse.
2. Follow the instructions in the program to help you make a Robot draw
a pentagonal pattern.
'
title: 02 Code Flow
- assignment: 02_code_flow
dir: levels/Level0/Module0/src/_02_code_flow/_4_flaming_ninja_star
lesson: 02_code_flow
level: Level0
module: Module0
oassignment: 4_flaming_ninja_star
opath: levels/Level0/Module0/src/_02_code_flow/_4_flaming_ninja_star
resources:
- levels/Level0/Module0/src/_02_code_flow/_4_flaming_ninja_star/.web/flamingNinja1.png
- levels/Level0/Module0/src/_02_code_flow/_4_flaming_ninja_star/.web/flamingNinja2.png
- levels/Level0/Module0/src/_02_code_flow/_4_flaming_ninja_star/.web/flamingNinja3.png
text: '
# Flaming Ninja Star
<hr/>
<img alt="Flaming Ninja Star image" src="./images/flamingNinja3.png"/>
## Goal:
Use int variables in a loop to draw a flaming ninja star.
## Steps:
1. Find the Flaming Ninja Star recipe program ( FlamingNinjaStar.java )
and open it using Eclipse.
2. Follow the instructions in the program to draw the star.
3. The first time you run the program, it should look like this
4. After you add the color, it should look like this
5. Using a loop to repeat the pattern, the flaming star will be complete.
'
title: 02 Code Flow
03_print_and_popups:
_readme: ''
assignments:
- assignment: 03_print_and_popups
dir: levels/Level0/Module0/src/_03_print_and_popups/_1_greeter
lesson: 03_print_and_popups
level: Level0
module: Module0
oassignment: 1_greeter
opath: levels/Level0/Module0/src/_03_print_and_popups/_1_greeter
resources:
- levels/Level0/Module0/src/_03_print_and_popups/_1_greeter/.web/greeter.png
text: '
# Greeter
<hr/>
<img src="./images/greeter.png"/>
## Goal:
Print a global greeting to the console. Then use input and message dialogs
to join Strings and send the user a friendly greeting!
## Steps:
1. Create a new class called Greeter.
2. Add a main method. Eclipse has a helpful schortcut - main
3. Print "Hello World!" to the console. Eclipse has a helpful schortcut
- syso
4. Now ask the user for their name. The code looks like this:
```
String input = JOptionPane.showInputDialog("What is your name?");
```
5. Join their name to the end of this greeting. The code looks like this.
```
JOptionPane.showMessageDialog(null,"Hello "+input);
```
'
title: 03 Print And Popups
- assignment: 03_print_and_popups
dir: levels/Level0/Module0/src/_03_print_and_popups/_2_madlibs
lesson: 03_print_and_popups
level: Level0
module: Module0
oassignment: 2_madlibs
opath: levels/Level0/Module0/src/_03_print_and_popups/_2_madlibs
resources:
- levels/Level0/Module0/src/_03_print_and_popups/_2_madlibs/.web/madlibs.png
text: '
# Madlibs
<hr/>
<img alt="madlibs image" src="./images/madlibs.png"/>
## Goal:
Have you ever played Madlibs? You will get to use input and message dialogs
to join Strings and build your own Madlib story.
## Steps:
1. Find the Madlibs ecipe program ( MadlibsOfTheAmazon.java ) and open it
using Eclipse.
2. Follow the instructions in the program to help you make a hilarious story
about crossing a piranha-infested river.
3. You can invent your own madlib story too!
'
title: 03 Print And Popups
- assignment: 03_print_and_popups
dir: levels/Level0/Module0/src/_03_print_and_popups/_3_world_domination
lesson: 03_print_and_popups
level: Level0
module: Module0
oassignment: 3_world_domination
opath: levels/Level0/Module0/src/_03_print_and_popups/_3_world_domination
resources:
- levels/Level0/Module0/src/_03_print_and_popups/_3_world_domination/.web/worldDomination.jpg
text: '
# World Domination
<hr/>
<img alt="world domination image" src="./images/worldDomination.jpg"/>
## Goal:
Use an if / else statement and pop-ups to find out if a person might get
to rule the world!
## Steps:
1. Find the World Domination recipe program ( WorldDomination.java ) and
open it using Eclipse.
2. Follow the instructions in the program to find out if a person might
get to rule the world!.
'
title: 03 Print And Popups
- assignment: 03_print_and_popups
dir: levels/Level0/Module0/src/_03_print_and_popups/_4_quiz_game
lesson: 03_print_and_popups
level: Level0
module: Module0
oassignment: 4_quiz_game
opath: levels/Level0/Module0/src/_03_print_and_popups/_4_quiz_game
resources:
- levels/Level0/Module0/src/_03_print_and_popups/_4_quiz_game/.web/quiz.png
text: '
# Quiz Game
<hr/>
<img alt="quiz image" src="./images/quiz.png"/>
## Goal:
Use pop-ups to ask the user "quiz" questions. Use if / else to check their
answers.
## Steps:
1. Find the Quiz Game recipe program ( QuizGame.java ) and open it using
Eclipse.
2. Follow the instructions in the program to code this game.
'
title: 03 Print And Popups
- assignment: 03_print_and_popups
dir: levels/Level0/Module0/src/_03_print_and_popups/_5_awesome_or_not
lesson: 03_print_and_popups
level: Level0
module: Module0
oassignment: 5_awesome_or_not
opath: levels/Level0/Module0/src/_03_print_and_popups/_5_awesome_or_not
resources:
- levels/Level0/Module0/src/_03_print_and_popups/_5_awesome_or_not/.web/awesome.jpg
text: '
# Awesome or Not
<hr/>
<img alt="awesome image" src="./images/awesome.jpg"/>
## Goal:
Use random numbers and pop-ups to respond to a user''s input
## Steps:
1. Find the Awesome or Not recipe program ( AwesomeOrNot.java ) and open
it using Eclipse.
2. Follow the instructions in the program to code this game.
'
title: 03 Print And Popups
04_amazing_games:
_readme: ''
assignments:
- assignment: 04_amazing_games
dir: levels/Level0/Module0/src/_04_amazing_games/_1_scary_maze
lesson: 04_amazing_games
level: Level0
module: Module0
oassignment: 1_scary_maze
opath: levels/Level0/Module0/src/_04_amazing_games/_1_scary_maze
resources:
- levels/Level0/Module0/src/_04_amazing_games/_1_scary_maze/.web/standardMaze.png
text: '
# Scary Maze
<hr/>
<img alt="maze image" src="./images/standardMaze.png"/>
## Goal:
Design and build a maze game
## Steps:
1. Find the Scary Maze recipe program ( ScaryMaze.java ) and open it using
Eclipse.
2. Follow the instructions in the program to help you design and build a
maze game.
'
title: 04 Amazing Games
- assignment: 04_amazing_games
dir: levels/Level0/Module0/src/_04_amazing_games/_2_dragon_fight
lesson: 04_amazing_games
level: Level0
module: Module0
oassignment: 2_dragon_fight
opath: levels/Level0/Module0/src/_04_amazing_games/_2_dragon_fight
resources:
- levels/Level0/Module0/src/_04_amazing_games/_2_dragon_fight/.web/dragonPicture.jpg
text: '
# Dragon Fight
<hr/>
<img alt="dragon fight image" src="./images/dragonPicture.jpg"/>
## Goal:
Use random numbers and pop-ups in a while loop to fight a dragon for its
treasure.
## Steps:
1. Find the Dragon Fight recipe program ( DragonFight.java ) and open it
using Eclipse.
2. Follow the instructions in the program to code this game.
'
title: 04 Amazing Games
99_extra:
_readme: ''
assignments:
- assignment: 99_extra
dir: levels/Level0/Module0/src/_99_extra
lesson: 99_extra
level: Level0
module: Module0
oassignment: 99_extra
opath: levels/Level0/Module0/src/_99_extra
resources:
- levels/Level0/Module0/src/_99_extra/.web/triangle.png
- levels/Level0/Module0/src/_99_extra/.web/decagon.png
- levels/Level0/Module0/src/_99_extra/.web/oneStar.png
- levels/Level0/Module0/src/_99_extra/.web/triangleShell.png
- levels/Level0/Module0/src/_99_extra/.web/starShow.png
- levels/Level0/Module0/src/_99_extra/.web/square.png
text: '
# Triangle Shell
<hr/>
<img alt="Star Show image" src="./images/triangleShell.png"/>
## Goal:
Use int variables and a loop to draw a pattern with triangles.
## Steps:
1. Find the Triangle Shell recipe program ( TriangleShell.java ) and open
it using Eclipse.
2. Follow the instructions in the program to draw the pattern.
3. The first time you run the program, it should look like this
4. After you add all the triangles, it should look something like this
'
title: 99 Extra
_readme: "# Level0-Module0\n\nLevel 0 has coding exercises, which we call \"recipies\"\
, for students who have just started programming. \n\nWith these recipes, students\
\ will learn how to:\n\n1. Draw shapes and images using Processing\n2. Control\
\ the flow of code using if statements and loops \n3. Print Strings and use\
\ dialogs to interact with a user \n4. Build simple games using skills learned\n\
\n## Navigating the Lessons\n\nIn the LEAGUE's online Java curriculum, the lessons\
\ are organized\ninto _levels_, _modules_, _lessons_ and _assignments_. Every\
\ level has a\nwhole website, like this one. Inside the level are modules.\
\ Modules are\nnamed with a number at the end, like \"Module 0\", and they will\
\ have links\nwith a large bold title on the left side of the page, which you\
\ can see on\nthe left side menu in this page. \n\nAt the top of this page you\
\ will see three colored buttons. \n\n<center><img src=\"http://images.jointheleague.org/module-navigation/three_buttons.png\"\
\ width=\"400px\"></center> \n\nThese buttons are how you will get access to\
\ the code for your lessons and create web based\neditors for completing your\
\ lessons. In your first lesson, `01 Demo` you will \nlearn how to use these\
\ buttons to get source code and start up a web based editor. \n\nThere is one\
\ more important link. If you visit one of the assignment pages, like \n[this\
\ one](http://localhost:8080/Level0/lessons/Module0/02_code_flow/)\nyou will\
\ see a <img style=\"vertical-align:middle\" src=\"http://images.jointheleague.org/module-navigation/source_link.png\"\
\ height=\"25px\">\n link. This link will take you into the Module repositopry,\
\ to the specific\ndirectory that has the assignment you are working on. \n\n\
## Start the First Assigment\n\nTo Start the first assignment, click on the\
\ first lesson in the left sidemenu. The lesson is named '01 Demo', just under\
\ 'Module0'\n\n"
Module1:
01_variables:
_readme: "\n# What is a Variable?\n\n- Variables are used to hold values in\
\ your Java program\n- Before you can put a value into a variable you must\
\ declare, or create it. How?\n - First describe the \"type\" of information\
\ it will hold, for example:\n - String or int\n - Next give it a \"meaningful\"\
\ name or identifier, for example:\n - nameOfSchool or numberOfStudents\n\
\ \n ```java\n String nameOfSchool;\n Int numberOfStudents;\n\
\ ```\n\n- Rules for naming variables\n - Start with a lowercase letter\n\
\ - Use camel case\n - Can include numbers and underscores, but not spaces\
\ or special characters\n - Should be meaningful, i.e. self-documenting\n\
\ - You declare a variable once, but you can use it many times in the code\n\
\n## Using a Variable\n\nAfter you have declared a variable, you need to give\
\ it a value before it can be useful to your program. The first time you put\
\ a value in a variable, is called \"variable initialization\". See example\
\ below:\n\n```java\nnameOfSchool = \"Queen Mary\";\nnumberOfStudents = 1000;\n\
```\n\n**Note:** The type of information you put into the variable must match\
\ the type you gave the variable when you declared it.\n\nYou can also initialize\
\ a variable in the same line of code that you declared it as follows:\n\n\
```java\nString nameOfSchool = \"Queen Mary\";\nInt numberOfStudents = 1000;\n\
```\n\nIf you try to use a variable that has no value, you might get an error\
\ like this:\n\n```\nException in thread \"main\" java.lang.NullPointerException\n\
```\n"
assignments:
- assignment: 01_variables
dir: levels/Level0/Module1/src/_01_variables
lesson: 01_variables
level: Level0
module: Module1
oassignment: 01_variables
opath: levels/Level0/Module1/src/_01_variables
resources:
- levels/Level0/Module1/src/_01_variables/.web/Variables1.png
- levels/Level0/Module1/src/_01_variables/.web/Variables2.png
text: "\n# What is a Variable?\n\n- Variables are used to hold values in your\
\ Java program\n- Before you can put a value into a variable you must declare,\
\ or create it. How?\n - First describe the \"type\" of information it\
\ will hold, for example:\n - String or int\n - Next give it a \"meaningful\"\
\ name or identifier, for example:\n - nameOfSchool or numberOfStudents\n\
\ \n ```java\n String nameOfSchool;\n Int numberOfStudents;\n\
\ ```\n\n- Rules for naming variables\n - Start with a lowercase letter\n\
\ - Use camel case\n - Can include numbers and underscores, but not spaces\
\ or special characters\n - Should be meaningful, i.e. self-documenting\n\
\ - You declare a variable once, but you can use it many times in the code\n\
\n## Using a Variable\n\nAfter you have declared a variable, you need to\
\ give it a value before it can be useful to your program. The first time\
\ you put a value in a variable, is called \"variable initialization\".\
\ See example below:\n\n```java\nnameOfSchool = \"Queen Mary\";\nnumberOfStudents\
\ = 1000;\n```\n\n**Note:** The type of information you put into the variable\
\ must match the type you gave the variable when you declared it.\n\nYou\
\ can also initialize a variable in the same line of code that you declared\
\ it as follows:\n\n```java\nString nameOfSchool = \"Queen Mary\";\nInt\
\ numberOfStudents = 1000;\n```\n\nIf you try to use a variable that has\
\ no value, you might get an error like this:\n\n```\nException in thread\
\ \"main\" java.lang.NullPointerException\n```\n"
title: 01 Variables
02_colors:
_readme: ''
assignments:
- assignment: 02_colors
dir: levels/Level0/Module1/src/_02_colors/VennDiagram
lesson: 02_colors
level: Level0
module: Module1
oassignment: VennDiagram
opath: levels/Level0/Module1/src/_02_colors/VennDiagram
resources:
- levels/Level0/Module1/src/_02_colors/VennDiagram/.web/whiteCircles.png
- levels/Level0/Module1/src/_02_colors/VennDiagram/.web/colorfulCircles.png
- levels/Level0/Module1/src/_02_colors/VennDiagram/.web/redCircles.png
- levels/Level0/Module1/src/_02_colors/VennDiagram/.web/vennDiagram.png
text: "\n\n# Venn Diagram of Me\n\nNote: This lesson uses Processing, which\
\ is not used in every class. If your\ninstructor has not introduced you\
\ to Processing, you can skip this lesson. \n\n## Goal\n\nUse the RGB color\
\ model to create a Venn Diagram that showcases your personality.\n\n##\
\ Steps\n\n1. Find the Venn Diagram recipe program ( VennDiagram.pde ) and\
\ open it using Processing.\n2. Run the program and you should see an empty\
\ gray window.\n3. After the size() command, add code to draw 3 circles\
\ to form a Venn Diagram (see picture).\nThe command to draw a circle in\
\ Processing is:\n\n```\nellipse (centerX, centerY, circleWidth, circleHeight);\n\
```\n\nChange the values of `centerX`, `centerY`, `circleWidth` and `circleHeight`\
\ of each\nellipse until they overlap as in the picture.\n\nRun the program.\
\ It should look a bit like this.\n\n<center><img src=\"./whiteCircles.png\"\
\ width=\"400px\"></center> \n\n\nNow to add the colors. Processing uses\
\ the following command to draw in color:\n```\nfill(red, green, blue, opacity);\n\
```\n\nwhere red, green, blue, and opacity are all numbers between 0 and\
\ 255. So to make see-through red circles, we add the following line of\
\ code BEFORE we draw the circles.\n```\nfill(255, 0, 0, 100);\n```\n\n\
Run the program. It should look a bit like this.\n\n\n We can now see the\
\ edges of all the circles because we made\n them \"see-through\" by setting\
\ the opacity to 100 (which is < 255) Add more\n fill commands (you will\
\ have to figure out where to put them) so that each\n ellipse has its own\
\ unique color. Label each of the circles with an aspect\n of your personality.\
\ Processing uses the following command to draw text. You\n will need to\
\ put numbers in place of xLocation, and yLocation. Play around\n with the\
\ x and y until it works with your diagram.\n\n ``` text\n (\"TEXT\", xLocation,\
\ yLocation); \n ```\n\nYou can also make the text larger by changing the\
\ sizeOfLetters (you will have to figure out where to put this)\n```\ntextSize(sizeOfLetters);\n\
```\n4. Change the x and y of each ellipse until they overlap as in the\
\ picture.\n5. Run the program. It should look a bit like this\n6. Now to\
\ add the colors. Processing uses the following command to draw in color:\n\
```\nfill(red, green, blue, opacity);\n```\n\nwhere red, green, blue, and\
\ opacity are all numbers between 0 and 255. So to make see-through red\
\ circles, we add the following line of code BEFORE we draw the circles.\n\
```\nfill(255, 0, 0, 100);\n```\n\nRun the program. It should look a bit\
\ like this We can now see the edges of\nall the circles because we made\
\ them \"see-through\" by setting the opacity to\n100 (which is < 255) Add\
\ more fill commands (you will have to figure out\nwhere to put them) so\
\ that each ellipse has its own unique color.\n\nLabel each of the circles\
\ with an aspect of your personality. Processing uses\nthe following command\
\ to draw text. You will need to put numbers in place of\nxLocation, and\
\ yLocation. Play around with the x and y until it works with\nyour diagram.\n\
\n```\ntext(\"TEXT\", xLocation, yLocation);\n```\n\nYou can also make the\
\ text larger by changing the sizeOfLetters (you will have\nto figure out\
\ where to put this)\n\n```\ntextSize(sizeOfLetters);\n```\nRun the program.\
\ It should look a bit like this:\n\n\n<center><img src=\"./redCircles.png\"\
\ width=\"400px\"></center> \n\n We can now see the edges of all the circles\
\ because we made\n them \"see-through\" by setting the opacity to 100 (which\
\ is < 255)\n\nAdd more fill commands (you will have to figure out where\
\ to put them) so that\neach ellipse has its own unique color.\n\n<center><img\
\ src=\"./colorfulCircles.png\" width=\"400px\"></center> \n\nLabel each\
\ of the circles with an aspect of your personality. Processing uses\nthe\
\ following command to draw text. You will need to put numbers in place\
\ of\nxLocation, and yLocation. Play around with the x and y until it works\
\ with\nyour diagram.\n\n```\ntext(\"TEXT\", xLocation, yLocation);\n\n\
```\n\nYou can also make the text larger by changing the sizeOfLetters (you\
\ will have\nto figure out where to put this)\n\n```\ntextSize(sizeOfLetters);\n\
```\n\n\n\n"
title: 02 Colors
03_if_else:
_readme: '
[Open in Codespaces](https://codespaces.new/League-Java/Level0-Module1)
'
assignments:
- assignment: 03_if_else
dir: levels/Level0/Module1/src/_03_if_else/_1_unbirthday
lesson: 03_if_else
level: Level0
module: Module1
oassignment: 1_unbirthday
opath: levels/Level0/Module1/src/_03_if_else/_1_unbirthday
resources:
- levels/Level0/Module1/src/_03_if_else/_1_unbirthday/.web/unbirthday.jpg
text: '
# Unbirthday
<hr/>
<img src="./images/unbirthday.jpg"/>
## Goal:
Find out if today is the user''s birthday!
## Steps:
1. Ask the user for their birthday (mm/dd), e.g. 06/09
2. If it matches today''s date, wish them a happy birthday
3. otherwise, wish them a very merry UNbirthday
Optional: Watch [this video](https://www.youtube.com/watch?v=iL2Wm-PcfPo).
'
title: 03 If Else
- assignment: 03_if_else
dir: levels/Level0/Module1/src/_03_if_else/_2_remarkable
lesson: 03_if_else
level: Level0
module: Module1
oassignment: 2_remarkable
opath: levels/Level0/Module1/src/_03_if_else/_2_remarkable
resources:
- levels/Level0/Module1/src/_03_if_else/_2_remarkable/.web/wow.jpg
text: '
# Remarkable
<hr/>
<img src="./images/wow.jpg"/>
## Goal:
Find out something remarkable about the people in your class. When the user
enters a name into your program, they will learn something remarkable about
that person.
## Steps:
1. Write the names of all the students on the white board
2. Depending on which user types their name, tell them something remarkable
about themselves
3. Have students walk round and try each other''s programs
'
title: 03 If Else
- assignment: 03_if_else
dir: levels/Level0/Module1/src/_03_if_else/_3_secret_message_box
lesson: 03_if_else
level: Level0
module: Module1
oassignment: 3_secret_message_box
opath: levels/Level0/Module1/src/_03_if_else/_3_secret_message_box
resources:
- levels/Level0/Module1/src/_03_if_else/_3_secret_message_box/.web/messageBox.jpg
text: '
# Secret Message Box
<hr/>
<img src="./images/messageBox.jpg"/>
## Goal:
Share a secret message!
## Steps:
1. Create a password and store it in a String variable.
2. Using a pop-up, ask the first person for a secret message and store it
in a variable.
3. Now use a pop-up to tell the NEXT user that they can only see the secret
message if they can guess the passcode.
4. If their guess matches the password, show them the secret message.
5. If the password does not match, pop-up "INTRUDER!!"
'
title: 03 If Else
- assignment: 03_if_else
dir: levels/Level0/Module1/src/_03_if_else/_4_tasty_tomato/tasty_tomato
lesson: 03_if_else
level: Level0
module: Module1
oassignment: 4_tasty_tomato
opath: levels/Level0/Module1/src/_03_if_else/_4_tasty_tomato/tasty_tomato
resources:
- levels/Level0/Module1/src/_03_if_else/_4_tasty_tomato/tasty_tomato/.web/tomato.png
text: '
# Tasty Tomato
<hr/>
<img alt="Tasty Tomato image.." src="./images/tomato.png"/>
## Goal:
Draw a tomato and take a bite out of it!
## Steps:
1. Find the Tasty Tomato recipe program ( tasty_tomato.pde ) and open it
using Processing.
2. Make the tomato red.
3. Make the stem green.
4. Take a bite out of the tomato (see the picture).
5. Only bite the tomato when the mouse is pressed.
6. Make sure you SAVE YOUR CODE when you are done.
'
title: 03 If Else
- assignment: 03_if_else
dir: levels/Level0/Module1/src/_03_if_else/_5_pizza/pizza
lesson: 03_if_else
level: Level0
module: Module1
oassignment: 5_pizza
opath: levels/Level0/Module1/src/_03_if_else/_5_pizza/pizza
resources:
- levels/Level0/Module1/src/_03_if_else/_5_pizza/pizza/.web/pizza.jpeg
text: "\n\n# Pizza\n\n<hr/>\n<img src=\"./images/pizza.jpeg\"/>\n\n## Goal:\n\
\nMake a pizza with whatever toppings you can imagine!\n\n## Steps:\n\n\
1. Find the Pizza recipe program ( pizza.pde ) and open it using Processing.\n\
2. Set your canvas size in the setup method.\n```\n\nsize(width, height);\n\
```\n3. Draw a biscuit colored ellipse for the pizza base, a red ellipse\
\ for sauce and a yellow ellipse inside (for the cheese).\nDo this in the\
\ setup method. You can use R,G,B values or the Processing Color Selector\
\ Tool to help you find the right colors.\n```\n\nfill(color);\nellipse(x,\
\ y, width, height);\n```\n4. Get some topping images for your pizza. Some\
\ examples are provided for you, but if you want to choose your own toppings\
\ you can.\n\n\nMake a PImage variable for each type of topping at the top\
\ of the sketch:\n```\nPImage pepperoni;\n```\nDrag and drop the topping\
\ image file onto your sketch.\nLoad the topping image (in the setup method):```\n\
pepperoni = loadImage(\"pepperoni.png\");\n```\nIn the draw method, use\
\ the image command to draw the topping somewhere on your pizza:\n```\n\
image(pepperoni,200,200);\n```\nIf your topping is too big for the pizza,\
\ resize the topping image. Do this in the setup method.\n```\npepperoni.resize(30,\
\ 30);\n```\n\nRepeat the above steps for more toppings.\n\nAdd more code\
\ so that the toppings are only drawn when the user clicks the mouse (in\
\ draw method).\nMake sure you SAVE YOUR CODE when you are done. \n \
\ \nOPTIONAL Add a different topping with the\
\ right mouse click.\n```\n\nif (mousePressed && (mouseButton == RIGHT))\
\ {}\n```\n\nOPTIONAL Use a background image to put the pizza in a box.\n\
```\n\nPImage pizzaBox = loadImage(\"box.jpg\"); //in setup method\n\
pizzaBox.resize(width, height); //to match your canvas size\nbackground(pizzaBox);\
\ //in setup method\n```\n\nOPTIONAL: To play a sound when you add\
\ a topping....\n First download a sound\
\ from freesound.org and drop it onto your sketch\n\n \
\ Import the minim library Pocessing > tools > add tools\
\ > libraries (search minim)\n```\n\nimport ddf.minim.*; //at the top\
\ of the sketch\nMinim minim; //at the top of the sketch\nAudioPlayer\
\ sound; //at the top of the sketch\n\nminim = new Minim(this); \
\ //in the setup method\nsound = minim.loadFile(\"ding.wav\"); //in\
\ the setup method\n\n// Put next 2 lines where you want the sound to play\n\
sound.play();\nsound.rewind();\n```\n5. Make a PImage variable for each\
\ type of topping at the top of the sketch:\n```\nPImage pepperoni;\n```\n\
6. Drag and drop the topping image file onto your sketch.\n7. Load the topping\
\ image (in the setup method):```\npepperoni = loadImage(\"pepperoni.png\"\
);\n```\n8. In the draw method, use the image command to draw the topping\
\ somewhere on your pizza:\n```\nimage(pepperoni,200,200);\n```\n9. If your\
\ topping is too big for the pizza, resize the topping image. Do this in\
\ the setup method.\n```\npepperoni.resize(30, 30);\n```\n10. Repeat the\
\ above steps for more toppings.\n11. Add more code so that the toppings\
\ are only drawn when the user clicks the mouse (in draw method).\n12. Make\
\ sure you SAVE YOUR CODE when you are done.\n13. OPTIONAL Add a different\
\ topping with the right mouse click.\n```\n\nif (mousePressed && (mouseButton\
\ == RIGHT)) {}\n```\n14. OPTIONAL Use a background image to put the pizza\
\ in a box.\n```\n\nPImage pizzaBox = loadImage(\"box.jpg\"); //in setup\
\ method\npizzaBox.resize(width, height); //to match your canvas size\n\
background(pizzaBox); //in setup method\n```\n15. OPTIONAL: To play\
\ a sound when you add a topping....\nFirst download a sound from freesound.org\
\ and drop it onto your sketch\n\nImport the minim library Pocessing > tools\
\ > add tools > libraries (search minim)\n```\n\nimport ddf.minim.*; \
\ //at the top of the sketch\nMinim minim; //at the top of the sketch\n\
AudioPlayer sound; //at the top of the sketch\n\nminim = new Minim(this);\
\ //in the setup method\nsound = minim.loadFile(\"ding.wav\"); \
\ //in the setup method\n\n// Put next 2 lines where you want the sound\
\ to play\nsound.play();\nsound.rewind();\n```\n\n\n\n"
title: 03 If Else
04_int:
_readme: ''
assignments:
- assignment: 04_int