Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ANSWER FULLY, WILL RATE WELL The research and development division in your compa

ID: 3624225 • Letter: A

Question

ANSWER FULLY, WILL RATE WELL

The research and development division in your company is experimenting with four new types of packaging for storing and shipping medications used to treat multiple sclerosis. The medications must be kept refrigerated and have a very short shelf-life once exposed to room temperature prior to use. The head of research and development has devised a methodology for testing ten different physical phenomena related to the packaging and quality of the medication, where each of the ten tests generates a numerical result. For even numbered tests, the package with the lowest score is awarded three points, the package with the second lowest score is awarded two points, the package with the third lowest score is awarded one point, and the package with the highest score is awarded zero points. For odd numbered tests, the package with the highest average score is awarded three points, the package with the second highest average score is awarded two points, the package with the third highest average score is awarded one point, and the package with the lowest average score is awarded zero points. The package with the greatest number of points will be recommended to the manufacturing division.

Example results from ten tests are shown below.


Test Package #1 Package #2 Package #3 Package #4
1 7.56 34.21 22.09 15.79
2 123.45 50.41 75.65 175.23
3 1.01 1.22 2.03 0.87
4 5.98 6.23 3.73 2.56
5 1000.0 1500.0 1750.0 1275.0
6 9.03 9.01 9.04 9.02
7 65.1 59.2 49.3 74.5
8 543.22 578.99 567.98 559.64
9 32.88 31.43 30.11 33.35
10 0.06 0.03 0.02 0.04

Develop an algorithm (either in English-like pseudocode or as a flowchart) that solves the problem of which package to recommend.


Explanation / Answer

for testNum = 1 to 10:
   Initialize testScores to [0,0,0,0]
   // testScores[num] will hold the sum of points for package number num-1
   Let results be an array or list of length 4
   for packageNum = 0 to 3:
      Run test testNum on package packageNum, and store the result in results[packageNum]
   Let packageOrder = the list or array of the numbers 1 through 4
   // packageOrder contains the numbers of the four packages
   if testNum is even:
       Sort packageOrder using the ordering a > b if results[a] < results[b]
   if testNum is odd:
Sort packageOrder using the ordering a > b if results[a] > results[b]
// The numbers of the packages are now sorted from zero points to four points

   for points = 0 to 3:
   Add points to testScores[packageOrder[points]-1]

Let i be the index of the maximum element of testScores.
Return i+1

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote