Java Code of a Love/Hate Relationship


Benworld <-> Class Projects/Extras <-> Family Guy <-> Fight Club <-> Notes <-> BenBlog
Harrod & Funck <-> mathEmatics <-> My New Zealand Experience <-> My Niece

import DrawCS132.*; import java.awt.*; public class MyPicture { public static void main(String[] args) { DrawingTablet myTablet = new DrawingTablet(400,600); myTablet.show(); DrawableRectangle sky = new DrawableRectangle(0,0,400,400); sky.setColor(Color.cyan); myTablet.drawShape(sky); DrawableRectangle ground = new DrawableRectangle(0,400,400,200); ground.setColor(Color.green); myTablet.drawShape(ground); DrawableRectangle head = new DrawableRectangle(140,120,120,140); head.setColor(Color.pink); myTablet.drawShape(head); DrawableCircle chin = new DrawableCircle(200,260,60); chin.setColor(Color.pink); myTablet.drawShape(chin); DrawableRectangle neck = new DrawableRectangle(180,310,40,40); neck.setColor(Color.pink); myTablet.drawShape(neck); DrawableRectangle body = new DrawableRectangle(100,340,200,260); body.setColor(Color.black); myTablet.drawShape(body); DrawableRectangle armpit = new DrawableRectangle(90,340,10,60); armpit.setColor(Color.black); myTablet.drawShape(armpit); armpit.translate(210,0); myTablet.drawShape(armpit); DrawableRectangle sleeve = new DrawableRectangle(50,340,40,120); sleeve.setColor(Color.black); myTablet.drawShape(sleeve); sleeve.translate(260,0); myTablet.drawShape(sleeve); DrawableRectangle arm = new DrawableRectangle(55,460,30,140); arm.setColor(Color.pink); myTablet.drawShape(arm); arm.translate(260,0); myTablet.drawShape(arm); DrawableCircle eye = new DrawableCircle(170,180,17); eye.setColor(Color.white); myTablet.drawShape(eye); eye.translate(60,0); myTablet.drawShape(eye); eye.scale(.6); eye.setColor(Color.green); myTablet.drawShape(eye); eye.translate(-60,0); myTablet.drawShape(eye); eye.scale(.4); eye.setColor(Color.black); myTablet.drawShape(eye); eye.translate(60,0); myTablet.drawShape(eye); DrawableTriangle eyebrow1 = new DrawableTriangle(150,160,165,140,170,150); eyebrow1.setColor(Color.gray); myTablet.drawShape(eyebrow1); DrawableTriangle eyebrow2 = new DrawableTriangle(250,160,235,140,230,150); eyebrow2.setColor(Color.gray); myTablet.drawShape(eyebrow2); DrawableLine nose1 = new DrawableLine(202,170,182,245); nose1.setColor(Color.white); myTablet.drawShape(nose1); DrawableLine nose2 = new DrawableLine(202,170,202,245); nose2.setColor(Color.white); myTablet.drawShape(nose2); DrawableLine nose3 = new DrawableLine(202,245,182,245); nose3.setColor(Color.white); myTablet.drawShape(nose3); DrawableCircle tear = new DrawableCircle(185,190,3); tear.setColor(Color.blue); myTablet.drawShape(tear); tear.translate(65,60); myTablet.drawShape(tear); DrawableLine lightRef = new DrawableLine(185,189,186,189); lightRef.setColor(Color.white); myTablet.drawShape(lightRef); lightRef.translate(65,60); myTablet.drawShape(lightRef); lightRef.translate(-80,-71); myTablet.drawShape(lightRef); lightRef.translate(60,0); myTablet.drawShape(lightRef); DrawableLine streak1 = new DrawableLine(237,196,245,205); streak1.setColor(Color.blue); myTablet.drawShape(streak1); DrawableLine streak2 = new DrawableLine(245,205,250,248); streak2.setColor(Color.blue); myTablet.drawShape(streak2); DrawableLine mouth1 = new DrawableLine(165,280,172,267); mouth1.setColor(Color.black); myTablet.drawShape(mouth1); mouth1.translate(35,0); myTablet.drawShape(mouth1); DrawableLine mouth2 = new DrawableLine(172,267,177,280); mouth2.setColor(Color.black); myTablet.drawShape(mouth2); mouth2.translate(35,0); myTablet.drawShape(mouth2); DrawableLine mouth3 = new DrawableLine(177,280,193,270); mouth3.setColor(Color.black); myTablet.drawShape(mouth3); mouth3.translate(35,0); myTablet.drawShape(mouth3); DrawableLine mouth4 = new DrawableLine(193,270,200,280); mouth4.setColor(Color.black); myTablet.drawShape(mouth4); mouth4.translate(35,0); myTablet.drawShape(mouth4); DrawableTriangle ear1 = new DrawableTriangle(142,170,130,165,140,230); ear1.setColor(Color.pink); myTablet.drawShape(ear1); DrawableTriangle ear2 = new DrawableTriangle(258,170,270,165,260,230); ear2.setColor(Color.pink); myTablet.drawShape(ear2); DrawableLine hair = new DrawableLine(143,125,143,110); hair.setColor(Color.gray); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); hair.translate(3,0); myTablet.drawShape(hair); DrawableCircle heartCircle = new DrawableCircle(170,420,40); heartCircle.setColor(Color.red); myTablet.drawShape(heartCircle); heartCircle.translate(60,0); myTablet.drawShape(heartCircle); DrawableTriangle heartTri = new DrawableTriangle(138,444,262,444,200,516); heartTri.setColor(Color.red); myTablet.drawShape(heartTri); DrawableString love1 = new DrawableString(182,420,"I LOVE"); love1.setColor(Color.black); myTablet.drawShape(love1); DrawableString love2 = new DrawableString(167,440,"COMPUTER"); love2.setColor(Color.black); myTablet.drawShape(love2); DrawableString love3 = new DrawableString(175,460,"SCIENCE!"); love3.setColor(Color.black); myTablet.drawShape(love3); } }
Benworld <-> Class Projects/Extras <-> Family Guy <-> Fight Club <-> Notes <-> BenBlog
Harrod & Funck <-> mathEmatics <-> My New Zealand Experience <-> My Niece
Questions/Comments/Corrections? Email me at likeafox24@gmail.com.