void Function_3_move () {
- Function_UserDefinde (y3);
- Function_3_withParameter(y3);
- Function_3_withOutParameter(y3);
- Function_3_codeSample_withOutParameter (y3);
- Function_3_codeSample_withParameter (y3);
- Function_3_viewSource_withOutParameter (y3);
- Function_3_viewSource_withParameter (y3);
- Function_3_sample_withOutParameter ();
- Function_3_sample_withParameter (250, 470);
+Function_UserDefinde (y3);
+Function_3_withParameter(y3);
+Function_3_withOutParameter(y3);
+Function_3_codeSample_withOutParameter (y3);
+Function_3_codeSample_withParameter (y3);
+Function_3_viewSource_withOutParameter (y3);
+Function_3_viewSource_withParameter (y3);
+Function_3_sample_withOutParameter ();
+Function_3_sample_withParameter (250, 470);
- background (102, 0, 51);
- for (int y = 0; y<width; y=y+220) {
- rect (0, y, width, 110);
- text ("Array 1 D", (width/2)-110, 70);
+background (102, 0, 51);
+for (int y = 0; y<width; y=y+220) {
+rect (0, y, width, 110);
+text ("Array 1 D", (width/2)-110, 70);
- background (255, 0, 0);
- ellipse (width/2, height/2, 950, 750);
+ellipse (width/2, height/2, 950, 750);
- text ("Array", (width/2)-50, 70);
+text ("Array 1 D", (width/2)-80, 70);
+background (255, 102, 102);
+ellipse (width/2, height/2, 950, 750);
+text ("Array 1 D", (width/2)-80, 70);
void Array_2_Article (int y4) {
- text ("How to use", (width/2)-75, y4);
- text ("Parallel Array", (width/2)-75, y4+380);
- text ("Principle is similar to that of the variable. The steps as follows.", 80, y4+30);
- text ("Step 1 : Declare", 120, y4+60);
- text ("Type follow by a symbol indicating the array and follow Array named.", 100, y4+80);
- text ("For Exemple", 100, y4+100);
- text ("int [] Value = new int [3];", 100, y4+120);
- text ("//Array declaration New at length 3", 100, y4+140);
- text ("Step 2 : Defined", 120, y4+160);
- text ("Add a value to the array within the braces.", 100, y4+180);
- text ("For Example", 100, y4+200);
- text ("int Value [] = {12, 13, 15, 17};", 100, y4+220);
- text ("//Defined value of Array, value are 12, 13, 15, 17", 100, y4+240);
- text ("Step 3 : Run", 120, y4+260);
- text ("Write a Array name only", 100, y4+280);
- text ("For Example", 100, y4+300);
- text ("Calculate (Value);", 100, y4+320);
- text ("//Pull out the value in array to use in function", 100, y4+340);
+text ("How to use", (width/2)-75, y4);
+text ("Parallel Array", (width/2)-75, y4+380);
+text ("Principle is similar to that of the variable. The steps as follows.", 80, y4+30);
+text ("Step 1 : Declare", 120, y4+60);
+text ("Type follow by a symbol indicating the array and follow Array named.", 100, y4+80);
+text ("For Exemple", 100, y4+100);
+text ("int [] Value = new int [3];", 100, y4+120);
+text ("//Array declaration New at length 3", 100, y4+140);
+text ("Step 2 : Defined", 120, y4+160);
+text ("Add a value to the array within the braces.", 100, y4+180);
+text ("For Example", 100, y4+200);
+text ("int Value [] = {12, 13, 15, 17};", 100, y4+220);
+text ("//Defined value of Array, value are 12, 13, 15, 17", 100, y4+240);
+text ("Step 3 : Run", 120, y4+260);
+text ("Write a Array name only", 100, y4+280);
+text ("For Example", 100, y4+300);
+text ("Calculate (Value);", 100, y4+320);
+text ("//Pull out the value in array to use in function", 100, y4+340);
- text ("Similar to Array 1 D very different in that each Array index is equal.", 100, y4+410);
- text ("For Example", 100, y4+430);
- text ("String [] name = {''Lucy'', ''John'', ''David''};", 100, y4+450);
- text ("int [] salary = {20000, 15000, 35000};", 100, y4+470);
+text ("Similar to Array 1 D very different in that each Array index is equal.", 100, y4+410);
+text ("For Example", 100, y4+430);
+text ("String [] name = {''Lucy'', ''John'', ''David''};", 100, y4+450);
+text ("int [] salary = {20000, 15000, 35000};", 100, y4+470);
+void Array_3_Article (int y6) {
+text ("For-Loop that index of Array", (width/2)-200, y6);
+text ("We use a for-loop to load data in each of index of Array", 120, y6+30);
+text ("EXAMPLE:", 120, y6+60);
+text ("int sum = 0;", 100, y6+80);
+text ("int [] a = {2, 4, 9, 10, 15};", 100, y6+100);
+text ("for (int i = 0; i<a.length; i++) {", 100, y6+120);
+text ("sum = sum + a[i]; }", 100, y6+140);
+text ("ARRAY LIKE A BOX THAT WE LOAD DATA ON IT", 100, y6+190);
+rect (205, y6+230, 150, 150);
+rect (385, y6+230, 150, 150);
+rect (565, y6+230, 150, 150);
+text ("INDEX = 0", 233, y6+305);
+text ("INDEX = 1", 413, y6+305);
+text ("INDEX = 2", 593, y6+305);
+text ("Click to each box for look data in box", (width/2)-150, y6+500);
+if (mouseX >= 205 && mouseX <= 355 && mouseY >= y6+230 && mouseY <= y6+380) {
+text ("data in box of index 0", 180, y6+450);
+line (270, y6+430, 270, y6+400);
+line (260, y6+420, 270, y6+400);
+line (280, y6+420, 270, y6+400);
+if (mouseX >= 385 && mouseX <= 535 && mouseY >= y6+230 && mouseY <= y6+380) {
+text ("data in box of index 1", 360, y6+450);
+line (450, y6+430, 450, y6+400);
+line (440, y6+420, 450, y6+400);
+line (460, y6+420, 450, y6+400);
+if (mouseX >= 565 && mouseX <= 715 && mouseY >= y6+230 && mouseY <= y6+380) {
+text ("data in box of index 2", 540, y6+450);
+line (630, y6+430, 630, y6+400);
+line (620, y6+420, 630, y6+400);
+line (640, y6+420, 630, y6+400);
void Array_MindMap (int y5) {
- line ((width/2)-5, y5+45, (width/2)-5, y5+100);
- line ((width/2)-210, y5+100, (width/2)+110, y5+100);
+line ((width/2)-5, y5+45, (width/2)-5, y5+100);
+line ((width/2)-210, y5+100, (width/2)+110, y5+100);
- line ((width/2)+255, y5+130, (width/2)+255, y5+185);
- line ((width/2)-275, y5+130, (width/2)-275, y5+195);
- line ((width/2)-275, y5+160, (width/2)-25, y5+160);
- line ((width/2)-25, y5+160, (width/2)-25, y5+304);
+line ((width/2)+255, y5+130, (width/2)+255, y5+185);
+line ((width/2)-275, y5+130, (width/2)-275, y5+195);
+line ((width/2)-275, y5+160, (width/2)-25, y5+160);
+line ((width/2)-25, y5+160, (width/2)-25, y5+304);
- line ((width/2)-275, y5+365, (width/2)-275, y5+305);
- line ((width/2)-275, y5+305, (width/2)-140, y5+305);
- line ((width/2)-140, y5+305, (width/2)-140, y5+160);
+line ((width/2)-275, y5+365, (width/2)-275, y5+305);
+line ((width/2)-275, y5+305, (width/2)-140, y5+305);
+line ((width/2)-140, y5+305, (width/2)-140, y5+160);
- ellipse ((width/2), y5, 300, 100);
- text ("array 1 D", (width/2)-90, y5+10);
+ellipse ((width/2), y5, 300, 100);
+text ("array 1 D", (width/2)-90, y5+10);
- ellipse ((width/2)-250, y5+100, 300, 70);
- ellipse ((width/2)+250, y5+100, 300, 70);
- text ("How to use?", (width/2)-340, y5+110);
- text ("Parallel Array", (width/2)+160, y5+110);
+ellipse ((width/2)-250, y5+100, 300, 70);
+ellipse ((width/2)+250, y5+100, 300, 70);
+text ("How to use?", (width/2)-340, y5+110);
+text ("Parallel Array", (width/2)+160, y5+110);
- ellipse ((width/2)-280, y5+230, 230, 80);
- ellipse ((width/2)-30, y5+340, 230, 80);
- ellipse ((width/2)-280, y5+400, 180, 80);
- ellipse ((width/2)+260, y5+230, 350, 100);
+ellipse ((width/2)-280, y5+230, 230, 80);
+ellipse ((width/2)-30, y5+340, 230, 80);
+ellipse ((width/2)-280, y5+400, 180, 80);
+ellipse ((width/2)+260, y5+230, 350, 100);
- text ("Array Declaration", (width/2)-365, y5+235);
- text ("Array Assignment", (width/2)-115, y5+345);
- text ("Array Run", (width/2)-330, y5+405);
- text ("Array 1 D that length of index", (width/2)+120, y5+230);
- text ("in each of array to equal", (width/2)+150, y5+250);
+text ("Array Declaration", (width/2)-365, y5+235);
+text ("Array Assignment", (width/2)-115, y5+345);
+text ("Array Run", (width/2)-330, y5+405);
+text ("Array 1 D that length of index", (width/2)+120, y5+230);
+text ("in each of array to equal", (width/2)+150, y5+250);
void Array_bicycle (float driveBicycle) {
- ellipse (driveBicycle-50, (height)-40, 70, 70);
- ellipse (driveBicycle+70, (height)-60, 100, 100);
- ellipse (driveBicycle-50, (height)-40, 20, 20);
- ellipse (driveBicycle+70, (height)-60, 50, 50);
+ellipse (driveBicycle-50, (height)-40, 70, 70);
+ellipse (driveBicycle+70, (height)-60, 100, 100);
+ellipse (driveBicycle-50, (height)-40, 20, 20);
+ellipse (driveBicycle+70, (height)-60, 50, 50);
- line (driveBicycle, (height)-120, driveBicycle+30, (height)-120);
+line (driveBicycle, (height)-120, driveBicycle+30, (height)-120);
- line (driveBicycle-50, (height)-60, driveBicycle+50, (height)-60);
- line (driveBicycle-50, (height)-190, driveBicycle-50, (height)-50);
- line (driveBicycle-50, (height)-140, driveBicycle+50, (height)-90);
- line (driveBicycle-70, (height)-190, driveBicycle-10, (height)-190);
+line (driveBicycle-50, (height)-60, driveBicycle+50, (height)-60);
+line (driveBicycle-50, (height)-190, driveBicycle-50, (height)-50);
+line (driveBicycle-50, (height)-140, driveBicycle+50, (height)-90);
+line (driveBicycle-70, (height)-190, driveBicycle-10, (height)-190);
ไม่มีความคิดเห็น:
แสดงความคิดเห็น