Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NO CODE just written algorithm Horse Movers Next week, you have to move several horses across town. Each horse is in its own stall which

NO CODE just written algorithm

Horse Movers Next week, you have to move several horses across town. Each horse is in its own stall which is enclosed with a door in the front. In the back of the stall is a tag with the horses name and weight. You cannot remove the tag.

Today you have been asked to develop an algorithm that will allow you to determine the average weight of all of the horses, and the name and weight of the lightest horse and the heaviest horse.

You may assume that:

there aren't any other people around to help you gather the information about each horse;

you can weigh only one horse at a time;

and you cannot remove horses from their stables to weigh them (you'll need a portable scale).

Develop an algorithm that does not require writing down or recording the name and/or weight of every horse. Instead, you want to record only the minimum amount of information needed at any one time to solve this problem.

Submit the algorithm that calculates: the number of horses the average weight of all horses the name and weight of the lightest horse the name and weight of the heaviest horse the specific pieces of data that youll need to complete your algorithm. Please remember than an algorithm must be unambiguous, executable, and terminating.

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

Students also viewed these Databases questions

Question

Determine the roles of spatial layout and functionality.

Answered: 1 week ago