Use the following files: JFrame.java TileFloorComponent.java TileFloorViewer.jav
ID: 3888358 • Letter: U
Question
Use the following files:
JFrame.java
TileFloorComponent.java
TileFloorViewer.java
green, ue, buck, and cv Clete e class T1leFloor. Use the costants detined to vin tbe starte coe. Yu ustuse nesed Loups. Daw the ows and teci the coluanns tostch Codecheck cutpot For the colors, use the Color coestants in the Color class. Color.RED erc) Te TileFloor wilue to msttuctons . publ1 Tile Flor int 21 int y te re x and v are t e coord na esaftie upper left hand corner of the floor Create a Randc n object as ng the ccestu tor that takes seed. Use 234567 as the seed Use S as the ce a namber of rcws and as the de ant the minber of coimns Do not draw in the enactor coustructor that takes a seed.Ue 1231567 as the seed Do not draw in the constructor. The TileFloor wiil hare these methcds public void draw (Graphics2D g2) d th fleor wirh the flledqsat thex yordinates s a nad loop private Color randomColor ) andomly rerns a Coler object either red green, ble black ar cyan. Use the Random ohject yoa creared in the constructor to determine which o rerurn Vou need ts if else if else sttestrucrure . publio void setX(int x) sets a newx cocrdinate. Implemected for you) . publie void setr (int y) setsaneyce Implneted you) GREEN 1), eut Color GREEN Uee thedefined otmt, not the numb , 1 ctc Provide Javadoc Because due Random obect s nated wthaseed, you 11ll all get he sazne dtawmg everv tme hat is so Codecheck can check Your output willloo like this