Question: Question 2 A We're in the red! B. We made a profit C. We broke even. Question 2 What will be printed by the block


Question 2
A We're in the red! B. We made a profit C. We broke even. Question 2 What will be printed by the block of Java code below? int dogs 1; int cats 2; if (dogs 0 && cats0) if (dogs 1) System.out.println("Dog lover"); y else t System.out.println"Dog person") ) else if (cats 0 && dogs 0) if (cats 1) System out println("Cat lover") else t System out. printin( Cat person") system, out printin(" Meowi") else if (cats s 0 &3 dogs 0)1 it (dogs cats) system out printin guess you ike dogs more") else dogs cats System out prihthot guess you like both equally Boogiepop and Others EpisodX Projects 201920-CS01104-I n.blackboard.com/webapps/blackboard/content/listContent.jsp?course ic System.out.println("I guess you like both equally"); else t System.out.println("I guess you like cats more"); 1 else System.out printin("What, don't you like pets?") Question 3 You are programming the behavior of an enemy in a video game. The enemy can see the player and false otherwise, and playerPoweredUp is true when t Attackl" is printed when the enemy can see the player and the player is not p player is not visible Starting code if System, out printinc else
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
