Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 18-06-2009, 11:34 AM   #1 (permalink)
Call me D_J!
 
Disc_Junkie's Avatar
 
Join Date: Nov 2008
Location: INDIA
Posts: 866
Arrow Program that will let you know your Sun Sign!


Code:
/**
 * People can know their sun sign and lucky number, colour etc from this program..
 *
 * Disc_Junkie
 * 1.0
 */
import java.io.*;
public class Astro
{
    public static void display()throws IOException
    {
     
        InputStreamReader ireader = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(ireader);
        System.out.println("WELCOME TO THE ASTROLOGY SUN SIGN DEPARTMENT");
        System.out.println("--------------------------------------------");
        System.out.println("Please enter your name: ");
        String Name = br.readLine();
        
        System.out.println("Please enter your date of birth: ");
        String date = br.readLine();
        int date1 = Integer.parseInt(date);
        System.out.println("Please enter your month of birth: ");
        String month = br.readLine();
        int month1 = Integer.parseInt(month);
        if(month1>=3 && date1>=21 || month1<=4 && date1<=19)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Aries(Mesha)");
      
            System.out.println(" Lucky Day: Tuesday ");
            System.out.println(" Lucky Number: 9,18,27");
            System.out.println(" Lucky Colour: Red");
            System.out.println(" Lucky Stone: Ruby, Diamond");
          
        }
        else if(month1>=4 && date1>=20 || month1<=5 && date1<=20)
        {
             System.out.println(" Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Taurus(Brish)");
             System.out.println(" Lucky Day: Friday, Monday ");
             System.out.println(" Lucky Number: 6,15,4");
             System.out.println(" Lucky Colour: Blue");
             System.out.println(" Lucky Stone: Turquoise");
          


 }
        else if(month1>=5 && date1>=21 || month1<=6 && date1<=21)
        {
             System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Gemini(Mithun)");
             System.out.println(" Lucky Day: Wednesday ");
             System.out.println(" Lucky Number: 5,14,23");
             System.out.println(" Lucky Colour: Orange, Yellow");
             System.out.println(" Lucky Stone: Topaz, Emerald");
            
}
        else if(month1>=6 && date1>=22 || month1<=7 && date1<=22)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Cancer(Karkat)");
           System.out.println(" Lucky Day: Monday, Thursday ");
             System.out.println(" Lucky Number: 2,7,11");
             System.out.println(" Lucky Colour: Orange, White");
             System.out.println(" Lucky Stone: Pearl, Moon Stone");
            
           }
        else if(month1>=7 && date1>=23 || month1<=8 && date1<=22)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Leo(Singha)");
            System.out.println(" Lucky Day: Sunday ");
            System.out.println(" Lucky Number: 1, 4, 10");
            System.out.println(" Lucky Colour: Gold, Orange");
            System.out.println(" Lucky Stone: Diamond, Amber");

 }
        else if(month1>=8 && date1>=23 || month1<=9 && date1<=22)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Virgo(Kanya)");
            System.out.println(" Lucky Day: Wednesday ");
            System.out.println(" Lucky Number: 5, 14, 23");
            System.out.println(" Lucky Colour: Orange, White");
            System.out.println(" Lucky Stone: Topaz");


}
        else if(month1>=9 && date1>=23 || month1<=10 && date1<=22)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Libra(Tula)");
            System.out.println(" Lucky Day: Friday ");
             System.out.println(" Lucky Number: 6, 15, 24");
             System.out.println(" Lucky Colour: Blue, Green");
             System.out.println(" Lucky Stone: Sapphire");
       }
        else if(month1>=10 && date1>=23 || month1<=11 && date1<=21)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Scorpio(Brishchik)");
             System.out.println(" Lucky Day: Tuesday ");
              System.out.println(" Lucky Number: 9, 18, 27");
              System.out.println(" Lucky Colour: Scarlet, Red");
              System.out.println(" Lucky Stone: Bloodstone");
       }
        else if(month1>=11 && date1>=22 || month1<=12 && date1<=21)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Sagittarius(Dhanu)");
              System.out.println(" Lucky Day: Thursday ");
               System.out.println(" Lucky Number: 3, 12, 21");
               System.out.println(" Lucky Colour: Violet, Purple");
               System.out.println(" Lucky Stone: Amethyst and Topaz");



}
         else if(month1>=12 && date1>=22 || month1<=1 && date1<=19)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Capricorn(Makar)");
             System.out.println(" Lucky Day: Saturday");
                System.out.println(" Lucky Number: 1, 4, 8");
                System.out.println(" Lucky Colour: Brown, Steel");
                System.out.println(" Lucky Stone: Dark Sapphire");

}
         else if(month1>=1 && date1>=20 || month1<=2 && date1<=18)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Aqaurius(Kumbha)");
              System.out.println(" Lucky Day: Sunday and Saturday");
                 System.out.println(" Lucky Number: 4, 8, 13");
                 System.out.println(" Lucky Colour: Blue, Green");
                 System.out.println(" Lucky Stone: Opal and Aquamarine");
}
         else if(month1>=2 && date1>=19 || month1<=3 && date1<=20)
        {
            System.out.println("Therefore Mr. "+Name+" ,your Zodiac Sun Sign is Pisces(Meen)");
            System.out.println(" Lucky Day: Thursday and Monday");
                  System.out.println(" Lucky Number: 3, 7, 12");
                  System.out.println(" Lucky Colour: Purple, Violet");
                  System.out.println(" Lucky Stone: Emerald, Pearls");
        }
          {
            
            
            System.out.println("Thankyou for visitng! Please visit ganeshaspeaks.com for more");
 }
}
}
I have coded it using BlueJ Java IDE. I was thinking of writing it from a long time. Please review it and tell if it's useful and if I could have have improvised it. Thanks!
__________________
ASUS K42JA-VX032D RAWKS !!!!!!:grin:

Last edited by Disc_Junkie; 18-06-2009 at 04:37 PM.
Disc_Junkie is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 18-06-2009, 11:50 AM   #2 (permalink)
Alpha Geek
 
Join Date: Jun 2009
Posts: 841
Default Re: Program that will let you know your Sun Sign!

Great Software but i dont think that Year of Birth is needed
Aspire is offline  
Old 18-06-2009, 01:15 PM   #3 (permalink)
naughty boy :) :)
 
mahesh's Avatar
 
Join Date: Mar 2008
Posts: 187
Default Re: Program that will let you know your Sun Sign!

no need to ask the year of birth. There is nothing to do with that year.
__________________
Phenom II 550 BE | GA-MA78GM-US2H | 160 gb + 500 gb hdd | 2 X 2 gb XMS2 | HD 4850 1 GB | 2033 SW | Tagan TG600-U37 | CM 690
mahesh is offline  
Old 18-06-2009, 01:57 PM   #4 (permalink)
Call me D_J!
 
Disc_Junkie's Avatar
 
Join Date: Nov 2008
Location: INDIA
Posts: 866
Default Re: Program that will let you know your Sun Sign!

Quote:
Originally Posted by Aspire View Post
Great Software but i dont think that Year of Birth is needed
Quote:
Originally Posted by maheshr View Post
no need to ask the year of birth. There is nothing to do with that year.
Ok Removed! :-P
__________________
ASUS K42JA-VX032D RAWKS !!!!!!:grin:
Disc_Junkie is offline  
Old 18-06-2009, 02:36 PM   #5 (permalink)
Alpha Geek
 
Join Date: Jun 2009
Posts: 841
Default Re: Program that will let you know your Sun Sign!

No need for Name as well coz the Script doesnt print out Name.
It uses "You".

You could either remove name or add the line
"Mr. X's Zodiac Sun Sign is ------"
Aspire is offline  
Old 18-06-2009, 03:58 PM   #6 (permalink)
Call me D_J!
 
Disc_Junkie's Avatar
 
Join Date: Nov 2008
Location: INDIA
Posts: 866
Default Re: Program that will let you know your Sun Sign!

Quote:
Originally Posted by Aspire View Post
No need for Name as well coz the Script doesnt print out Name.
It uses "You".

You could either remove name or add the line
"Mr. X's Zodiac Sun Sign is ------"
Yes Good Idea!

EDIT: Done!
__________________
ASUS K42JA-VX032D RAWKS !!!!!!:grin:

Last edited by Disc_Junkie; 18-06-2009 at 04:39 PM.
Disc_Junkie is offline  
Old 18-06-2009, 04:26 PM   #7 (permalink)
Democracy is a myth
 
rhitwick's Avatar
 
Join Date: Apr 2004
Location: Kaikhali,Kolkata
Posts: 2,159
Default Re: Program that will let you know your Sun Sign!

Hmmm
__________________
"My opinions may have changed, but not the fact that I am right."

"I'm never wrong. Once I thought I was wrong, but I was wrong"
rhitwick is online now  
Old 18-06-2009, 05:18 PM   #8 (permalink)
Alpha Geek
 
Join Date: Jun 2009
Posts: 841
Default Re: Program that will let you know your Sun Sign!

Now, why don't you compile it and attach an executable for all those people who don't know their sunsigns?
Aspire is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Sujeet
- by gforz
- by soumya

Advertisement




All times are GMT +5.5. The time now is 03:13 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2