Question
Need help with my JAVA assognment, please read the demand carefully. Use java to creat a connect 4 game. use three classes as blow, please
Need help with my JAVA assognment, please read the demand carefully.
Use java to creat a connect 4 game.
use three classes as blow, please use inherit, super in those classes.
Please let the output similar than the sample out pu below.
Welcome to Connect 4. Please enter your names. Player 1 name: Bob Player 2 name: Jane Bob - you have red chips "R" and you go first. 1 2 3 4 5 6 7 1 2 3 4 5 6 Please input a column# between 1-7: 1 1 2 3 4 5 6 7 1 2 3 4 5 6 R Jane - you have yellow chips "Y" and you go next. Please input a column# between 1-7: 1 1 2 3 4 5 6 7 1 2 3 4 5 Y 6 R RED Please input a column# between 1-7: 4 1 2 3 4 5 6 7 1 2 3 4 5 Y 6 R R YELLOW Please input a column# between 1-7: 3 1 2 3 4 5 6 7 1 2 3 4 5 Y 6 R Y R RED Please input a column# between 1-7: 4 1 2 3 4 5 6 7 1 2 3 4 5 Y R 6 R Y R YELLOW Please input a column# between 1-7: 2 1 2 3 4 5 6 7 1 2 3 4 5 Y R 6 R Y Y R RED Please input a column# between 1-7: 4 1 2 3 4 5 6 7 1 2 3 4 R 5 Y R 6 R Y Y R YELLOW Please input a column# between 1-7: 2 1 2 3 4 5 6 7 1 2 3 4 R 5 Y Y R 6 R Y Y R RED Please input a column# between 1-7: 4 1 2 3 4 5 6 7 1 2 3 R 4 R 5 Y Y R 6 R Y Y R RED Connect 4! Congratulations
Chip -colour: String +Chip (c:String): get/set inethods for all the attributes +equals (c: Chip): boolean + toString O : String Board rows : int cols: int boardDI: Chip Board (r: int,e :int) +Board (r: int, c: int): + get methods for all the attributes + isEmpty (r: int, c: int) : boolean + add (r: int, c: int, chip : Chip): boolean Connect4Board + Connect4Board ): +add (c:int, colour: String): boolean + winType ): String +winner (): boolean +toString):StringStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started