Question: complete the methods in java For the method your Age make sure that use the steps in the Javadoc comment to compute the final result

 complete the methods in java For the method your Age make
sure that use the steps in the Javadoc comment to compute the
final result (ie, don't compute the result as 2021 - birthYear -
complete the methods in java

For the method your Age make sure that use the steps in the Javadoc comment to compute the final result (ie, don't compute the result as 2021 - birthYear - 1 + birthdays). You do not need to test if birthdays is 0 or 1, or if the address is less than 20000000, or if the birth year will produce an age less than 1 or greater than 99. Computes the age (in years) of a person using the following convoluted algorithm: 4

    *
  • start with the person's street (@code address) *
  • double the result from the previous step *
  • add 42 to the result from the previous step
  • multiply the previous step by 50
  • subtract the person's {@code birthYear} from the previous step
  • subtract 50 from the previous step *
  • add the number of {@code birthdays} the person has had this year to the previous step
  • subtract 30 from the previous step
  • removes all but the last two digits of the result from the previous step; the last two digits are equal to the age of the person

This algorithm works only for people aged 1-99 and for addresses less than approximately @param address the person's street address number @param birthYear the person's birth year @param birthdays the number of birthdays the person has had this year (either @ or 1) return the age of the person public static int yourAge(int address, int birthYear, int birthdays) { int result = address; W/ -make sure that you follow the rest of the steps described VL in the doc comment above to compute the final result 1 each step should be one additional line of code (so don't merge multiple steps together) y this means that the next line of code should be something like: result = result. 2; // return result; 3 /**

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!