Question: Create the Program Graph for the play() method given above. Create the DD-Path Graph for the play() method given above. Make sure you include the

Create the Program Graph for the play() method given above.

Create the DD-Path Graph for the play() method given above.

Make sure you include the table translating from Program Graph nodes (from your graph above), with the corresponding DD-Path node labeled with a letter.

public void play() { 2. String src = null; 3. String dest = null; 4. LinkedList srcPile = null; 5. boolean gameOver = false; 6. 7. while (!gameOver) { 8. displayTableau(); 9. 10. do { 11. System.out.print(" Move top card from (D, W0, W1, W2, W3, or Q to quit): "); 12 . src = in.nextLine(); 13. if (src.toUpperCase().charAt(0) == 'Q') { 14. gameOver = true; 15. } 16. } while (!gameOver && (srcPile = getSrcPile(src)) == null); 17. 18. if (!gameOver) { 19. System.out.print(" to (F0, F1, F2, F3, W0, W1, W2, W3): "); 20. dest = in.nextLine(); 21. addToDestPile(dest, srcPile); 22. } 23. 24. gameOver = checkForGameOver(gameOver); 26. } 27. } 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!