ZhenghaoZhu

HoroscopeProject

Dec 30th, 2015
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 11.38 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class HoroscopeProject{
  4.   public static void main(String []args){
  5.     Scanner input = new Scanner(System.in);
  6.     String[] months = {"Zero", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December",};
  7.     String[] days = {"Zero", "First", "Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh", "Eighth", "Ninth", "Tenth", "Eleventh", "Twelfth", "Thirteenth", "Fourteenth", "Fifteenth", "Sixteenth", "Seventeenth", "Eighteenth", "Nineteenth", "Twentieth", "Twentyfirst", "Twentysecond", "Twentythird", "Twentyfourth", "Twentyfifth", "Twentysixth", "Twentyseventh", "Twentyeighth", "Twentyninth", "Thirthieth", "Thirtyfirst"};
  8.     System.out.println("What month were you born in?(Number form)");
  9.     int monthnumber = input.nextInt();
  10.     System.out.println("What day of the month were you born in?(Number form)");
  11.     int daynumber = input.nextInt();
  12.     if(monthnumber==1)
  13.       System.out.println("You were born in " + months[1]);
  14.     else if (monthnumber==2)
  15.       System.out.println("You were born in " + months[2]);
  16.     else if (monthnumber==3)
  17.       System.out.println("You were born in " + months[3]);
  18.     else if (monthnumber==4)
  19.       System.out.println("You were born in " + months[4]);
  20.     else if (monthnumber==5)
  21.       System.out.println("You were born in " + months[5]);
  22.     else if (monthnumber==6)
  23.       System.out.println("You were born in " + months[6]);
  24.     else if (monthnumber==7)
  25.       System.out.println("You were born in " + months[7]);
  26.     else if (monthnumber==8)
  27.       System.out.println("You were born in " + months[8]);
  28.     else if (monthnumber==9)
  29.       System.out.println("You were born in " + months[9]);
  30.     else if (monthnumber==10)
  31.       System.out.println("You were born in " + months[10]);
  32.     else if (monthnumber==11)
  33.       System.out.println("You were born in " + months[11]);
  34.     else if (monthnumber==12)
  35.       System.out.println("You were born in " + months[12]);
  36.     else
  37.       System.out.println("Please input a number between 1 and 12");
  38.     if(daynumber==1)
  39.       System.out.println("The day you were born in was the " + days[1]);
  40.     else if(daynumber==2)
  41.       System.out.println("The day you were born in was the " + days[2]);
  42.     else if(daynumber==3)
  43.       System.out.println("The day you were born in was the " + days[3]);
  44.     else if(daynumber==4)
  45.       System.out.println("The day you were born in was the " + days[4]);
  46.     else if(daynumber==5)
  47.       System.out.println("The day you were born in was the " + days[5]);
  48.     else if(daynumber==6)
  49.       System.out.println("The day you were born in was the " + days[6]);
  50.     else if(daynumber==7)
  51.       System.out.println("The day you were born in was the " + days[7]);
  52.     else if(daynumber==8)
  53.       System.out.println("The day you were born in was the " + days[8]);
  54.     else if(daynumber==9)
  55.       System.out.println("The day you were born in was the " + days[9]);
  56.     else if(daynumber==10)
  57.       System.out.println("The day you were born in was the " + days[10]);
  58.     else if(daynumber==11)
  59.       System.out.println("The day you were born in was the " + days[11]);
  60.     else if(daynumber==12)
  61.       System.out.println("The day you were born in was the " + days[12]);
  62.     else if(daynumber==13)
  63.       System.out.println("The day you were born in was the " + days[13]);
  64.     else if(daynumber==14)
  65.       System.out.println("The day you were born in was the " + days[14]);
  66.     else if(daynumber==15)
  67.       System.out.println("The day you were born in was the " + days[15]);
  68.     else if(daynumber==16)
  69.       System.out.println("The day you were born in was the " + days[16]);
  70.     else if(daynumber==17)
  71.       System.out.println("The day you were born in was the " + days[17]);
  72.     else if(daynumber==18)
  73.       System.out.println("The day you were born in was the " + days[18]);
  74.     else if(daynumber==19)
  75.       System.out.println("The day you were born in was the " + days[19]);
  76.     else if(daynumber==20)
  77.       System.out.println("The day you were born in was the " + days[20]);
  78.     else if(daynumber==21)
  79.       System.out.println("The day you were born in was the " + days[21]);
  80.     else if(daynumber==22)
  81.       System.out.println("The day you were born in was the " + days[22]);
  82.     else if(daynumber==23)
  83.       System.out.println("The day you were born in was the " + days[23]);
  84.     else if(daynumber==24)
  85.       System.out.println("The day you were born in was the " + days[24]);
  86.     else if(daynumber==25)
  87.       System.out.println("The day you were born in was the " + days[25]);
  88.     else if(daynumber==26)
  89.       System.out.println("The day you were born in was the " + days[26]);
  90.     else if(daynumber==27)
  91.       System.out.println("The day you were born in was the " + days[27]);
  92.     else if(daynumber==28)
  93.       System.out.println("The day you were born in was the " + days[28]);
  94.     else if(daynumber==29)
  95.       System.out.println("The day you were born in was the " + days[29]);
  96.     else if(daynumber==30)
  97.       System.out.println("The day you were born in was the " + days[30]);
  98.     else if(daynumber==31)
  99.       System.out.println("The day you were born in was the " + days[31]);
  100.     else
  101.       System.out.println("Please input a number between 1 and 30");
  102.     if ((monthnumber == 3 && daynumber <=21 )|| (monthnumber == 4 && daynumber <= 19 )){
  103.      System.out.println("You are Aries");
  104.      System.out.println("Horoscope: You may be very busy today. This is a good time to get things done. There's a feeling of discipline that's helping you stay focused. Emotions are stifled, which may work to your advantage. Keep everything limited to the facts at hand, and work can proceed much more efficiently than if simple issues become big soap operas.");
  105.    }
  106.      else if ((monthnumber == 4 && daynumber <=20 )|| (monthnumber ==5 && daynumber <= 20 )){    
  107.      System.out.println("You are Taurus");
  108.      System.out.println("Horoscope: You're having a difficult time connecting with your emotions today. Things will run more smoothly if you don't try to force yourself to act cheerful if you aren't. Be honest about your emotions. If you're feeling restless or negative, keep it to yourself. Go for a walk, preferably near water, and indulge in a good healthy meal.");
  109.    }
  110.      else if ((monthnumber == 5 && daynumber <=21 )|| (monthnumber == 6 && daynumber <= 20 )){
  111.      System.out.println("You are Gemini");
  112.      System.out.println("Horoscope: Take some emotional time off today if you feel you deserve it. You're getting so wrapped up in other people's dramas that you're feeling drained when it comes to your own concerns. Calm down and relax physically and mentally. Getting too stressed about a certain issue isn't healthy. You may end up foiling the situation much more than if you left it alone. Come back to it later.");
  113.       }
  114.      else if ((monthnumber == 6 && daynumber <=21 )|| (monthnumber == 7 && daynumber <= 22 )){
  115.      System.out.println("You are Cancer");
  116.      System.out.println("Horoscope: You may get more emotional than usual when it comes to work. Do your best to keep your emotional life separate from daily responsibilities. If you feel overwhelmed by a certain job to the point where you can no longer do it effectively, it may be a sign that you need to make some changes. This is a time of heightened sensitivity. Do your best to stay afloat.");
  117.       }
  118.      else if ((monthnumber == 7 && daynumber <=23 )|| (monthnumber == 8 && daynumber <= 22 )){
  119.      System.out.println("You are Leo");
  120.      System.out.println("Horoscope: People are hesitant to deal with deep emotional issues today. They're erecting protective barriers so the things they hear, see, and feel don't hurt them. Respect these boundaries. Do your best to stay rooted in your inner sanctuary. Try to keep a positive attitude even though the prevailing mood may be somber.");
  121.       }
  122.      else if ((monthnumber == 8 && daynumber <=23 )|| (monthnumber == 9 && daynumber <= 22 )){
  123.      System.out.println("You are Virgo");
  124.      System.out.println("Horoscope: You're having a difficult time getting started today. Don't get discouraged if things don't seem to be working. Your expectations may be too high, and your perfectionism is making it difficult for anyone to live up to your standards. Don't get worked up over every little detail. Perfection isn't demanded of you.");
  125.       }
  126.      else if ((monthnumber == 9 && daynumber <=23 )|| (monthnumber == 10 && daynumber <= 22 )){
  127.      System.out.println("You are Libra");
  128.      System.out.println("Horoscope: Be polite and try your best not to impose on other people today. It's important to behave civilly in all circumstances. People may feel like they've been cheated. Although you may not be the source of their discontent, you may feel the consequences. Keep other people's issues separate from yours, and don't let their discomfort seep into your world.");
  129.       }
  130.      else if ((monthnumber == 10 && daynumber <=23 )|| (monthnumber == 11 && daynumber <= 21 )){
  131.      System.out.println("You are Scorpio");
  132.      System.out.println("Horoscope: Don't blame everything on others today. It's important to be adult enough to take responsibility for your actions. Understand that things aren't always going to happen the way you want. Realize that sometimes you have to take the good with the bad. There's a somber mood to the day that might overwhelm your normal attitude. Try to stay focused and disciplined.");
  133.       }
  134.      else if ((monthnumber == 11 && daynumber <=22 )|| (monthnumber == 12 && daynumber <= 21 )){
  135.      System.out.println("You are Saggitarius");
  136.      System.out.println("Horoscope: You might need to adopt a stern attitude today in order to be as effective as you'd like to be. When dealing with others, don't make assumptions for which you don't have solid backing. Other people are easily touched off, so keep things limited to the facts. Try not to stir up heavy emotions.");
  137.       }
  138.      else if ((monthnumber == 12 && daynumber <=22 )|| (monthnumber == 1 && daynumber <= 19 )){
  139.      System.out.println("You are Capricorn");
  140.      System.out.println("Horoscope: You may not feel like your engine is working today. For some reason, it seems like you're using the wrong fuel. Don't be surprised if it's a bit harder to get in touch with your emotional state. Your feelings are playing tricks on you. Do your best not to be thrown off balance by this energy. It gets easier from here.");
  141.       }
  142.      else if ((monthnumber == 1 && daynumber <=20 )|| (monthnumber == 2 && daynumber <= 18 )){
  143.      System.out.println("You are Aquarius");
  144.      System.out.println("Horoscope: You might find your emotions stifled today. You have a great deal to say, but for some reason there's a bit of hesitation when it comes to saying it. Don't be surprised if you feel anxious in such a way that makes it difficult to communicate. Much of today's talk may be filled with fluff and not much substance.");
  145.       }
  146.      else if ((monthnumber == 2 && daynumber <=19 )|| (monthnumber == 3 && daynumber <= 20 )){
  147.      System.out.println("You are Pisces");
  148.      System.out.println("Horoscope: You might not feel especially motivated today. Nonetheless, whether you want to or not, it's important that you attack the mountain of tasks. Understand and respect the constraints of the ticking clock. As long as you're disciplined about accomplishing one small task at a time, you won't have a problem reducing the mountain to a small pile.");
  149.       }
  150.  
  151.  
  152.   }
  153. }
Add Comment
Please, Sign In to add comment