Question: continue to compile/run our Java programs from the command line. Create a program that shows the following We'll need to know a few things about

continue to compile/run our Java programs from the command line.

Create a program that shows the following

We'll need to know a few things about our knight such as his name(hint:String), health(hint:int), number of battles, age, and amount of gold procured from pillaging.

To keep track of all of these attributes, we'll need to create a container to hold each of the specified pieces of information above. To populate each of these containers, we'll need to have a way of entering data from the user.

To get an overall picture of your knight, we'll need a way to export all of these attributes to the screen. Hint: You can use Scanner's next() method to gather the String name.

Acceptance Criteria:

1. Ability to enter Sir Jav-a-lot's attributes.

2. Sir Jav-a-lot's information will be shown on the screen.

a. In addition to showing each of Sir Jav-a-lot's attributes, we need to know the average gold accumulated per battle.

3. This is to be a command line interface only.

4. . Output must be displayed using the printf method.

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!