Please help with this JAVA PROGRAMMING 1 Assignment. This is the instructions and the code I have done so far. Please help figure out what to do next. I am so stuck. Thank you. You are creating a database of fey creatures found in Western Arkansas.  Your data includes the creature's species, description, diet, and difficulty to catch.  Include the following in your database: Species Description Diet Danger Level Times Caught Sprite Small winged humanoid berries medium 1 Goblin Common evil fey Omnivorous medium 5 Troll Large, dangerous, ugly humanoids high 1 Boggart Mischievous teleporting goblin-like creature stolen pies low 4 Gnome Small, shy, burrowing  burrowing critters low 2 Dryad tree-maiden spirit tied to a forest unknown medium 0 Using one or more arrays, display this list. Modify the program so the user enters a number.  Then, display all the creatures (and their info) who have been caught at least that many times. In addition to the above, allow the user to enter the name of a creature.  If that creature is in the list, add one to the number of times that creature has been caught and display the list again.  Otherwise, let the user know it isn't in the list. import java.util.*; public class FirstDatabase {     public static void main (String args[])     {         Scanner kb = new Scanner(System.in);         System.out.println("How many fiends would you like to enter?");         int friends = kb.nextInt();         kb.nextLine();         System.out.println();                  //array for user input         //String array for names of friends         String[] names = new String [friends];         //array to store ages         int ages [] = new int [friends];         //array to store addresses         String[] addresses = new String [friends];                  for (int i=0; i

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Please help with this JAVA PROGRAMMING 1 Assignment. This is the instructions and the code I have done so far. Please help figure out what to do next. I am so stuck. Thank you.

You are creating a database of fey creatures found in Western Arkansas.  Your data includes the creature's species, description, diet, and difficulty to catch.  Include the following in your database:

Species Description Diet Danger Level Times Caught
Sprite Small winged humanoid berries medium 1
Goblin Common evil fey Omnivorous medium 5
Troll Large, dangerous, ugly humanoids high 1
Boggart Mischievous teleporting goblin-like creature stolen pies low 4
Gnome Small, shy, burrowing  burrowing critters low 2
Dryad tree-maiden spirit tied to a forest unknown medium 0

Using one or more arrays, display this list.

Modify the program so the user enters a number.  Then, display all the creatures (and their info) who have been caught at least that many times.


In addition to the above, allow the user to enter the name of a creature.  If that creature is in the list, add one to the number of times that creature has been caught and display the list again.  Otherwise, let the user know it isn't in the list.

import java.util.*;

public class FirstDatabase {
    public static void main (String args[])
    {
        Scanner kb = new Scanner(System.in);
        System.out.println("How many fiends would you like to enter?");
        int friends = kb.nextInt();
        kb.nextLine();
        System.out.println();
        
        //array for user input
        //String array for names of friends
        String[] names = new String [friends];
        //array to store ages
        int ages [] = new int [friends];
        //array to store addresses
        String[] addresses = new String [friends];
        
        for (int i=0; i<friends; i++)
        {
            //user input for names
            System.out.print("Please enter the name of friend "+(i+1)+":");
            names[i] = kb.nextLine();
            
            //user input for age
            System.out.print("Please enter the age of friend "+(i+1)+":");
            ages[i] = kb.nextInt();
            kb.nextLine();
            
            //user input for addresses
            System.out.print("Please enter the address of friend "+(i+1)+":");
            addresses[i] = kb.nextLine();
            
            System.out.println();
        }
        
        //format for table display
        Formatter chart = new Formatter();
        System.out.println();
        System.out.println("Information Chart");
        chart.format("%5s%15s%25s\n","Name","Age","Address");
        
        for (int i=0; i<friends; i++)
        {
            chart.format("%5s%15s%25s\n",names[i], ages[i], addresses[i]);
        }
        //print statement for chart
        System.out.println(chart);
            
        }
    }

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY