// Miya Natsuhara // 07-08-2019 // CSE142 // TA: Grace Hopper // Produces an image of a black car with red wheels and a blue window on a grey background. /* DEVELOPMENT NOTES: ((Note: this is not something you should include in your own programs; this is included here to aid in your understanding and to provide additional context for the program.)) This was our initial version of the program to create the image "van1" (which you can find in the the Web Comparison Tool) which contains just a single car. */ import java.awt.*; public class Car1 { public static void main(String[] args) { DrawingPanel panel = new DrawingPanel(400, 200); Graphics g = panel.getGraphics(); panel.setBackground(Color.LIGHT_GRAY); // body of car // In this version of the Car program, line 12 is not strictly necessary since Graphics by // default starts out as black! g.setColor(Color.BLACK); g.fillRect(10, 30, 100, 50); // window g.setColor(Color.CYAN); g.fillRect(80, 40, 30, 20); // wheels g.setColor(Color.RED); g.fillOval(20, 70, 20, 20); g.fillOval(80, 70, 20, 20); } }