Commit 49980461 authored by daniel.tang's avatar daniel.tang

Upload New File

parent 97685126
package programmingP2week1;
import static java.lang.System.out;
public class colors1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
colors yellow = new colors();
yellow.r = 225;
yellow.g = 225;
yellow.b = 0;
colors purple = new colors();
purple.r = 128;
purple.g = 0;
purple.b = 128;
colors orange = new colors();
orange.r = 225;
orange.g = 165;
orange.b = 0;
out.println("Colors | Red | Green | Blue\n"
+ "---------------------------\n"
+ "Yellow | " + yellow.r + " | " + yellow.g + " | " + yellow.b +" \n"
+ "---------------------------\n"
+ "Purple | " + purple.r + " | " + purple.g + " | " + purple.b + "\n"
+ "---------------------------\n"
+ "Orange | " + orange.r + " | " + orange.g + " | " + orange.b + "\n");
out.println(yellow);
out.println(purple);
out.println(orange);
}
//void main ()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment