Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Instead of asking the user for their age, calculate it based upon their entry of the birthdate. a. Calculate their age in years. b.
1. Instead of asking the user for their age, calculate it based upon their entry of the birthdate. a. Calculate their age in years. b. You will need to parse out the year from the string data holding the birthdate. 2. This calculation should be done by calling a special method written in the User class that calculates and then sets the age. 3. Since age is now calculated, decide if you need a setter for the age variable. Be sure to justify your decision either way within the comments of your code. Be sure to use proper Object Oriented principles in your justification
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