Here is the assigment i have: It´s a game of battleship [5*5 board] and the teacher give us this list of functionalities:
1. void initiBoard(int[][] board) - Initalizes the board with "-1" in every position.
2. void showBoard(int[][] board) - Shows the board
3. void initShip(int[][] ships) - fills ,randomly, the position of 3 boats. We cant have boats in the same position
4. void hint(int shot[],int[][] ships,int attempt) - Shows us how many boats there are in the line and column of the shot, and if the shot has hitted any boat.
5. void changeBoard(int shot[],int[][] ships,int[][] board) - Updates the board setting the variable shot has hit or miss.
6. void shoot(int[] shot) - Asks the user to insert the line and column of the shot
7. boolean hit(int[] shot,int[][] ships) - Checks if the shot has hitted in any of the boats
8. void main() - InitBoard(),InitShip(),ShowBoard(),shoot(),hit(),hint(),changeboard(),showboard(). Asks the user to introduce a new shot position until every boat his down. When it ends shows the amount of tries.
I need to perform black box testing and perform a set of testcases for at least 4 functionalities, and i don´t know how to it. I know i need to perform ECP and BVA but all the examples i found online are very simple and very different from this one. Can anyone give me some pointers on how to start? Thank you!
Aucun commentaire:
Enregistrer un commentaire