Question: Problem: The Swami class (Swami.java) 40 pts 3 instance data: name, month, day; Methods: getName, getMonth, getDay, getSign, getHoroscope, setDay, setMonth, changeBirthday; changeBirthday () Use
Problem:
The Swami class (Swami.java) 40 pts
3 instance data: name, month, day;
Methods: getName, getMonth, getDay, getSign, getHoroscope, setDay, setMonth, changeBirthday;
changeBirthday ()
Use your birthday month and decrement by 6 (if is less than or equal to 6, then it will increment by 3; Take your birth day (13, 25, etc) and decrement it by 5 (if is less than or equal to 5, then increment by 3)
The demoSwami.java Application 30 pts
demoSwami application will do the following:
(1) Read a birthday from the keyboard using Scanner object
Sample data input from the keyboard
Gabe 08 23
Mary 04 11
Annette 06 16
Rashid 07 17
Faye 06 09
Tommy 12 24
Tarina 09 28
Jason 02 28
(2) For each birthday it will
(a) Create a Swami object
(b) Display the initial state of the object; (Name, Month, Day)
Use accessor and mutator methods to do the following:
(c) Display the objects horoscope, sign, and symbol;
(d) Call changeBirthday; redisplay Name, Month and Day;
e) display the new horoscope, sign, and symbol;
Note: Also if I try to insert an incorrect date you should validate :Sept 31 should not be allowed; etc.
Output:
Name:Gabe Month:08 Day:23
Gabe, Swami says: You don't mind working hard to make something great happen and today is a good time to figure out your next steps.
Sign:Virgo Symbol:Virgin
AfterChangeBirthday
Name:Gabe Month: Day: (New month and new day)
New Horoscope
Sign:New Sign Symbol:New Symbol
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
