Question: A student can only pass a course so long as they meet the following lab attendance criteria: They missed fewer than 2 labs They were
A student can only pass a course so long as they meet the following lab
attendance criteria:
They missed fewer than labs
They were never late for consecutive labs
Demonstrators record a string representing a student's track record for
absent for late, for present
Write a recursive program that takes in one of these strings and outputs
whether the student should fail or not. If you can't think of how to do it
recursively then just do it in any way!
Example :
Input: PPALLP
Output: PASS
Explanation: The student has fewer than absences and was never late for or
more consecutive labs
Example :
Input: PPALLLPPPPPPP
Output: FAIL
Explanation: The student was late for consecutive labs
Please do in Java code.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
