Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Needs to be done in Java Problem 2: Horse Weights Research shows that horses are satisfied when they consume an amount equivalent to a certain

Needs to be done in Java image text in transcribed
Problem 2: Horse Weights Research shows that horses are satisfied when they consume an amount equivalent to a certain percentage of their body weight on a daily basis. Depending on the horse type, some are satisfied with as little as 1.8% of their body weight, but others may require up to 3.2% of ther body weight. An average of 2.0% is a good starting point for most"maintenance" and "light work" equines. The intake level for "moderate work" equines is slightly higher at 2.5%. For growing" equines, "lactating" equines or equines that are subject to "heavy work start with a 3.0% intake level. Given a list of horse weights and horse types, you are to make a program that should output the amount of feed that each horse needs. Attached is a list of 100 horse weights and horse types in the following format, with each horse weight and horse type on a single line rowing hearz woz Read in the data into 2 arrays of appropriate type. Then make a function that will have 2 parameters; a single horse's body weight, and the horse's type. The function should return the horse's amount of feed. You will then output the index number for each horse, 1-100, and how much feed that equine should receive. (Note that we will use pounds for the body weight, and therefore our amount of feed will also be in pounds.) Here is an example of some output- using the sample input from above: 32.5 21 30.8 39 39.6 22.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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books