Question: intro to JAVA webdav/pid-415289-dt-content-rid-1398325 1/courses/201801-X16-CS249-CS505/CS 24A Healing Power: 20 Implement a class Assign05 to test the Player, I classes. In its main method: tem, and

intro to JAVA
webdav/pid-415289-dt-content-rid-1398325 1/courses/201801-X16-CS249-CS505/CS 24A Healing Power: 20 Implement a class Assign05 to test the Player, I classes. In its main method: tem, and Pood 5 Create a Player instance, player, with position (3,3). Do the following in a loop: Ask the user for an item name and weight. You can assume the name is a single word. Ask the user if it's a food item. If user enters "Y", then ask for healing power add it to player inventory If item IS a food item, create a Food instance and add it to player inventory ...while the user doesn't enter a String "None" for the name. Print player inventory Ask user to choose an item to use (enter an integer) If the item was successfully used, print the current Player health. Otherwise, print "Cannot use this item." Page 4 of 9 webdav/pid-415289-dt-content-rid-1398325 1/courses/201801-X16-CS249-CS505/CS 24A Healing Power: 20 Implement a class Assign05 to test the Player, I classes. In its main method: tem, and Pood 5 Create a Player instance, player, with position (3,3). Do the following in a loop: Ask the user for an item name and weight. You can assume the name is a single word. Ask the user if it's a food item. If user enters "Y", then ask for healing power add it to player inventory If item IS a food item, create a Food instance and add it to player inventory ...while the user doesn't enter a String "None" for the name. Print player inventory Ask user to choose an item to use (enter an integer) If the item was successfully used, print the current Player health. Otherwise, print "Cannot use this item." Page 4 of 9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
