subject

Monkey business, a local zoo, wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. write a program that stores this information in a two-dimensional 3 7 array, where each row represents a different monkey and each column represents a different day of the week. the monkeys are represented by integers 1, 2, and 3; the weekdays are "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday". the program should first prompt the user to input the data for each monkey, starying with "sunday" for monkey #1, then monkeys #2 and #3 followed by "monday" for monkey #1, then monkeys #2 and #3 and so on, through "saturday". the program then creates a report that includes the following information, each properly labeled (see below): average amount of food eaten per day by the whole family of monkeysthe least amount ot food eaten during the week by any one monkeythe greatest amount of food eaten during the week by any one monkeyinput validation: do not accept negative numbers for pounds of food eaten. when a negative value is entered, the program outputs "invalid (negative) food quantity-reenter" and attempts to reread the value. prompts and ouput labels: decimal values should be displayed using default precision (do not specify)each item read should be prompted for by a string of the form "enter the food eaten by monkey #n on day: " where n is 1,2, or 3 and day is "sunday" through "saturday".the output should be of the form: average food consumed daily: 6.23.the least daily food consumed was by monkey #1 on friday. the most daily food consumed was by monkey #2 on sunday.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 15:40, lmirandanvmi
Establish which of the following statements are true. (a) a sequence is convergent if and only if all of its subsequences are convergent. (b) a sequence is bounded if and only if all of its subsequences are bounded. (c) a sequence is monotonic if and only if all of its subsequences are monotonic.
Answers: 2
image
Computers and Technology, 23.06.2019 18:00, yedida
File account. java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
image
Computers and Technology, 24.06.2019 01:00, arturocarmena10
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, colebuug9
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
You know the right answer?
Monkey business, a local zoo, wants to keep track of how many pounds of food each of its three monke...

Questions in other subjects:

Konu
Mathematics, 03.10.2021 07:40
Konu
Mathematics, 03.10.2021 07:40