Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions