Question: IN JAVA. How do I get Boolean method to return Yes or No instead of true or false. Here is my boolean method, my display
IN JAVA. How do I get Boolean method to return "Yes" or "No" instead of true or false. Here is my boolean method, my display method, and my output. I need the output to show "Yes" instead of true and "No" instead of false.
public boolean isGamePlayed() { return gamePlayed; }
-----------------------------------------------
public void displayItem() { System.out.println("** Video Game Information **"); System.out.println("Title: " + getGameTitle()); System.out.println("System: " + getGameSystem()); System.out.println("Times Finished: " + getTimesFinished()); System.out.println("Game Played: " + isGamePlayed()); System.out.println(); }
--------------------------------------------------------------------------

I need the the above output to instead show Game Played: No or Game Played: Yes instead of true or false.
Game Test 1 ** Video Game Information ** Title: System: Times Finished: 0 Game Played: false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
