presentation25 - int y int color Drawable.java interface...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Applet Sample Soheil Hassas Yeganeh Computer Engineering Department Sharif University of Technology
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Defnition 2
Background image of page 2
Defnition Design and implement a program to draw shapes on an applet on a given position with a given color . 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Some Arguments 3
Background image of page 4
Some Arguments We have shapes: Circle, Square, . .. We have a place to draw on: The Applet. Anything can be drawn on the applet: Texts, Shapes, . .. Any shape can have a color attached: Red, Blue, . .. Any shape can have a coordination. 3
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What are the classes? 4
Background image of page 6
What are the classes? Shape (Abstract) Circle, Triangle, Square, Rectangle, . .. Color? Should we support gradient fll? Should be support image fll? Coordinate? How many dimensions should we support? 4
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What are the interfaces? 5 Drawable.java interface Drawable { public void draw(Graphics g, int x,
Background image of page 8
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int y, int color); } Drawable.java interface Drawable { public void draw(Graphics g, Coordinate c, Color color); } Drawable.java interface Drawable { public void draw(Coordinate c, Graphics g); } Colorable.java interface Colorable { public Color getColor(); public void setColor(Color color); } What are the interfaces? • Drawable? • Drawable & Colorable? 5 Drawable.java interface Drawable { public void draw(Graphics g, int x, int y, int color); } Drawable.java interface Drawable { public void draw(Graphics g, Coordinate c, Color color); } Drawable.java interface Drawable { public void draw(Coordinate c, Graphics g); } Colorable.java interface Colorable { public Color getColor(); public void setColor(Color color); } Any Questions?...
View Full Document

This note was uploaded on 11/21/2010 for the course COMPUTER S 003 taught by Professor Izadi during the Spring '10 term at Amirkabir University of Technology.

Page1 / 10

presentation25 - int y int color Drawable.java interface...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online