Each type of surgery (e.g., hair transplant) has the same amount of time available to complete it.

computer science

Description

Each type of surgery (e.g., hair transplant) has the same amount of time available to complete it. Every hair transplant will have the same amount of time. Another surgery (e.g., brain surgery) would have a different amount of time available to complete it. But every brain surgery would have the same amount of time.

In addition to the time limit, the difficulty in option 1 is also managed by the 3 arrays: minimum difficulties, maximum difficulties, and paragraphs.

Remember that the paragraphs arrays is sorted with the easiest/shortest at the beginning, and the hardest/longest paragraphs at the end of the array.

Going again with hair transplants, let's say it has a MINIMUM difficulty of 0 and a MAXIMUM difficulty of 3. If the program randomly chooses hair transplant for a particular level/surgery, the program would then generate another random number between 0 and 3 because that is the difficulty range for this surgery. This random number is used as the array index to select an element in the paragraphs array. Since the random number is going to be between 0 and 3, it is going to be right near the beginning of the paragraphs array. Therefore, this selected paragraph will be a short/easy paragraph.

Instruction Files

Related Questions in computer science category