Results 1 to 7 of 7
Thread: sign finder
- 05-01-2009, 03:20 AM #1
Member
- Join Date
- Apr 2009
- Posts
- 11
- Rep Power
- 0
sign finder
i'm having trouble trying to figure out how i should implement code. i have an assignment for school and i seemed to have figured out 2/3 of it. the last part is to make a program that would allow a user to input their birthday and it would display the persons astrological sign. i am stuck on how i could do this in java. im thinking an arraylist would be ideal, and i would search it, but i'm still stuck. does anyone have an idea on how i could approach this? thank you in advance for your thoughs/opinions.
- 05-01-2009, 03:42 AM #2
western(Aries,Taurus,...) or eastern(chick, pig, dog, ...) ?
USE CODE TAGS--> [CODE]...[/CODE]
Get NotePad++ (free)
- 05-01-2009, 03:52 AM #3
Surely just a 12-case if statement? Use an enum to represent the possible results.
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 05-01-2009, 04:02 AM #4
Member
- Join Date
- Apr 2009
- Posts
- 11
- Rep Power
- 0
western! orange dog, i am using scanner class and it will ask the user what their bday is and then display it if that makes any difference. im not sure how i could use case if for that because of the difference in dates.
- 05-01-2009, 04:25 AM #5
Use DateFormat to parse the date and return which day of the year it is. Then
Java Code:if (day > 355 || day < 21) sign = CAPRICORN; else if (day < 51) sign = AQUARIUS; ...etc
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 05-01-2009, 04:49 AM #6
Member
- Join Date
- Apr 2009
- Posts
- 11
- Rep Power
- 0
guess i'm retarded but i still can't figure it out. thanks anyway guys
-
Similar Threads
-
How To self sign applet
By Chintan Patel in forum Java AppletsReplies: 1Last Post: 03-16-2009, 02:31 PM -
digital sign libraries
By Shuru in forum Advanced JavaReplies: 4Last Post: 11-07-2008, 08:01 AM -
[SOLVED] How to self-sign an Applet?
By Master Zero in forum Java AppletsReplies: 3Last Post: 09-05-2008, 07:34 AM -
Root Finder for polynomials
By gibsonrocker800 in forum Advanced JavaReplies: 11Last Post: 01-03-2008, 11:26 PM -
Library Finder 1.2
By JavaBean in forum Java SoftwareReplies: 0Last Post: 07-15-2007, 04:43 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks