User Tools

Site Tools


epgy:msp2013:assignment_9

MSP - Assignment 9

What does this code do?

void draw() {
    background(254, 216, 255);
   
    if ((mouseX > x) && (mouseX < x+w) && (mouseY > y) && (mouseY < y+h)) {
           fill(171, 90, 240);
    } 
    
    else {
           fill(24, 118, 198);
    }
    
    rect(x, y, w, h);
}

Eclipse

Create a function called print.

public static void print (Object s)
{
    System.out.println(s);
}

Print 10 different things with your print function. Then put everything in your PasteBin.


Processing

Read about objects. They are important. Try this code in Processing.

http://processing.org/tutorials/objects/


Logic Gates

/soe/sherol/.html/teaching/data/pages/epgy/msp2013/assignment_9.txt · Last modified: 2013/07/04 08:53 by ffpaladin