Domino Project

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Domino Project as PDF for free.

More details

  • Words: 6,236
  • Pages: 45
Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 1 of 45

NORTHERN CARIBBEAN UNIVERSITY College of Natural & Applied Sciences Department of Computer & Information Sciences CPTR: Programming 2 _____________________________________________________________________________

PROJECT: DOMINO GENERATION -Random 7-

Franklyn Hunter ID# 26075062

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 2 of 45 import import import import import

java.util.Random; java.awt.Color; java.awt.Graphics; java.awt.Graphics2D; javax.swing.JPanel;

public class GenDominoes extends JPanel { int sum=0;//Declare and initialize the variable sum. Random gen = new Random();//declare object sum for random process.

public void paintComponent( Graphics g ) { super.paintComponent( g ); // call superclass's paintComponent Graphics2D g2d = ( Graphics2D ) g;

//creating a loop to run seven times. for ( int x =0; x<=7; x++) { sum = gen.nextInt(27);//generating random numbers for 0 to 27. // create ShapesJPanel switch (sum) { case 1: //1. Drawing Double Blank //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20,20,65,100); g2d.drawRect(20,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(47,40, 10, 10); //draw circle Right on the top side of domino

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 3 of 45 g2d.setPaint(Color.WHITE); g2d.drawOval(70, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70, 55, 10, 10);

//draw center line g2d.setPaint(Color.BLACK); g2d.drawLine(20, 70, 85, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(47,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70, 105, 10, 10); break; //____________________________________________________________________

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 4 of 45 Explanation 1 of 2: N.B-The arrows are used as indicators to explain each part of this program. They will be explained sequentially respectively. - This is used to import the different programming styles like, the Common GUI elements and expressions of classes, to draw and print to the Java Panel. - This is creating a class for this Domino function, which can be access by another class away from this class. OPEN AND CLOSE. - Variables used for declaration such as “sum” (which is used to create a random check of the 28 dominoes). And “gen” to be used as the generated value of the random constructor function. - paintComponent method is used to draw lightweight objects in classes. - Loops used to create ideal domino results. First loop is the “for” which is used to run the random “sum” and “switch loop” seven times to get the seven different dominoes on the screen. – The “switch” loop is used to find and call any of its “case” to draw one of the 28 dominoes based on the randomly chosen numbers in sum. OPEN AND CLOSE - (case 1) is on of the 28 “case” that the “switch” loop uses to draw any of the 28 dominoes now if case (1) one is chosen then double black would be chosen to be drawn. - g2d operator is used to call the different function to it, first to set a colour for the background of the domino, second to fill the desired shape with the colour chosen and third to draw the outline of the domino and its circles.

As noticed this process will continue until the end of the class.

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 5 of 45

case 2: //2. Drawing Blank One //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+70,20,65,100); g2d.drawRect(20+70,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+70, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+70, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+70, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+70,40, 10, 10); g2d.drawOval(47+70,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+70, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+70, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+70, 55, 10, 10);

//draw center line g2d.setPaint(Color.BLACK); g2d.drawLine(20+70, 70, 85+70, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+70, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+70, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+70, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(47+70,90, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 6 of 45

//draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+70, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+70, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+70, 105, 10, 10); break; //____________________________________________________________________ __ case 3: //3. Drawing BlankTwo //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+140,20,65,100); g2d.drawRect(20+140,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+140, 25, 10, 10); g2d.drawOval(25+140, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+140, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+140, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+140,40, 10, 10); g2d.drawOval(47+140,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+140, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+140, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+140, 55, 10, 10); g2d.drawOval(70+140, 55, 10, 10);

//draw center line-------------------------------------

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 7 of 45

g2d.setPaint(Color.BLACK); g2d.drawLine(20+140, 70, 85+140, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+140, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+140, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+140, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(47+140,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+140, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+140, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+140, 105, 10, 10); break; //____________________________________________________________________ __ case 4: //4. Drawing BlankThree //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+210,20,65,100); g2d.drawRect(20+210,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+210, 25, 10, 10); g2d.drawOval(25+210, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+210, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+210, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 8 of 45 g2d.fillOval(47+210,40, 10, 10); g2d.drawOval(47+210,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+210, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+210, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+210, 55, 10, 10); g2d.drawOval(70+210, 55, 10, 10);

//draw center line g2d.setPaint(Color.BLACK); g2d.drawLine(20+210, 70, 85+210, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+210, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+210, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+210, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(47+210,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+210, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+210, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+210, 105, 10, 10); break; //____________________________________________________________________ __ case 5: //5. Drawing BlankFour //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+280,20,65,100); g2d.drawRect(20+280,20,65,100);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 9 of 45

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+280, 25, 10, 10); g2d.drawOval(25+280, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+280, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+280, 55, 10, 10); g2d.drawOval(25+280, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+280,40, 10, 10); g2d.drawOval(47+280,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+280, 25, 10, 10); g2d.drawOval(70+280, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+280, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+280, 55, 10, 10); g2d.drawOval(70+280, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+280, 70, 85+280, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+280, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+280, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+280, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(47+280,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 10 of 45 g2d.drawOval(70+280, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+280, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+280, 105, 10, 10); break; //____________________________________________________________________ _ case 6: //6. Drawing BlankFive //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+350,20,65,100); g2d.drawRect(20+350,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+350, 25, 10, 10); g2d.drawOval(25+350, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+350, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+350, 55, 10, 10); g2d.drawOval(25+350, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+350,40, 10, 10); g2d.drawOval(47+350,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+350, 25, 10, 10); g2d.drawOval(70+350, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+350, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+350, 55, 10, 10); g2d.drawOval(70+350, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+350, 70, 85+350, 70);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 11 of 45

//draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+350, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+350, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+350, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(47+350,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+350, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+350, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+350, 105, 10, 10); break; //____________________________________________________________________ ___ case 7: //7. Drawing BlankSix //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+420,20,65,100); g2d.drawRect(20+420,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+420, 25, 10, 10); g2d.drawOval(25+420, 25, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+420, 40, 10, 10); g2d.drawOval(25+420, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+420, 55, 10, 10); g2d.drawOval(25+420, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+420,40, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 12 of 45 g2d.drawOval(47+420,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+420, 25, 10, 10); g2d.drawOval(70+420, 25, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+420, 40, 10, 10); g2d.drawOval(70+420, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+420, 55, 10, 10); g2d.drawOval(70+420, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+420, 70, 85+420, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+420, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+420, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+420, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(47+420,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+420, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+420, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+420, 105, 10, 10); break; //____________________________________________________________________ __ case 8: //8. Drawing DoubleOne //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+840,20,65,100);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 13 of 45 g2d.drawRect(20+840,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(25+840, 25, 10, 10); g2d.drawOval(25+840, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+840, 40, 10, 10); g2d.drawOval(25+840, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+840, 55, 10, 10); g2d.drawOval(25+840, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+840,40, 10, 10); g2d.drawOval(47+840,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(70+840, 25, 10, 10); g2d.drawOval(70+840, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+840, 40, 10, 10); g2d.drawOval(70+840, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+840, 55, 10, 10); g2d.drawOval(70+840, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+840, 70, 85+840, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+840, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+840, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+840, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+840,90, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 14 of 45 g2d.drawOval(47+840,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+840, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+840, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+840, 105, 10, 10); break; //____________________________________________________________________ __ case 9: //9. Drawing Domino TwoOne. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+490,20,65,100); g2d.drawRect(20+490,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+490, 25, 10, 10); g2d.drawOval(25+490, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+490, 40, 10, 10); g2d.drawOval(25+490, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+490, 55, 10, 10); g2d.drawOval(25+490, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+490,40, 10, 10); g2d.drawOval(47+490,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(70+490, 25, 10, 10); g2d.drawOval(70+490, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+490, 40, 10, 10); g2d.drawOval(70+490, 40, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 15 of 45 g2d.setPaint(Color.BLACK); g2d.fillOval(70+490, 55, 10, 10); g2d.drawOval(70+490, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+490, 70, 85+490, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+490, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+490, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+490, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+490,90, 10, 10); g2d.drawOval(47+490,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+490, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+490, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+490, 105, 10, 10); break; //____________________________________________________________________ ___ case 10: //10. Drawing Domino ThreeOne. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+560,20,65,100); g2d.drawRect(20+560,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+560, 25, 10, 10); g2d.drawOval(25+560, 25, 10, 10); g2d.setPaint(Color.WHITE);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 16 of 45 g2d.fillOval(25+560, 40, 10, 10); g2d.drawOval(25+560, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+560, 55, 10, 10); g2d.drawOval(25+560, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+560,40, 10, 10); g2d.drawOval(47+560,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(70+560, 25, 10, 10); g2d.drawOval(70+560, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+560, 40, 10, 10); g2d.drawOval(70+560, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+560, 55, 10, 10); g2d.drawOval(70+560, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+560, 70, 85+560, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+560, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+560, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+560, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+560,90, 10, 10); g2d.drawOval(47+560,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+560, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+560, 90, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 17 of 45 g2d.setPaint(Color.WHITE); g2d.drawOval(70+560, 105, 10, 10); break; //____________________________________________________________________ ___ case 11: //11. Drawing Domino FourOne. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+630,20,65,100); g2d.drawRect(20+630,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+630, 25, 10, 10); g2d.drawOval(25+630, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+630, 40, 10, 10); g2d.drawOval(25+630, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+630, 55, 10, 10); g2d.drawOval(25+630, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+630,40, 10, 10); g2d.drawOval(47+630,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+630, 25, 10, 10); g2d.drawOval(70+630, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+630, 40, 10, 10); g2d.drawOval(70+630, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+630, 55, 10, 10); g2d.drawOval(70+630, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+630, 70, 85+630, 70); //draw circle left on the bottom side of domino

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 18 of 45 g2d.setPaint(Color.WHITE); g2d.drawOval(25+630, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+630, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+630, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+630,90, 10, 10); g2d.drawOval(47+630,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+630, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+630, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+630, 105, 10, 10); break; //____________________________________________________________________ ___ case 12: //12. Drawing Domino FiveOne. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+700,20,65,100); g2d.drawRect(20+700,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+700, 25, 10, 10); g2d.drawOval(25+700, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+700, 40, 10, 10); g2d.drawOval(25+700, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+700, 55, 10, 10); g2d.drawOval(25+700, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+700,40, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 19 of 45 g2d.drawOval(47+700,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+700, 25, 10, 10); g2d.drawOval(70+700, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+700, 40, 10, 10); g2d.drawOval(70+700, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+700, 55, 10, 10); g2d.drawOval(70+700, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+700, 70, 85+700, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+700, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+700, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+700, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+700,90, 10, 10); g2d.drawOval(47+700,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+700, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+700, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+700, 105, 10, 10); break; //____________________________________________________________________ ___ case 13: //13. Drawing Domino SixOne.

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 20 of 45 //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+770,20,65,100); g2d.drawRect(20+770,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 25, 10, 10); g2d.drawOval(25+770, 25, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 40, 10, 10); g2d.drawOval(25+770, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 55, 10, 10); g2d.drawOval(25+770, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+770,40, 10, 10); g2d.drawOval(47+770,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 25, 10, 10); g2d.drawOval(70+770, 25, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 40, 10, 10); g2d.drawOval(70+770, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 55, 10, 10); g2d.drawOval(70+770, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+770, 70, 85+770, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(25+770, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+770, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+770, 105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 21 of 45 //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+770,90, 10, 10); g2d.drawOval(47+770,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+770, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+770, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+770, 105, 10, 10); break; //____________________________________________________________________ ___ case 14: //14. Drawing Domino DoubleTwo. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20,20+105,65,100); g2d.drawRect(20,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25, 25+105, 10, 10); g2d.drawOval(25, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25, 40+105, 10, 10); g2d.drawOval(25, 40+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25, 55+105, 10, 10); g2d.drawOval(25, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47,40+105, 10, 10); g2d.drawOval(47,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(70, 25+105, 10, 10); g2d.drawOval(70, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70, 40+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 22 of 45 g2d.drawOval(70, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70, 55+105, 10, 10); g2d.drawOval(70, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20, 70+105, 85, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25, 75+105, 10, 10); g2d.drawOval(25, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25, 90+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47,90+105, 10, 10); g2d.drawOval(47,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70, 105+105, 10, 10); g2d.drawOval(70, 105+105, 10, 10); break; //____________________________________________________________________ ___ case 15: //15. Drawing Domino TwoThree. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+910,20,65,100); g2d.drawRect(20+910,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 23 of 45 g2d.fillOval(25+910, 25, 10, 10); g2d.drawOval(25+910, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+910, 40, 10, 10); g2d.drawOval(25+910, 40, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+910, 55, 10, 10); g2d.drawOval(25+910, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+910,40, 10, 10); g2d.drawOval(47+910,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(70+910, 25, 10, 10); g2d.drawOval(70+910, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+910, 40, 10, 10); g2d.drawOval(70+910, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+910, 55, 10, 10); g2d.drawOval(70+910, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+910, 70, 85+910, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+910, 75, 10, 10); g2d.drawOval(25+910, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+910, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+910, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+910,90, 10, 10); g2d.drawOval(47+910,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 24 of 45 g2d.drawOval(70+910, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+910, 90, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+910, 105, 10, 10); g2d.drawOval(70+910, 105, 10, 10); break;

//____________________________________________________________________ ___ case 16: //16. Drawing Domino TwoFour. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+980,20,65,100); g2d.drawRect(20+980,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+980, 25, 10, 10); g2d.drawOval(25+980, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+980, 40, 10, 10); g2d.drawOval(25+980, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+980, 55, 10, 10); g2d.drawOval(25+980, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+980,40, 10, 10); g2d.drawOval(47+980,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+980, 25, 10, 10); g2d.drawOval(70+980, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+980, 40, 10, 10); g2d.drawOval(70+980, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+980, 55, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 25 of 45 g2d.drawOval(70+980, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+980, 70, 85+980, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+980, 75, 10, 10); g2d.drawOval(25+980, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+980, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+980, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+980,90, 10, 10); g2d.drawOval(47+980,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+980, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+980, 90, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+980, 105, 10, 10); g2d.drawOval(70+980, 105, 10, 10); break; //____________________________________________________________________ ___ case 17: //17. Drawing Domino TwoFive. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+1050,20,65,100); g2d.drawRect(20+1050,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+1050, 25, 10, 10); g2d.drawOval(25+1050, 25, 10, 10); g2d.setPaint(Color.WHITE);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 26 of 45 g2d.fillOval(25+1050, 40, 10, 10); g2d.drawOval(25+1050, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+1050, 55, 10, 10); g2d.drawOval(25+1050, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+1050,40, 10, 10); g2d.drawOval(47+1050,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+1050, 25, 10, 10); g2d.drawOval(70+1050, 25, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+1050, 40, 10, 10); g2d.drawOval(70+1050, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+1050, 55, 10, 10); g2d.drawOval(70+1050, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+1050, 70, 85+1050, 70); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+1050, 75, 10, 10); g2d.drawOval(25+1050, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+1050, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+1050, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+1050,90, 10, 10); g2d.drawOval(47+1050,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+1050, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+1050, 90, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 27 of 45

g2d.setPaint(Color.BLACK); g2d.fillOval(70+1050, 105, 10, 10); g2d.drawOval(70+1050, 105, 10, 10); break; //____________________________________________________________________ ___ case 18: //18. Draw Domino SixTwo //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+1120,20,65,100); g2d.drawRect(20+1120,20,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+1120, 25, 10, 10); g2d.drawOval(25+1120, 25, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+1120, 40, 10, 10); g2d.drawOval(25+1120, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+1120, 55, 10, 10); g2d.drawOval(25+1120, 55, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+1120,40, 10, 10); g2d.drawOval(47+1120,40, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+1120, 25, 10, 10); g2d.drawOval(70+1120, 25, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+1120, 40, 10, 10); g2d.drawOval(70+1120, 40, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+1120, 55, 10, 10); g2d.drawOval(70+1120, 55, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+1120, 70, 85+1120, 70);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 28 of 45

//draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+1120, 75, 10, 10); g2d.drawOval(25+1120, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+1120, 90, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+1120, 105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+1120,90, 10, 10); g2d.drawOval(47+1120,90, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+1120, 75, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+1120, 90, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+1120, 105, 10, 10); g2d.drawOval(70+1120, 105, 10, 10); break; //____________________________________________________________________ __ case 19: //19. Drawing Domino DoubleThree //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+350,20+105,65,100); g2d.drawRect(20+350,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+350, 25+105, 10, 10); g2d.drawOval(25+350, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+350, 40+105, 10, 10); g2d.drawOval(25+350, 40+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+350, 55+105, 10, 10); g2d.drawOval(25+350, 55+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 29 of 45 //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+350,40+105, 10, 10); g2d.drawOval(47+350,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(70+350, 25+105, 10, 10); g2d.drawOval(70+350, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+350, 40+105, 10, 10); g2d.drawOval(70+350, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+350, 55+105, 10, 10); g2d.drawOval(70+350, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+350, 70+105, 85+350, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+350, 75+105, 10, 10); g2d.drawOval(25+350, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+350, 90+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+350, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+350,90+105, 10, 10); g2d.drawOval(47+350,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+350, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+350, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+350, 105+105, 10, 10); g2d.drawOval(70+350, 105+105, 10, 10); break;

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 30 of 45

//____________________________________________________________________ ___ case 20: //20. Drawing Domino ThreeFour. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+70,20+105,65,100); g2d.drawRect(20+70,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+70, 25+105, 10, 10); g2d.drawOval(25+70, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+70, 40+105, 10, 10); g2d.drawOval(25+70, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+70, 55+105, 10, 10); g2d.drawOval(25+70, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+70,40+105, 10, 10); g2d.drawOval(47+70,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+70, 25+105, 10, 10); g2d.drawOval(70+70, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+70, 40+105, 10, 10); g2d.drawOval(70+70, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+70, 55+105, 10, 10); g2d.drawOval(70+70, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+70, 70+105, 85+70, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+70, 75+105, 10, 10); g2d.drawOval(25+70, 75+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 31 of 45

g2d.setPaint(Color.WHITE); g2d.drawOval(25+70, 90+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+70, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+70,90+105, 10, 10); g2d.drawOval(47+70,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+70, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+70, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+70, 105+105, 10, 10); g2d.drawOval(70+70, 105+105, 10, 10); break; //____________________________________________________________________ ___ case 21: //21. Drawing Domino ThreeFive. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+140,20+105,65,100); g2d.drawRect(20+140,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+140, 25+105, 10, 10); g2d.drawOval(25+140, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+140, 40+105, 10, 10); g2d.drawOval(25+140, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+140, 55+105, 10, 10); g2d.drawOval(25+140, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+140,40+105, 10, 10); g2d.drawOval(47+140,40+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 32 of 45

//draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+140, 25+105, 10, 10); g2d.drawOval(70+140, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+140, 40+105, 10, 10); g2d.drawOval(70+140, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+140, 55+105, 10, 10); g2d.drawOval(70+140, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+140, 70+105, 85+140, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+140, 75+105, 10, 10); g2d.drawOval(25+140, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+140, 90+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+140, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+140,90+105, 10, 10); g2d.drawOval(47+140,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+140, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+140, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+140, 105+105, 10, 10); g2d.drawOval(70+140, 105+105, 10, 10); break; //____________________________________________________________________ ___ case 22: //22. Drawing Domino ThreeSix.

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 33 of 45 //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+210,20+105,65,100); g2d.drawRect(20+210,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+210, 25+105, 10, 10); g2d.drawOval(25+210, 25+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+210, 40+105, 10, 10); g2d.drawOval(25+210, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+210, 55+105, 10, 10); g2d.drawOval(25+210, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+210,40+105, 10, 10); g2d.drawOval(47+210,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+210, 25+105, 10, 10); g2d.drawOval(70+210, 25+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+210, 40+105, 10, 10); g2d.drawOval(70+210, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+210, 55+105, 10, 10); g2d.drawOval(70+210, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+210, 70+105, 85+210, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+210, 75+105, 10, 10); g2d.drawOval(25+210, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+210, 90+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+210, 105+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 34 of 45

//draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+210,90+105, 10, 10); g2d.drawOval(47+210,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.drawOval(70+210, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+210, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+210, 105+105, 10, 10); g2d.drawOval(70+210, 105+105, 10, 10); break; //____________________________________________________________________ ___ case 23: //23. Drawing Domino DoubleFour. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+560,20+105,65,100); g2d.drawRect(20+560,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+560, 25+105, 10, 10); g2d.drawOval(25+560, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+560, 40+105, 10, 10); g2d.drawOval(25+560, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+560, 55+105, 10, 10); g2d.drawOval(25+560, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+560,40+105, 10, 10); g2d.drawOval(47+560,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+560, 25+105, 10, 10); g2d.drawOval(70+560, 25+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 35 of 45 g2d.setPaint(Color.WHITE); g2d.fillOval(70+560, 40+105, 10, 10); g2d.drawOval(70+560, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+560, 55+105, 10, 10); g2d.drawOval(70+560, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+560, 70+105, 85+560, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+560, 75+105, 10, 10); g2d.drawOval(25+560, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+560, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+560, 105+105, 10, 10); g2d.drawOval(25+560, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+560,90+105, 10, 10); g2d.drawOval(47+560,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+560, 75+105, 10, 10); g2d.drawOval(70+560, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+560, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+560, 105+105, 10, 10); g2d.drawOval(70+560, 105+105, 10, 10); break; //____________________________________________________________________ ___ case 24: //24. Drawing Domino FourFive. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+420,20+105,65,100); g2d.drawRect(20+420,20+105,65,100);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 36 of 45

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+420, 25+105, 10, 10); g2d.drawOval(25+420, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+420, 40+105, 10, 10); g2d.drawOval(25+420, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+420, 55+105, 10, 10); g2d.drawOval(25+420, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+420,40+105, 10, 10); g2d.drawOval(47+420,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+420, 25+105, 10, 10); g2d.drawOval(70+420, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+420, 40+105, 10, 10); g2d.drawOval(70+420, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+420, 55+105, 10, 10); g2d.drawOval(70+420, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+420, 70+105, 85+420, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+420, 75+105, 10, 10); g2d.drawOval(25+420, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+420, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+420, 105+105, 10, 10); g2d.drawOval(25+420, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 37 of 45 g2d.fillOval(47+420,90+105, 10, 10); g2d.drawOval(47+420,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+420, 75+105, 10, 10); g2d.drawOval(70+420, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+420, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+420, 105+105, 10, 10); g2d.drawOval(70+420, 105+105, 10, 10); break; //____________________________________________________________________ ___ case 25: //25. Drawing Domino FourSix. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+490,20+105,65,100); g2d.drawRect(20+490,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+490, 25+105, 10, 10); g2d.drawOval(25+490, 25+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+490, 40+105, 10, 10); g2d.drawOval(25+490, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+490, 55+105, 10, 10); g2d.drawOval(25+490, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+490,40+105, 10, 10); g2d.drawOval(47+490,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+490, 25+105, 10, 10); g2d.drawOval(70+490, 25+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+490, 40+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 38 of 45 g2d.drawOval(70+490, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+490, 55+105, 10, 10); g2d.drawOval(70+490, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+490, 70+105, 85+490, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+490, 75+105, 10, 10); g2d.drawOval(25+490, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+490, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+490, 105+105, 10, 10); g2d.drawOval(25+490, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+490,90+105, 10, 10); g2d.drawOval(47+490,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+490, 75+105, 10, 10); g2d.drawOval(70+490, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+490, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+490, 105+105, 10, 10); g2d.drawOval(70+490, 105+105, 10, 10); break; //____________________________________________________________________ ___ case 26: //26. Drawing Domino DoubleFive. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+700,20+105,65,100); g2d.drawRect(20+700,20+105,65,100);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 39 of 45 //draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+700, 25+105, 10, 10); g2d.drawOval(25+700, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(25+700, 40+105, 10, 10); g2d.drawOval(25+700, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+700, 55+105, 10, 10); g2d.drawOval(25+700, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+700,40+105, 10, 10); g2d.drawOval(47+700,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+700, 25+105, 10, 10); g2d.drawOval(70+700, 25+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.fillOval(70+700, 40+105, 10, 10); g2d.drawOval(70+700, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+700, 55+105, 10, 10); g2d.drawOval(70+700, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+700, 70+105, 85+700, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+700, 75+105, 10, 10); g2d.drawOval(25+700, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+700, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+700, 105+105, 10, 10); g2d.drawOval(25+700, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+700,90+105, 10, 10); g2d.drawOval(47+700,90+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 40 of 45

//draw circle right on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+700, 75+105, 10, 10); g2d.drawOval(70+700, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+700, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+700, 105+105, 10, 10); g2d.drawOval(70+700, 105+105, 10, 10); break; //____________________________________________________________________ ___ case 27: //27. Drawing Domino FiveSix. //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+630,20+105,65,100); g2d.drawRect(20+630,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+630, 25+105, 10, 10); g2d.drawOval(25+630, 25+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+630, 40+105, 10, 10); g2d.drawOval(25+630, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+630, 55+105, 10, 10); g2d.drawOval(25+630, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+630,40+105, 10, 10); g2d.drawOval(47+630,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+630, 25+105, 10, 10); g2d.drawOval(70+630, 25+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+630, 40+105, 10, 10); g2d.drawOval(70+630, 40+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 41 of 45 g2d.setPaint(Color.BLACK); g2d.fillOval(70+630, 55+105, 10, 10); g2d.drawOval(70+630, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+630, 70+105, 85+630, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+630, 75+105, 10, 10); g2d.drawOval(25+630, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(25+630, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+630, 105+105, 10, 10); g2d.drawOval(25+630, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(47+630,90+105, 10, 10); g2d.drawOval(47+630,90+105, 10, 10); //draw circle right on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+630, 75+105, 10, 10); g2d.drawOval(70+630, 75+105, 10, 10); g2d.setPaint(Color.WHITE); g2d.drawOval(70+630, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+630, 105+105, 10, 10); g2d.drawOval(70+630, 105+105, 10, 10); break; //____________________________________________________________________ __ default: //28. Drawing DoubleSix //Draw and Colour Rectangle g2d.setPaint(Color.WHITE); g2d.fillRect(20+770,20+105,65,100); g2d.drawRect(20+770,20+105,65,100);

//draw circle left on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 25+105, 10, 10);

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 42 of 45 g2d.drawOval(25+770, 25+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 40+105, 10, 10); g2d.drawOval(25+770, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 55+105, 10, 10); g2d.drawOval(25+770, 55+105, 10, 10); //draw circle center on the top side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+770,40+105, 10, 10); g2d.drawOval(47+770,40+105, 10, 10); //draw circle Right on the top side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 25+105, 10, 10); g2d.drawOval(70+770, 25+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 40+105, 10, 10); g2d.drawOval(70+770, 40+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 55+105, 10, 10); g2d.drawOval(70+770, 55+105, 10, 10);

//draw center line------------------------------------g2d.setPaint(Color.BLACK); g2d.drawLine(20+770, 70+105, 85+770, 70+105); //draw circle left on the bottom side of domino g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 75+105, 10, 10); g2d.drawOval(25+770, 75+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 90+105, 10, 10); g2d.drawOval(25+770, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(25+770, 105+105, 10, 10); g2d.drawOval(25+770, 105+105, 10, 10); //draw circle center on the bottom side of domino g2d.setPaint(Color.WHITE); g2d.fillOval(47+770,90+105, 10, 10); g2d.drawOval(47+770,90+105, 10, 10); //draw circle right on the bottom side of domino

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 43 of 45 g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 75+105, 10, 10); g2d.drawOval(70+770, 75+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 90+105, 10, 10); g2d.drawOval(70+770, 90+105, 10, 10); g2d.setPaint(Color.BLACK); g2d.fillOval(70+770, 105+105, 10, 10); g2d.drawOval(70+770, 105+105, 10, 10); break; //___________________________________________________________________ }//Close Switch }//Close Loop }//Close PaintComponent }//Close Class GenDominoes

============================================================================== import javax.swing.JFrame; public class DominoFrame { public static void main( String args[] ) {

// create frame for Dominoes JFrame frame = new JFrame( "Drawing Dominoes" ); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );

GenDominoes c = new GenDominoes(); // add c to frame frame.add(c); frame.setSize( 1280, 300 ); // set frame size frame.setVisible( true ); // display frame } // end main } // end class Domino

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 44 of 45

Explanation 2 of 2:

- importing the function to call Programming style JFrame. - Starting the main function so that the program may fun or execute. - Creating “frame” as an object so that Java Jframe can run with the title “Drawing Dominoes” -Creating “c “ as an object to call the” GenDominoes() “ class to this class so that it can be displayed on the Jframe. - frame.add is used to place the “c” object to the Jframe. -frame.setSize is used to set the size of the Jframe screen. -frame.setVisible is used to display the frame on Monitor screen.

Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only.

Page 45 of 45

Related Documents

Domino Project
June 2020 3
Domino
June 2020 13
Domino
November 2019 22
Cantate Domino
November 2019 12
Domino Sport.docx
December 2019 16
Domino Vs.docx
June 2020 4