Q1. Write a program to accept Name, Date of Birth, from user
and print age of user with salutation as per the time good evening or good afternoon, good morning or good night. (Use bean class, main class and service class). Bean will store data, Main will input/output to user Service contains all action methods.
Good morning = after 5 am and before 12 pm.
Good afternoon= after 12 pm and before 5pm. Good evening = after 5 pm and before 10 pm. Good night = after 10 pm and before 5 am.
Sample output: if inputs Name= Vaibhav DOB= 11/10/83
With these inputs your output will look like
Good morning, Vaibhav, you are 34 years old.
Note:- Show complied and running program to instructor.