Question: Write the following in JAVA. d) Write a public procedure/function with no arguments. This should then count from 1 to 24, every time calling Assessment5Y2022.loop(n),
Write the following in JAVA.
d) Write a public procedure/function with no arguments. This should then count from 1 to 24, every time calling Assessment5Y2022.loop(n), where n is the loop counter. At the end, it should call Assessment5Y2022.loopEnd() once and only once.
e) Write a public procedure/function that should accept an array of integers that represent a strand of DNA. The function checks to see if there are any errors and returns false if there are and true (OK) if not. An error will occur if there is a value greater than 4 or less than 0 anywhere in the array. For example, the array {0,3,2,3,1} would return true and the array {0,2,4,4,2,1,3,5,4} would return false. Note your function might be called more than once to check it. Your solution should not depend upon the first values given to it.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
