Question: **Code must be in JAVA and add must add necessary comment on the code** Suppose being a back-end software engineer, your team has assigned you

**Code must be in JAVA and add must add necessary comment on the code**
Suppose being a back-end software engineer, your team has assigned you to develop the back-end system for an online farmer registration system. The user will be needing to provide you the following information in separate input fields: 1. First Name 2. Last Name 3. Date of Birth 4. Number of Family Members above age 18 5. Number of Family Members below age 18 6. Average Monthly Personal Income 7. Average Monthly Family Income by 8. Average Monthly Family Expense 9. Average Monthly Farming Expense 10. If they need any help from the government 11. Amount of money they wish to have as stipend from the Govt. 12. Fertilizers (in kg) s/he needs to buy each month For the above String input fields, you need to code a program to primarily check whether the data given is valid or not. Each of the input fields will be taken as String input. Necessary type castings may be required later for calculation. For any invalid input your program needs to handle the exception and print user friendly message about the error occurred and suggest a valid input. You need to handle the following exceptions: 1. Any numeric character will not be accepted for First Name and Last Name fields. 2. Upon the date of birth given in any format you wish), you need to check whether the user is minimum of 18 years of age or not. Calculation required) If not 18. appropriate error message should be displayed 3. Number of family members is not expected to be more than 15 4. Average monthly personal family income/expense field will only accept numeric characters and should not exceed 6 digits. 5. Average family/farming expense should not be 25% more than the family income. 6. Field no. 10 should only receive Boolean values 7. Field no. 11 will only receive numeric characters and should not exceed 25% more than the average family income. 8. Input for monthly Fertilizers usage should not be more than two digits and will only receive integer inputs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
