Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Programming: Chapter 12 Debug: Wizard Inventory Create an application that keeps track of the items that a wizard can carry. Specifications: Use an array

Java Programming: Chapter 12 Debug: Wizard Inventory

Create an application that keeps track of the items that a wizard can carry.

image text in transcribed Specifications:

Use an array list to store the items. Provide three starting items.

The wizard can only carry four items at a time.

For the edit and drop commands, display an error message if the user enters an invalid number for the item.

When you exit the program, all changes that you made to the inventory are lost.

Console The Wizard Inventory game COMMAND MENU show - Show all ite 8 grab - Grab an item edit-Edit an item drop - Drop an item exit - Exit program Command: show 1. wooden staff 2. wizard hat 3. cloth shoes Command: grab Name: potion of invisibility potion of invisibility was added Command: grab You can't carry any more items. Drop something first Command: show 1. wooden staff 2. wizard hat 3. aloth shoes 4. potion of invisibility Command: edit Number:1 Updated name: magic wooden staff Item number l was updated Command: drop Number: 3 cloth shoes was dropped Command: exit Bye

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 Tsukuba Japan April 2010 Proceedings Part 1 Lncs 5981

Authors: Hiroyuki Kitagawa ,Yoshiharu Ishikawa ,Wenjie Li ,Chiemi Watanabe

2010th Edition

3642120253, 978-3642120251

More Books

Students also viewed these Databases questions

Question

b. Where did they come from?

Answered: 1 week ago

Question

c. What were the reasons for their move? Did they come voluntarily?

Answered: 1 week ago

Question

5. How do economic situations affect intergroup relations?

Answered: 1 week ago