+1(805) 568 7317

java programming problem 4 2 d array and class objects 25 points you need to adapt t 5152262

java programming Problem 4 (2-D array and class/objects) 25 points You need to adapt the TicTacToe Framework to a connect4 random player agent to allow a computer to play against humanbeing player by picking a random legitimate move. Your program should support the following features. 1. Allow human player to pick who go first. 2. Detect who win. 3. To pick a random legitmate move to play agains the human being player. 4.reject illegal move made by human being player. Deliverables: 80% Source code, with appropriate comments 10% Running/test results: screenshots or/and result text file. Representative test cases should be considered whenever appropriate. 10% Documentation: A short description about your solution and what new programming elements, or rules, constructs you have used in the homework. If your solutions do not produce what is expected, please also document where the problem is and your observation.

Hint for this question

Need to deal with size 1

import java.util.ArrayList; import java.util.Random; class rectangle { private int width; private int height; private char cs, ifs, hs, vs; public rectangle(int width, int height, char cs, char ifs, char hs, char vs) { this.width=width; this.height=height; this.cs=cs; this.ifs=ifs; this.hs=hs; this.vs=vs; } private void drawarow(char firstandlast, char between) { System.out.print(firstandlast); for(int i=0; i rl=new ArrayList(); System.out.println(“Debugging:”+rl.size()); int n=5; rectangle r=null; Random rand=new Random(); r=new rectangle(20, 20, '?', '#', '-', '|'); rl.add(r); for(int nextone=1; nextone

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon

Order Now