How do you program using Java?

How can i make a horoscope program using java programming language?

  • i have a project in school. i need to create a running HOROSCOPE program using java. the program needs to give an output (Zodiac Sign, Lucky Number and Mood) when the user input their birth date. hope anyone can help me. thanks in advance. :))

  • Answer:

    First, you need a table of objects. Each object is a "Zodiac" object, consisting of a name (e.g., "Taurus"), start date (e.g., April 19), end date (e.g. May 20), and whatever other information you want (e.g., an image representing the astrological symbol, a cartoon image of a bull, and whatever else you think will sell the package). Next, you need a table of horoscopes. See if you can look up several weeks' worth of newspaper horoscopes, and get them into your program somehow. With luck, you can find what you want online so you won't need to retype anything. Clean the data up -- you want to remove any hard references to astrological signs. Just raw advice. Now you need a user-interface. Ask the user for their name and birthdate. Look that birthdate in your table of Zodiac symbols (where birthdate >= Zodiac.startdate and birthdate <= Zodiac.enddate). Generate a random number between zero and the number of entries in your horoscope table. Generate another random number between 1 and 100. Generate finally a third random number between 0 and however many "moods" you want. Print out the user's name, birthdate, Zodiac sign, and the selected horoscope. Print out the next random number ("Your Lucky Number is: "), and finally grab a mood from a table of moods based on the third random number. If you want to get fancy, display the stored Zodiac symbol image and the cartoon. Clean it up, make it look fancy, fill it with hundreds, maybe thousands of different horoscopes, and you could easily sell this to gullible astrology buffs and make some good money.

Pinoy at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

You design the interface of the program well by inserting zodiac images and other symbols. Then get input and provide validations for the input. Process on the input and then display the information like what will be the future for current user by taking parameters like name, birth date and time, day of the birth. Hope this will help you . :-)

Nagesh24D

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.