Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

solve with WHILE and matrix A food company manufactures five types of 32-oz trail mix packages using different mixtures of peanuts, almonds, walnuts, raisins and

solve with WHILE and matrix image text in transcribed
image text in transcribed

A food company manufactures five types of 32-oz trail mix packages using different mixtures of peanuts, almonds, walnuts, raisins and M&Ms. The mixtures can vary in the amount of each composition (with some min and max for each) but can never vary in the total weight of the package.

The data of each package manufactured is stored by day

Your program must verify that each package complies with the min, max and total weight requirements as follows:

  • Each package must have a total weight of 32-oz. if the package have less or more than that, the program must say that it didn't pass the test and why (too light, too heavy)
  • Each package must have at least 2 of each ingredient, and 10 at most. If a package have less or more than that, the program must say that it didn't pass the test and why (which ingredients are not right and if it has too few of it or too much)

According to the requisites, Mixes#2, 3 and 5 should be rejected, so, the message should be:

Total Rejections = 3

Rejection: Mix 2 - total weight heavier than standards

Rejection: Mix 3 - Almonds exceed standard, Raisins are below standards

Rejection: Mix 5 - total weight lighter than standards

A food company manufactures five types of 32 -oz trail mix packages using different mixtures of peanuts, almonds, walnuts, raisins and M\&Ms. The mixtures can vary in the amount of each composition (with some min and max for each) but can never vary in the total weight of the package. The data of each package manufactured is stored by dav Your program must verify that each package complies with the min, max and total weight requirements as follows: - Each package must have a total weight of 32-oz. if the package have less or more than that, the program must say that it didn't pass the test and why (too light, too heavy) - Each package must have at least 2 of each ingredient, and 10 at most. If a package have less or more than that, the program must say that it didn't pass the test and why (which ingredients are not right and if it has too few of it or too much) According to the requisites, Mixes\#2, 3 and 5 should be rejected, so, the message should be: Total Rejections =3 Rejection: Mix 2 - total weight heavier than standards Rejection: Mix 3 - Almonds exceed standard, Raisins are below standards Rejection: Mix 5 - total weight lighter than standards

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

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students also viewed these Databases questions