Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA. Please I need the same output! Counting animals in a zoo All similar animals in a zoo share the same cage. For example, south

JAVA. Please I need the same output! Counting animals in a zoo All similar animals in a zoo share the same cage. For example, south china tiger and javan tiger are in the same cage, and we only want to know there are two tigers. Given an integer K, followed by K lines describing animals, count and output in alphabetical order the animals in the zoo. The input data file includes multiple cases. Each case contains a number K (0<=K<=500), followed by K lines of animals with at least one word on each line, and the last word describing the kind of animal. For example, Caspian tiger is a tiger (obviously). The input is terminated by a 0. Output: For each test case, count and output the number for each animal type in alphabetic order: animal type followed by : and the number of that type animal. Other requirements: class name: CountingAnimals.java Sample input Sample output 5 List 1: Bengal tiger bear : 2 Brown bear tiger : 3 Sun bear List 2: South China tiger penguin : 2 Bali tiger 2 King penguin Fiordland penguin 0 

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

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

Be familiar with the different perspectives of service quality.

Answered: 1 week ago

Question

Describe key customer feedback collection tools.

Answered: 1 week ago

Question

Know what customers expect from the firm when they complain.

Answered: 1 week ago