Question

Can anyone please help me in creating a flowchart for this specific method, i don't know...

Can anyone please help me in creating a flowchart for this specific method, i don't know how to draw each case with multiple breaks:

boolean verificarBingo(int modo)
{
boolean marca = true;
for (int j = cartones.size() - 1; j>=0; j--)
{
String[][] carton = cartones.get(j);
carton[2][2] = "x";
switch (modo)
{
case 1:
for (String[] col:carton)
{
for(String item:col)
{
if (!item.equals("x")){
marca = false;
break;
}
}
if (!marca)
{
break;
}
}
break;
case 2:
for (int i=0;i<5;i++)
{
if (!carton[i][i].equals("x"))
{
marca = false;
break;
}
}
if(!marca) {
for (int i = 4; i >= 0; i--) {
if (!carton[i][4 - i].equals("x")) {
marca = false;
break;
}
if (i == 0) {
marca = true;
}
}
}
break;
case 3:
marca = carton[0][4].equals("x") && carton[4][0].equals("x") && carton[0][0].equals("x") && carton[4][4].equals("x");
break;
}
if (marca)
{
cartonGanador.add(carton);
ganador = j+1;
  
break;
}
}
return marca;
}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Flow chart of main outer structure

Flow chart of case mode=1 (case :1)

Flowchart of case mode=2 (case :2)

Note: flowchart of case mode =3(case :3) is included in main flowchart

Add a comment
Know the answer?
Add Answer to:
Can anyone please help me in creating a flowchart for this specific method, i don't know...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please modify the following code to NOT have "TicTacToe extends Board" (I don't want any extending)....

    Please modify the following code to NOT have "TicTacToe extends Board" (I don't want any extending). Please ensure the resulting code completes EACH part of the following prompt: "Your task is to create a game of Tic-Tac-Toe using a 2-Dimensional String array as the game board. Start by creating a Board class that holds the array. The constructor should use a traditional for-loop to fill the array with "blank" Strings (eg. "-"). You may want to include other instance data......

  • when i run it is still be "false" i don't know why. could you help me...

    when i run it is still be "false" i don't know why. could you help me fix it and tell me which part is wrong??? specific answer is better thanks!!! Problem 6: (4 pts): Write a function that takes as an input parameter a string. It should return a Boolean value indicating whether the string is a palindrome or not. INPUT: “mom"->true “palindrome”->false “amanaplanpanama"->true 3 #include <iostream> #include <string.h> I using namespace std; string function(string str); int main() { function("palindrome");...

  • please help me to creating UML class diagrams. Snake.java package graphichal2; import java.awt.Color; import java.awt.Font; import...

    please help me to creating UML class diagrams. Snake.java package graphichal2; import java.awt.Color; import java.awt.Font; import java.awt.Frame; import java.awt.Graphics; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.Random; enum Dir{L, U, R, D}; class Food { public static int FOODSTYLE = 1; private int m = r.nextInt(Yard.WIDTH / Yard.B_WIDTH); private int n = r.nextInt(Yard.HEIGHT / Yard.B_WIDTH - 30/Yard.B_WIDTH) + 30/Yard.B_WIDTH;// 竖格 public static Random r = new Random(); public int getM() { return m; } public void setM(int m)...

  • PLEASE HURRY Software Testing Don't make any changes to the provided code. Please write a test...

    PLEASE HURRY Software Testing Don't make any changes to the provided code. Please write a test case for the below prompt using the provided java programs Use the setString() function in MyCustomStringInterface to set the value to “Peter Piper picked a peck of pickled peppers.”. Then test to see if reverseNCharacters() function returns the reversed string when the characters are reversed in groups of 4 and padding is disabled (in this case, “etePiP r repkcipa decep fo kcip delkpep srep.”)....

  • Java - I need help creating a method that removes a node at the specific index...

    Java - I need help creating a method that removes a node at the specific index position. The * first node is index 0. public boolean delAt(int index) { src code 2 different classes ******************************************** public class Node { private String data; private Node next; public Node(String data, Node next) { this.data = data; this.next = next; } public Node() { } public String getData() { return data; } public void setData(String data) { this.data = data; } public void...

  • Can someone help with this C++ code. I am trying to compile and I keep running...

    Can someone help with this C++ code. I am trying to compile and I keep running into these 4 errors. #include <iostream> #include <cassert> #include <string> using namespace std; typedef int fsm_state; typedef char fsm_input; bool is_final_state(fsm_state state) { return (state == 3) ? true : false; } fsm_state get_start_state(void) { return 0; } fsm_state move(fsm_state state, fsm_input input) { // our alphabet includes only 'a' and 'b' if (input != 'a' && input != 'b') assert(0); switch (state) {...

  • Can you help with the merge method? This method should create and return an ArrayBagcontaining one...

    Can you help with the merge method? This method should create and return an ArrayBagcontaining one occurrence of any item that is found in either the called object or the parameter other. For full credit, the resulting bag should not include any duplicates. Give the new ArrayBag a maximum size that is the sum of the two bag’s maximum sizes. import java.util.*; /** * An implementation of a bag data structure using an array. */ public class ArrayBag { /**...

  • Please do a flowchart which will be on the computer not on paper so i can...

    Please do a flowchart which will be on the computer not on paper so i can read it and be able to take screenshot for this c++ code this code for MasterMind //System Libraries #include <iostream> //Input/Output Library #include <cstdlib> #include <ctime> using namespace std; //User Libraries //Global Constants, no Global Variables are allowed //Math/Physics/Conversions/Higher Dimensions - i.e. PI, e, etc... //Function Prototypes //main int main(int argc, char** argv) { //Set the random number seed srand(time(0)); int randomint = (rand()%5)+1;...

  • I don't know how to terminate the code in the second time that whether or not...

    I don't know how to terminate the code in the second time that whether or not the users want to continue to get a new number. PLEASE HELP. To make telephone numbers easier to remember, some companies use letters to show their telephone number. For example, using letters, the telephone number 438-5626 can be shown as GET LOAN. In some cases, to make a telephone number meaningful, companies might use more than seven letters. For example, 225-5466 can be displayed...

  • I keep getting this error and I do not know how to fix it. this is...

    I keep getting this error and I do not know how to fix it. this is the code I've been working on: please help me import java.util.*; public class TelephoneNumber { public static void main(String[] args) {String number; int i=0,j=0; char c; Scanner in=new Scanner (System.in); System.out.println("Enter the phone number: "); number=in.nextLine(); number=number.toUpperCase(); c=number.charAt(i); while(c!='\n'&&j<=7) {switch(c) {case 'A': case 'B': case 'C': System.out.print("2"); j++; break; case 'D': case 'E': case 'F': System.out.print("3"); j++; break; case 'G': case 'H': case'I': System.out.print("4");...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT