Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 10.09 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Horoscope
  4. {
  5.     private static final String Aquarius = "\nIt's going to be an easy breezy day for you -- most of \nyour hard choices are behind you, you're in a wonderful \nmood, and any workload you've been assigned will be pretty \ndarn simple to complete in no time. This means that \nall of your energy can (and should) be devoted \nto having fun and relaxing. This is a wonderful \nday to hang out with friends you haven't seen \nin ages, especially those who have been living far \nfrom you. Reconnect and remember together.";
  6.     private static final String Pisces = "\nSome surprising news will make even the most \nlevel-headed people around you turn into temperamental children. \nLuckily, their transformation will come off as incredibly \namusing to you. You're in a very tolerant mood \noverall right now, so this is a very good day to put \nin some time with those relatives who sometimes \ntest your patience. Conversation topics that \nused to make you groan will somehow be a lot \nmore interesting than ever before. \nYour curiosity overrides your cynicism today.";
  7.     private static final String Aries = "\nIf your recent dreams have been unclear, don't \nwaste any of your brain power freaking out about it. There is no \nneed to solve every puzzle they present, because they are \nnot literal warnings of what is about to happen \nin your life! They are just pieces of your subconscious \nflying around in your brain, bouncing into \neach other. If you want to look for insight on \nhow to handle tough issues, then turn away \nfrom dreams and toward your friends. \nThey have advice you need to hear.";
  8.     private static final String Taurus = "\nThere will be a strong connection between you \nand someone very surprising today. They will come out with an \nobservation about you that is right on the mark, and the \nconversation that ensues proves the two of you have \na lot of common goals. You will be the center of attention \nin this dynamic, so try not to blush! Indulge \nyourself today -- when you do something \nnice for yourself, you are showing the world \nthat you value yourself -- and that \nis very attractive.";
  9.     private static final String Gemini = "\nThere is a growing imbalance between your heart \nand head and it's necessary for you to deal with it today. \nYou have been feeling a lot more than thinking, which could \ncause a misunderstanding if you're not careful. \nBe aware of when your feelings are relevant -- and when they \nare not. Any major decisions you've been \nmulling over should be held off until a time \nwhen you know you're looking solely at the facts. \nYou're not especially objective, right now.";
  10.     private static final String Cancer = "\nSure, you may be forced to deal with a past \nfailure today, but you can fix what needs to be fixed as long as \nyou have confidence in yourself. Don't sell yourself short -- \nyou know exactly what to do and you know exactly \nhow to do it. Start listening to your strong intuition -- \nbecause it's getting even stronger! \nTrust your gut to tell you the answer to a question \nyou've had about someone who confuses you on \na regular basis. If you over think things, \nyou'll lose an opportunity.";
  11.     private static final String Leo = "\nNow that you've made a tough decision, your day \nwill feel effortless. Green lights, warm smiles and a wide open \nroad greet you everywhere you go today. Things are clearer. \nIt's no surprise that with all this weight taken \noff your mind, you can move forward on what you really need \nto do. There's a strong sense of possibility \nthat is shining brightly in your romantic life, too. \nUnexpected invitations may intimidate \nyou -- so just take things at your own pace.";
  12.     private static final String Virgo = "\nYou have an easy attitude about life today, \nand you'll have a good time just shooting the breeze with your \nfriends -- so try not to have a very elaborate or ambitious schedule. \nIt will feel liberating to slow down your pace. \nYou are getting along really well with other people, \nso surround yourself with as many friends as you \ncan all day long. It's a great time to have a big \npotluck dinner, get everyone together \nfor a game of kickball, or volunteer to \nhost a backyard barbecue.";
  13.     private static final String Libra = "\nYou should just relax and try to enjoy watching \nthe world go by today -- resist the urge to dive into the \nrat race. Life from the sidelines can be just as beautiful as \nlife in the heat of the action can be. Plus, gaining an \noutsider's perspective will come in handy in future relationships \nand job opportunities. Understanding why \npeople are doing what they're doing will give \nyou a leg up on the competition. Coasting \nthrough life today will help you greatly \ntomorrow.";
  14.     private static final String Scorpio = "\nWhenever things are not going exactly the way \nyou want them to, you need to start getting creative about \nyour expectations. But you also have to know when to stand \nyour ground and not give in -- not even an inch. Today, speak \nup if you just can't go along with what everyone else is saying \nor doing. Sometimes the only way to \nget people to listen to you and respect what you say \nis to force them to. A quiet word to the \nright person will get you the satisfaction \nyou need.";
  15.     private static final String Sagittarius = "\nGetting a friend to join you on your \nlatest plan might be difficult, but it will be worth all the \neffort it takes. They make things more fun! Even though they need \nto be convinced, when it comes to what to do next, their presence \nis important to you. So don't give up until they eventually \nsay 'yes.' You're ready to be more spontaneous, \nand they should try it, too. Appeal to their \nimagination. Paint a picture of \nthe best case scenario -- that might sway \nthem over to your side.";
  16.     private static final String Capricorn = "\nCast a critical eye on all your relationships \ntoday -- at work, in your family and definitely in your \nromantic sphere. There's nothing necessarily wrong, but you do need to check in \nand make sure that you're doing your part to keep \nthe lines of communication wide open. Be careful not to be too \nhard on yourself if you've been a bit unavailable \nto the people who care about you. No one \nis perfect! Remember to treat yourself \nwith the same gentle compassion you \nshow to your friends and family.";
  17.  
  18.     public void getFortune()
  19.     {
  20.         Scanner reader = new Scanner(System.in);
  21.         System.out.print("Please enter your birthday month (number): ");
  22.         int month = reader.nextInt();
  23.         System.out.print("Please enter your birthday day: ");
  24.         int day = reader.nextInt();
  25.         System.out.println("");
  26.  
  27.         if (month == 1)
  28.         {
  29.             if (day <= 19)
  30.             {
  31.                 System.out.printf("%s: %s", "Capricorn", Capricorn);
  32.             }
  33.             else if (day > 19 && day <= 31)
  34.             {
  35.                 System.out.printf("%s: %s", "Aquarius", Aquarius);
  36.             }
  37.             else
  38.             {
  39.                 System.out.println("The date is invalid.");
  40.             }
  41.         }
  42.         else if (month == 2)
  43.         {
  44.             if (day <= 18)
  45.             {
  46.                 System.out.printf("%s: %s", "Aquarius", Aquarius);
  47.             }
  48.             else if (day > 18 && day <= 29)
  49.             {
  50.                 System.out.printf("%s: %s", "Pisces", Pisces);
  51.             }
  52.             else
  53.             {
  54.                 System.out.println("The date is invalid.");
  55.             }
  56.         }
  57.         else if (month == 3)
  58.         {
  59.             if (day <= 20)
  60.             {
  61.                 System.out.printf("%s: %s", "Pisces", Pisces);
  62.             }
  63.             else if (day > 20 && day <= 31)
  64.             {
  65.                 System.out.printf("%s: %s", "Aries", Aries);
  66.             }
  67.             else
  68.             {
  69.                 System.out.println("The date is invalid.");
  70.             }
  71.         }
  72.         else if (month == 4)
  73.         {
  74.             if (day <= 19)
  75.             {
  76.                 System.out.printf("%s: %s", "Aries", Aries);
  77.             }
  78.             else if (day > 19 && day <= 30)
  79.             {
  80.                 System.out.printf("%s: %s", "Taurus", Taurus);
  81.             }
  82.             else                {
  83.                 System.out.println("The date is invalid.");
  84.             }
  85.         }
  86.         else if (month == 5)
  87.         {
  88.             if (day <= 20)
  89.             {
  90.                 System.out.printf("%s: %s", "Taurus", Taurus);
  91.             }
  92.             else if (day > 20 && day <= 31)
  93.             {
  94.                 System.out.printf("%s: %s", "Gemini", Gemini);
  95.             }
  96.             else
  97.             {
  98.                 System.out.println("The date is invalid.");
  99.             }
  100.         }
  101.         else if (month == 6)
  102.         {
  103.             if (day <= 20)
  104.             {
  105.                 System.out.printf("%s: %s", "Gemini", Gemini);
  106.             }
  107.             else if (day > 20 && day <= 30)
  108.             {
  109.                 System.out.printf("%s: %s", "Cancer", Cancer);
  110.             }
  111.             else
  112.             {
  113.                 System.out.println("The date is invalid.");
  114.             }
  115.         }
  116.         else if (month == 7)
  117.         {
  118.             if (day <= 22)
  119.             {
  120.                 System.out.printf("%s: %s", "Cancer", Cancer);
  121.             }
  122.             else if (day > 22 && day <= 31)
  123.             {
  124.                 System.out.printf("%s: %s", "Leo", Leo);
  125.             }
  126.             else
  127.             {
  128.                 System.out.println("The date is invalid.");
  129.             }
  130.         }
  131.         else if (month == 8)
  132.         {
  133.             if (day <= 22)
  134.             {
  135.                 System.out.printf("%s: %s", "Leo", Leo);
  136.             }
  137.             else if (day > 22 && day <= 31)
  138.             {
  139.                 System.out.printf("%s: %s", "Virgo", Virgo);
  140.             }
  141.             else
  142.             {
  143.                 System.out.println("The date is invalid.");
  144.             }
  145.         }
  146.         else if (month == 9)
  147.         {
  148.             if (day <= 22)
  149.             {
  150.                 System.out.printf("%s: %s", "Virgo", Virgo);
  151.             }
  152.             else if (day > 22 && day <= 30)
  153.             {
  154.                 System.out.printf("%s: %s", "Libra", Libra);
  155.             }
  156.             else
  157.             {
  158.                 System.out.println("The date is invalid.");
  159.             }
  160.         }
  161.         else if (month == 10)
  162.         {
  163.             if (day <= 22)
  164.             {
  165.                 System.out.printf("%s: %s", "Libra", Libra);
  166.             }
  167.             else if (day > 22 && day <= 31)
  168.             {
  169.                 System.out.printf("%s: %s", "Scorpio", Scorpio);
  170.             }
  171.             else
  172.             {
  173.                 System.out.println("The date is invalid.");
  174.             }
  175.         }
  176.             else if (month == 11)
  177.         {
  178.             if (day <= 21)
  179.             {
  180.                 System.out.printf("%s: %s", "Scorpio", Scorpio);
  181.             }
  182.             else if (day > 22 && day <= 30)
  183.             {
  184.                 System.out.printf("%s: %s", "Sagittarius", Sagittarius);
  185.             }
  186.             else
  187.             {
  188.                 System.out.println("The date is invalid.");
  189.             }
  190.         }
  191.         else if (month == 12)
  192.         {
  193.             if (day <= 21)
  194.             {
  195.                 System.out.printf("%s: %s", "Sagittarius", Sagittarius);
  196.             }
  197.             else if (day > 21 && day <= 30)
  198.             {
  199.                 System.out.printf("%s: %s", "Capricorn", Capricorn);
  200.             }
  201.             else
  202.             {
  203.                     System.out.println("The date is invalid.");
  204.             }
  205.         }
  206.         else
  207.         {
  208.             System.out.println("The month is invalid.");
  209.         }
  210.         reader.close();
  211.     }
  212. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement