Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class Exercise 0 6 _ RaceDay { / * * Registration for your company's annual 1 0 K is underway. * Participants are assigned
public class ExerciseRaceDay
Registration for your company's annual K is underway.
Participants are assigned to a block based on their age int and whether
they registered early boolean
Return a participant's block according to the following criteria:
If they are and registered early, they join the first block.
If they are and did not register early, they join the second block.
If they are they join the third block.
Given a runner's age int and earlyregistration status boolean return
their assigned race block:
Examples:
determineRaceBlock false
determineRaceBlock true
determineRaceBlock false
determineRaceBlock true
determineRaceBlock false
determineRaceBlock true
public int determineRaceBlockint age, boolean isEarlyRegistration
return ;
The race organizers need to assign each participant a bib number. The bib
number is either their registration number, or their registration number
depending on the following conditions:
If they are and registered early their race bib number is their
registration number
If they are or and did not register early, their race bib
number is their registration number.
Given a participant's age int their registration number int and whether
they registered early boolean return their race bib number int
Examples:
getBibNumber false
getBibNumber true
getBibNumber false
getBibNumber true
getBibNumber false
getBibNumber true
public int getBibNumberint age, int registrationNumber, boolean isEarlyRegistration
return ;
As the race approaches full capacity, organizers need to adjust the bib
numbering system.
Given a participant's age int their registration number int and
whether they registered early boolean return their race bib number int
Apply the same rules as above with one exception. If a runner did not
register early and their registration number is return to indicate
that there are no more spots left.
getConfirmedBibNumber false
getConfirmedBibNumber true
getConfirmedBibNumber false
getConfirmedBibNumber true
getConfirmedBibNumber false
getConfirmedBibNumber true
getConfirmedBibNumber false
getConfirmedBibNumber true
public int getConfirmedBibNumberint age, int registrationNumber, boolean isEarlyRegistration
return ;
in java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started