KBC (Kaun Banega Crorepati) Program in Java

Program to make a class KBC, which awards different prize amounts if the answers is correct. There should be four options for each and every question. If any of the question is wrong, terminate the program and print loose. import java.util.Scanner;class KBC{   public static void main(String args[])   {       Scanner in = new Scanner(System.in);       boolean exit = false;       int quesNo = 1;       int winAmt = 0;       do       {           char option;           switch(quesNo)           {               case 1:                   System.out.println(“Question 1: With reference to a wedding, What does ‘Laal Joda’ means ?”);                   System.out.println(“A. Pair of bangles B. Set of Clothes”);                   System.out.println(“C. Newly Married couple D. Milani of Samdhis”);                   System.out.println(“\nPlease Enter an Option.”);                   option = in.nextLine().charAt(0);                                      if(option == ‘B’ || option ==’b’)                         {                       winAmt = 10000;                       System.out.println(“You won Rs. ” + winAmt);                       System.out.println(“Your next question is..\n”);                       quesNo++;                   }                   else                   {                       System.out.println(“You Lose.”);                       exit = true;                   }               break;                              case 2:                   System.out.println(“Question 2: What is the common name for surgery conducted on coronary arteries that supply blood to the heart ?”);                   System.out.println(“A. Cataract B. Gastric”);                   System.out.println(“C. Bypass D. Debridement”);                   System.out.println(“\nPlease Enter an Option.”);                   option = in.nextLine().charAt(0);                                      if(option == ‘C’ || option ==’c’)                   {                       winAmt = 320000;                       System.out.println(“You won Rs. ” + winAmt);                       System.out.println(“Your next question is..\n”);                       quesNo++;                   }                   else                   {                       System.out.println(“You Lose.”);                       exit = true;                   }               break;                              case 3:                   System.out.println(“Question 3: In July 2017, Narendra Modi Become the first Indian Prime Minister to visit which country ?”);                   System.out.println(“A. Israel B. Jordan”);                   System.out.println(“C. Saudi Arabia D. Qatar”);                   System.out.println(“\nPlease Enter an Option.”);                   option = in.nextLine().charAt(0);                                      if(option == ‘A’ || option ==’a’)                   {                       winAmt = 640000;                       System.out.println(“You won Rs. ” + winAmt);                       System.out.println(“Your next question is..\n”);                       quesNo++;                   }                   else                   {                       System.out.println(“You Lose.”);                       exit = true;                   }               break;                              case 4:                   System.out.println(“Question 4: Which Indian state announced a second capital in 2017 ?”);                   System.out.println(“A. Uttarakhand B. Karnataka”);                   System.out.println(“C. Maharashtra D. Himachal Pradesh”);                   System.out.println(“\nPlease Enter an Option.”);                   option = in.nextLine().charAt(0);                                      if(option == ‘D’ || option ==’d’)                   {                       winAmt = 1250000;                       System.out.println(“You won Rs. ” + winAmt);                       System.out.println(“Your next question is..\n”);                       quesNo++;                   }                   else                   {                       System.out.println(“You Lose.”);                       exit = true;                   }               break;                              case 5:                   System.out.println(“Question 5: More than 90 percent of the giant panda’s diet consists of which plant ?”);                   System.out.println(“A. Eucalyptus B. banana”);                   System.out.println(“C. Bamboo D. Date Palm”);                   System.out.println(“\nPlease Enter an Option.”);                   option = in.nextLine().charAt(0);                                      if(option == ‘C’ || option ==’c’)                   {                       winAmt = 10000000;                       System.out.println(“\nCongratulations! You won the Game.”);                       System.out.println(“You won Rs. ” + winAmt);                       quesNo++;                       exit = true;                   }                   else                   {                       System.out.println(“You Lose.”);                       exit = true;                   }               break;            }                           }while(exit!=true);   }}