//VARIABLES// int many=10; float white=255, black=0; //STRINGS FOR ARRAY// String names[]= { "Richard", "Michael", "Steven", "James", "Andrew", "Jimmy", "David", "Leonard", "Max", "Adam"}; String columns[]= { "NAMES", "AGE", "WEIGHT", "HEIGHT", "BMI"}; String age[]= {"19", "23", "35", "18", "24", "31", "21", "37", "40", "28"}; String weight[]= { "130", "156", "187", "109", "210", "148", "115", "123", "203"}; void setup() { background(white); smooth(); size(800,600); //INTIALIZE// } void draw() { drawtable(); screentext(); info(); } //NAME, DATE, OTHER TEXT// void screentext() { fill(black); textSize(13); text("Rune Hernandez",10,20); text("Project 8",10,35); textSize(25); text("Table",370,90); } //TABLE THAT WILL HOLD INFO// void drawtable() { fill (white); stroke(black); strokeWeight(3); rect (100, 100, 600, 300); //VERICLE LINES -- ARRAY FOR NAMES// strokeWeight(2); stroke(black); int n=0; for (int y= 130; y<400; y= y+30){ fill(black); line(100, y, 700, y); textSize(15); text(""+names[n], 110, y+20); n= n+1; } //HORIZONTLE LINES -- ARRAY FOR COLUMNS// strokeWeight(2); stroke(black); int c=0; for (int x= 100; x<600; x= x+120){ line(x, 100, x, 400); textSize(15); text(""+columns[c], x+20, 120); c= c+1; } } //INFORMATION ON THE CHART// void info() { //WEIGHT// int w=0; for (int y= 130; y<400; y= y+30){ fill(black); textSize(12); text(""+weight[w], 390, y+20); w= w+1; } //AGE// int a=0; for (int y= 130; y<400; y= y+30){ fill(black); textSize(12); text(""+age[a], 270, y+20); a= a+1; } }