/* Sarabhai versus Sarabhai was a sitcom that ran on Indian Television 10 years back. It is one of my favourite sitcoms and I created THIS GAME just for fun ;) */
import java.util.*; // Taking input using Scanner Class
class WhichSarabhaiCharacterareyou
{
int sahil = 0 , monisha = 0 , dush = 0 , indu = 0 , maya = 0 , rohsesh = 0,i = 0 ;
public void SarabhaiVSSarabhai()
{
Scanner in = new Scanner(System.in);
System.out.println("Welcome to Quiz Which Sarabhai Character are you");
System.out.println("Answer all the 10 Questions by only Entering a SINGLE 'small' alphabet");
System.out.println("Q1. What Profession do you want to indulge into ? ");
System.out.println("a: Engineering b: Fashion Designing c: Can't Work - Want to enjoy life d: Industrialist");
char q1 = in.next().charAt(0);
{
if(q1=='a')
{
sahil++ ;
dush++;
}
else if(q1=='b')
{
maya++;
rohsesh++;
}
else if(q1=='c')
{
;
monisha++;
rohsesh++;
}
else
{
indu++;
maya++;
}
}
System.out.println("Q2. What do you do in your free time?");
System.out.println("a: Visit a friend's home or call him/her to your home b: Show your Artistic skills like painting , etc c : Conspire d: Clean your home and rearrange objecs of your house");
char q2 = in.next().charAt(0);
if(q2=='a')
maya++ ;
else if(q2=='b')
{
dush++ ;
monisha++;
rohsesh++;
}
else if(q2=='d')
{
;
monisha++;
sahil++;
}
else
{
indu++;
maya++;
}
System.out.println("Q3. What would you do if someone admonishes your close friend ?");
System.out.println("a: Endure it patiently and try to change the topic b: Slap that person c: Take that seriously and test whether he/she is right or not d: Laugh and make fun of every person");
char q3 = in.next().charAt(0);
if(q3=='a')
{
sahil++ ;
maya++;
}
else if(q3=='b')
{
monisha++;
;
}
else if(q3=='c')
{
;
monisha++;
rohsesh++;
}
else
{
indu++;
;
}
System.out.println("Q4. Whom are you most close to ?");
System.out.println("a: Mom b: Dad c: Spouse d: Sibling");
char q4 = in.next().charAt(0);
if(q4=='a')
{
sahil++ ;
rohsesh++ ;
indu++;
;
}
else if(q4=='b')
{
monisha++ ;
sahil++ ;
}
else if(q4=='c')
{
dush++;
monisha++;
sahil++;
}
else
{
rohsesh++;
;
}
System.out.println("Q5. What will be the first thing that comes in your mind when you see your spouse with any one else ?");
System.out.println("a: Who is the other person? b: How dare heORshe be with any one else c: The other person might be a GOOD friend of your spouse d: Lets pull the legs of the person ");
char q5 = in.next().charAt(0);
if(q5=='a')
{
sahil++ ;
monisha++;
dush++;
;
}
else if(q5=='b')
{
monisha++ ;
;
}
else if(q5=='c')
{
dush++;
maya++;
sahil++;
rohsesh++;
}
else
{
indu++;
}
System.out.println("Q6. Who is your sworn Enemy ");
System.out.println("a: Mom b: Dad c: Spouse d: SonORSon-in-Law");
char q6 = in.next().charAt(0);
if(q6=='a')
{
monisha++;
dush++;
}
else if(q6=='b')
{
sahil++ ;
rohsesh++;
;
dush++ ;
}
else if(q6=='c')
{
dush++;
indu++;
maya++;
sahil++;
rohsesh++;
}
else
{
indu++;
}
{
while(i!=1)//If the points of any heroes are equal , then we deal with it in this block
{
{
if(dush==sahil)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to an INTERESTING person ; I hope that I am not wrong . You are the most INTELLIGENT person in the family ; you are SAHIL ");
}
else if(dush==maya)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be HIGH CLASS and SELF LOVING but sometimes you also can be SNOBBISH , you are MAYA");
}
else if(dush==indu)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a CONSPIRING and FUN LOVING person , People can also LOVE you or HATE you because of your SENSE OF HUMOUR , you are INDRAVADAN" );
}
else if(dush==rohsesh)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a very COMPLICATED person , very fond of your ARTISTIC talents writing Poems everytime , you are ROHSESH SARABHAI");
}
else if(dush==monisha)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a MIDDLE CLASS person , very fond of SIMPLE THINGS and ready to leave your In-Law's home anytime , You are MONISHA (OLD MANISHA)");
}
System.out.println("You seem to a GIZMO-FREAK ;you are very dedicated to your work even more than your life and family . you are DUSHYANT ");
if(true)
break;
}
if(sahil>=dush&&sahil>=indu&&sahil>=maya&&sahil>=rohsesh&&sahil>=monisha)
{
if(sahil==dush){
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to a GIZMO-FREAK ;you are very dedicated to your work even more than your life and family . you are DUSHYANT ");
}
else if(sahil==maya)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be HIGH CLASS and SELF LOVING but sometimes you also can be SNOBBISH , you are MAYA");
}
else if(sahil==rohsesh)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a very COMPLICATED person , very fond of your ARTISTIC talents writing Poems everytime , you are ROHSESH SARABHAI");
}
else if(sahil==indu)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a CONSPIRING and FUN LOVING person , People can also LOVE you or HATE you because of your SENSE OF HUMOUR , you are INDRAVADAN" );
}
else if(sahil==monisha)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a MIDDLE CLASS person , very fond of SIMPLE THINGS and ready to leave your In-Law's home anytime , You are MONISHA (OLD MANISHA)");
}
System.out.println("You seem to an INTERESTING person ; I hope that I am not wrong . You are the most INTELLIGENT person in the family ; you are SAHIL ");
break;
}
if(indu>=sahil&&indu>=dush&&indu>=maya&&indu>=rohsesh&&indu>=monisha)
{
if(indu==dush)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to a GIZMO-FREAK ;you are very dedicated to your work even more than your life and family . you are DUSHYANT ");
}
else if(indu==rohsesh)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a very COMPLICATED person , very fond of your ARTISTIC talents writing Poems everytime , you are ROHSESH SARABHAI");
}
else if(indu==maya)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be HIGH CLASS and SELF LOVING but sometimes you also can be SNOBBISH , you are MAYA");
}
else if(indu==sahil)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to an INTERESTING person ; I hope that I am not wrong . You are the most INTELLIGENT person in the family ; you are SAHIL ");
}
else if(indu==monisha)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a MIDDLE CLASS person , very fond of SIMPLE THINGS and ready to leave your In-Law's home anytime , You are MONISHA (OLD MANISHA)");
}
System.out.println("You seem to be a CONSPIRING and FUN LOVING person , People can also LOVE you or HATE you because of your SENSE OF HUMOUR , you are INDRAVADAN" );
break;
}
if(maya>=dush&&maya>=rohsesh&&maya>=indu&&maya>=indu&&maya>=monisha)
{
if(maya==dush)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to a GIZMO-FREAK ;you are very dedicated to your work even more than your life and family . you are DUSHYANT ");
}
else if(maya==rohsesh)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a very COMPLICATED person , very fond of your ARTISTIC talents writing Poems everytime , you are ROHSESH SARABHAI");
}
else if(maya==indu)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a CONSPIRING and FUN LOVING person , People can also LOVE you or HATE you because of your SENSE OF HUMOUR , you are INDRAVADAN" );
}
else if(maya==sahil)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to an INTERESTING person ; I hope that I am not wrong . You are the most INTELLIGENT person in the family ; you are SAHIL ");
}
else if(maya==monisha)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a MIDDLE CLASS person , very fond of SIMPLE THINGS and ready to leave your In-Law's home anytime , You are MONISHA (OLD MANISHA)");
}
System.out.println("You seem to be HIGH CLASS and SELF LOVING but sometimes you also can be SNOBBISH , you are MAYA");
break;
}
if(monisha>=sahil&&monisha>=dush&&monisha>=maya&&monisha>=rohsesh&&monisha>=indu)
{
if(monisha==dush)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to a GIZMO-FREAK ;you are very dedicated to your work even more than your life and family . you are DUSHYANT ");
}
else if(monisha==rohsesh)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a very COMPLICATED person , very fond of your ARTISTIC talents writing Poems everytime , you are ROHSESH SARABHAI");
}
else if(monisha==maya)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be HIGH CLASS and SELF LOVING but sometimes you also can be SNOBBISH , you are MAYA");
}
else if(monisha==sahil)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to an INTERESTING person ; I hope that I am not wrong . You are the most INTELLIGENT person in the family ; you are SAHIL ");
}
else if(monisha==indu)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a CONSPIRING and FUN LOVING person , People can also LOVE you or HATE you because of your SENSE OF HUMOUR , you are INDRAVADAN" );
}
System.out.println("You seem to be a MIDDLE CLASS person , very fond of SIMPLE THINGS and ready to leave your In-Law's home anytime , You are MONISHA (OLD MANISHA)");
break;
}
if(rohsesh>=sahil&&rohsesh>=dush&&rohsesh>=maya&&rohsesh>=monisha&&rohsesh>=indu)
{
if(rohsesh==dush)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to a GIZMO-FREAK ;you are very dedicated to your work even more than your life and family . you are DUSHYANT ");
}
else if(rohsesh==monisha)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a MIDDLE CLASS person , very fond of SIMPLE THINGS and ready to leave your In-Law's home anytime , You are MONISHA (OLD MANISHA)");
}
else if(rohsesh==maya)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be HIGH CLASS and SELF LOVING but sometimes you also can be SNOBBISH , you are MAYA");
}
else if(rohsesh==sahil)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to an INTERESTING person ; I hope that I am not wrong . You are the most INTELLIGENT person in the family ; you are SAHIL ");
}
else if(rohsesh==indu)
{
System.out.println("Congratulations, You Actually match the traits of two superheroes");
System.out.println("You seem to be a CONSPIRING and FUN LOVING person , People can also LOVE you or HATE you because of your SENSE OF HUMOUR , you are INDRAVADAN" );
}
System.out.println("You seem to be a very COMPLICATED person , very fond of your ARTISTIC talents writing Poems everytime , you are ROHSESH SARABHAI");
break;
}
}
}
//This Block in Particular is far more effective than the following Block, which is actually the easy way!
/* if(dush>sahil&&dush>indu&&dush>maya&&dush>rohsesh&&dush>monisha)
System.out.println("You seem to a GIZMO-FREAK ;you are very dedicated to your work even more than your life and family . you are DUSHYANT ");
else if(sahil>dush&&sahil>indu&&sahil>maya&&sahil>rohsesh&&sahil>monisha)
System.out.println("You seem to an INTERESTING person ; I hope that I am not wrong . You are the most INTELLIGENT person in the family ; you are SAHIL ");
else if(indu>dush&&indu>sahil&&indu>maya&&indu>rohsesh&&indu>monisha)
System.out.println("You seem to be a CONSPIRING and FUN LOVING person , People can also LOVE you or HATE you because of your SENSE OF HUMOUR , you are INDRAVADAN" );
else if(maya>dush&&maya>sahil&&maya>indu&&maya>rohsesh&&maya>monisha)
System.out.println("You seem to be HIGH CLASS and SELF LOVING but sometimes you also can be SNOBBISH , you are MAYA");
else if(rohsesh>dush&&rohsesh>sahil&&rohsesh>maya&&rohsesh>indu&&rohsesh>monisha)
System.out.println("You seem to be a very COMPLICATED person , very fond of your ARTISTIC talents writing Poems everytime , you are ROHSESH SARABHAI");
else if(monisha>dush&&monisha>sahil&&monisha>maya&&monisha>indu&&monisha>rohsesh)
System.out.println("You seem to be a MIDDLE CLASS person , very fond of SIMPLE THINGS and ready to leave your In-Law's home anytime , You are MONISHA (OLD MANISHA)");
*/
}
}