1. Your Life Path Number
2. Your Expression Number
3. Your Motivation Number
4. Your Birthday Number
Here are some screen shots of my program.
If you are interested to download the program please click the link below.
See the usage tutorial video.
If you want the code for the program you can view it below.
import javax.swing.JOptionPane;
import java.io.*;
public class luck{
public static void main(String args[]){
int LP_NUMBER=0;
int EX_NUMBER=0;
int MO_NUMBER=0;
int BD_NUMBER=0;
JOptionPane.showMessageDialog( null,"** fInD yOuR lUcKy NuMbErS **\n\n\tisuruthiwa","Find Your Lucky Numbers",JOptionPane.INFORMATION_MESSAGE);
//input name
String name = JOptionPane.showInputDialog("Enter Your Name");
String birthYear = JOptionPane.showInputDialog("Enter Your Birth Year ");
String birthMonth = JOptionPane.showInputDialog("Enter Your Birth Month\n(eg:if born on December, type 12)\n");
String birthDay = JOptionPane.showInputDialog("Enter Your Birth Day\n(eg:if born on 31st, type 31)\n");
int bYear = Integer.parseInt(birthYear);
int bMonth = Integer.parseInt(birthMonth);
int bDay = Integer.parseInt(birthDay);
if (bMonth<0 || bMonth>12){
JOptionPane.showMessageDialog( null,"You may have entered your birth date incorrectly","Incorrect Birth Date",JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
if (bDay<0 || bDay>31){
JOptionPane.showMessageDialog( null,"You may have entered your birth date incorrectly","Incorrect Birth Date",JOptionPane.ERROR_MESSAGE);
System.exit(0);
}
{
int a = bYear/1000;
int b = (bYear%1000)/100;
int c = ((bYear%1000)%100)/10;
int d = ((bYear%1000)%100)%10;
int e = bMonth/10;
int f = bMonth%10;
int g = bDay/10;
int h = bDay%10;
int i = a+b+c+d+e+f+g+h;
if(i == 11 || i == 22)
LP_NUMBER = i;
else
LP_NUMBER = (i/10)+(i%10);
}
String upperName = name.toUpperCase();
{
int j = 0;
for(int i=0;i<name.length();i++){
String Letter = Character.toString(upperName.charAt(i));
if(Letter.equals("A")||Letter.equals("J")||Letter.equals("S"))
j+=1;
else if(Letter.equals("B")||Letter.equals("K")||Letter.equals("T"))
j+=2;
else if(Letter.equals("C")||Letter.equals("L")||Letter.equals("U"))
j+=3;
else if(Letter.equals("D")||Letter.equals("M")||Letter.equals("V"))
j+=4;
else if(Letter.equals("E")||Letter.equals("N")||Letter.equals("W"))
j+=5;
else if(Letter.equals("F")||Letter.equals("O")||Letter.equals("X"))
j+=6;
else if(Letter.equals("G")||Letter.equals("P")||Letter.equals("Y"))
j+=7;
else if(Letter.equals("H")||Letter.equals("Q")||Letter.equals("Z"))
j+=8;
else if(Letter.equals("I")||Letter.equals("R"))
j+=9;
}
int sum=0;
if(j == 11 || j == 22)
EX_NUMBER=j;
else{
while (j > 0) {
sum = sum + j % 10;
j = j / 10;
EX_NUMBER =sum;
}
}
}
{
int x=0;
for(int i=0;i<name.length();i++){
String Letter = Character.toString(upperName.charAt(i));
if(Letter.equals("A"))
x += 1;
else if(Letter.equals("E"))
x += 5;
else if(Letter.equals("I"))
x += 9;
else if(Letter.equals("O"))
x += 6;
else if(Letter.equals("U"))
x += 3;
}
int sum=0;
if(x!=11 || x!=22){
while (x > 0) {
sum = sum + x % 10;
x = x / 10;
MO_NUMBER =sum;
}
}
else
MO_NUMBER=x;
}
{
int sum=0;
int j = bDay;
while (j > 0) {
sum = sum + j % 10;
j = j / 10;
BD_NUMBER =sum;
}
}
JOptionPane.showMessageDialog( null,"Hi Lucky "+name+" !!!\n\nYour Life Path Number is "+LP_NUMBER+"\nYour Expression Number is "+EX_NUMBER+"\nYour Motivation Number is "+MO_NUMBER+"\nYour Birthday Number is "+BD_NUMBER,"Find Your Lucky Numbers",JOptionPane.PLAIN_MESSAGE);
JOptionPane.showMessageDialog(null,"1: Leadership, individuality, aggression, self-confidence, originality, impatience\n2: Balance, partnership, receptivity, collaboration, diplomacy, patience\n3: Self-expression, innovation, creativity, communication, activity\n4: Stability, dependability, discipline, dedication, over-cautious, stubborn\n5: Progressive, pioneering, innovation, adventure, rebellion, opportunist\n6: Harmony, compassion, service, nurturing, self-righteous, chronic worrier\n7: Intelligence, intuition, spirituality, analytical, solitary, secretive\n8: Ambition, organization, practicality, successful, selfish, materialistic\n9: Generosity, passion, altruistic, resourceful, egotistical, fragile\n11: Visionary, idealistic, teacher, sensitive, a perfectionist, aloof\n22: Master builder, honest, practical, peaceful, extreme, manipulative\n\nEnjoy Your Luck","Understand Basic Number Traits",JOptionPane.INFORMATION_MESSAGE);
}
}
Cheers


No comments:
Post a Comment