0
import java.io.*;
class projj {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18;
int c19,c20,c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,c31,c32,c33,c34,c35,c36,c37,c38,c39,c40,c41;
String name,n;
public void game()throws IOException
{
System.out.println("YOU ENTERED 1.PS4 THE CHOICES ARE");
System.out.println("1.SPORTS");
System.out.println("2.RACING");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch=Integer.parseInt(br.readLine());
switch(ch)
{
case 1: System.out.println("\f");
System.out.println("1.CRICKET");
System.out.println("2.FOOTBALL");
System.out.println("PLEASE ENTER YOUR CHOICE ");
int ch1=Integer.parseInt(br.readLine());
switch(ch1)
{
case 1: System.out.println("CRICKET");
System.out.println("1.DON BRADMAN CRICKET..........Rs 400/hr");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch2=Integer.parseInt(br.readLine());
switch(ch2)
{
case 1: System.out.println("YOU CHOSE FOR DON BRADMAN CRICKET");
System.out.println("PLEASE ENTER TIME");
int time1=Integer.parseInt(br.readLine());
c1=400*time1;
System.out.println("THE COST OF YOUR GAME IS : "+c1);
break;
default : System.out.println("WRONG CHOICE");
}
break;
case 2: System.out.println("FOOTBALL");
System.out.println("1.PES 2016..........Rs 400/hr");
System.out.println("2.FIFA 16..........Rs 400/hr");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch3=Integer.parseInt(br.readLine());
switch(ch3){
case 1: System.out.println("YOU CHOSE FOR PES 2016");
System.out.println("PLEASE ENTER TIME");
int time2=Integer.parseInt(br.readLine());
c2=400*time2;
System.out.println("THE COST OF YOUR GAME IS : "+c2);
break;
case  2: System.out.println("YOU CHOSE FOR FIFA 16");
System.out.println("PLEASE ENTER TIME");
int time3=Integer.parseInt(br.readLine());
c3=400*time3;
System.out.println("THE COST OF YOUR GAME IS : "+c3);
break;
default : System.out.println("WRONG CHOICE");
}
break;
default : System.out.println("WRONG CHOICE");
}

break;
case 2: System.out.println("\f");
System.out.println("1.CAR");
System.out.println("2.BIKE");
System.out.println("PLEASE ENTER YOUR CHOICE ");
int ch4=Integer.parseInt(br.readLine());
switch(ch4)
{
case 1: System.out.println("CAR");
System.out.println("1.DIRT RALLY..........Rs 400/hr");
System.out.println(".PROJECT CARS..........Rs 400/hr");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch5=Integer.parseInt(br.readLine());
switch(ch5)
{
case 1: System.out.println("YOU CHOSE FOR DIRT RALLY");
System.out.println("PLEASE ENTER TIME");
int time4=Integer.parseInt(br.readLine());
c4=400*time4;
System.out.println("THE COST OF YOUR GAME IS : "+c4);
break;
case 2: System.out.println("YOU CHOSE FOR PROJECT CARS");
System.out.println("PLEASE ENTER TIME");
int time5=Integer.parseInt(br.readLine());
c5=400*time5;
System.out.println("THE COST OF YOUR GAME IS : "+c5);
break;
default : System.out.println("WRONG CHOICE");
}
break;
case 2: System.out.println("BIKE");
System.out.println("1.TRIALS FUSION..........Rs 400/hr");
System.out.println("2.MOTORCYCLE CLUB..........Rs 400/hr");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch6=Integer.parseInt(br.readLine());
switch(ch6){
case 1: System.out.println("YOU CHOSE FOR TRIALS FUSION");
System.out.println("PLEASE ENTER TIME");
int time6=Integer.parseInt(br.readLine());
c6=400*time6;
System.out.println("THE COST OF YOUR GAME IS : "+c6);
break;
case 2: System.out.println("YOU CHOSE FOR MOTORCYCLE CLUB");
System.out.println("PLEASE ENTER TIME");
int time7=Integer.parseInt(br.readLine());
c7=400*time7;
System.out.println("THE COST OF YOUR GAME IS : "+c7);
break;
default : System.out.println("WRONG CHOICE");
}
break;
default : System.out.println("WRONG CHOICE");
}
}
}
public void game1()throws IOException
{
System.out.println("YOU ENTERED 2.PS3 THE CHOICES ARE");
System.out.println("1.FIRST-PERSON SHOOTER");
System.out.println("2.THIRD-PERSON SHOOTER");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch=Integer.parseInt(br.readLine());
switch(ch)
{
case 1: System.out.println("\f");
System.out.println("1.CALL OF DUTY");
System.out.println("2.BORDERLANDS");
System.out.println("PLEASE ENTER YOUR CHOICE ");
int ch7=Integer.parseInt(br.readLine());
switch(ch7)
{
case 1: System.out.println("CALL OF DUTY");
System.out.println("1.CALL OF DUTY:BLACK OPS III..........Rs 350/hr");
System.out.println("1.CALL OF DUTY:BLACK OPS II..........Rs 350/hr");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch8=Integer.parseInt(br.readLine());
switch(ch8)
{
case 1: System.out.println("YOU CHOSE FOR CALL OF DUTY:BLACK OPS III");
System.out.println("PLEASE ENTER TIME");
int time8=Integer.parseInt(br.readLine());
c8=350*time8;
System.out.println("THE COST OF YOUR GAME IS : "+c8);
break;
case 2: System.out.println("YOU CHOSE FOR CALL OF DUTY:BLACK OPS II");
System.out.println("PLEASE ENTER TIME");
int time9=Integer.parseInt(br.readLine());
c9=350*time9;
System.out.println("THE COST OF YOUR GAME IS : "+c9);
break;
default : System.out.println("WRONG CHOICE");
}
break;
case 2: System.out.println("BORDERLANDS");
System.out.println("1.BORDERLANDS 2..........Rs 350/hr");
System.out.println("2.BORDERLANDS:THE PRE-SEQUEL..........Rs 350/hr");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch9=Integer.parseInt(br.readLine());
switch(ch9){
case 1: System.out.println("YOU CHOSE FOR BORDERLANDS 2");
System.out.println("PLEASE ENTER TIME");
int time10=Integer.parseInt(br.readLine());
c10=350*time10;
System.out.println("THE COST OF YOUR GAME IS : "+c10);
break;
case  2: System.out.println("YOU CHOSE FOR BORDERLANDS:THE PRE-SEQUEL");
System.out.println("PLEASE ENTER TIME");
int time11=Integer.parseInt(br.readLine());
c11=350*time11;
System.out.println("THE COST OF YOUR GAME IS : "+c11);
break;
default : System.out.println("WRONG CHOICE");
}
break;
default : System.out.println("WRONG CHOICE");
}

break;
case 2: System.out.println("\f");
System.out.println("1.GRAND THEFT AUTO");
System.out.println("2.FAR CRY");
System.out.println("PLEASE ENTER YOUR CHOICE ");
int ch10=Integer.parseInt(br.readLine());
switch(ch10)
{
case 1: System.out.println("GRAND THEFT AUTO");
System.out.println("1.GRAND THEFT AUTO V..........Rs 350/hr");
System.out.println("2.GRAND THEFT AUTO IV..........Rs 350/hr");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch11=Integer.parseInt(br.readLine());
switch(ch11)
{
case 1: System.out.println("YOU CHOSE FOR GRAND THEFT AUTO V");
System.out.println("PLEASE ENTER TIME");
int time12=Integer.parseInt(br.readLine());
c12=350*time12;
System.out.println("THE COST OF YOUR GAME IS : "+c12);
break;
case 2: System.out.println("YOU CHOSE FOR GRAND THEFT AUTO IV");
System.out.println("PLEASE ENTER TIME");
int time13=Integer.parseInt(br.readLine());
c13=350*time13;
System.out.println("THE COST OF YOUR GAME IS : "+c13);
break;
default : System.out.println("WRONG CHOICE");
}
break;
case 2: System.out.println("FAR CRY");
System.out.println("1.FAR CRY 4..........Rs 350/hr");
System.out.println("2.FAR CRY 3..........Rs 350/hr");
System.out.println("PLEASE ENTER YOUR CHOICE");
int ch12=Integer.parseInt(br.readLine());
switch(ch12){
case 1: System.out.println("YOU CHOSE FOR FAR CRY 4");
System.out.println("PLEASE ENTER TIME");
int time14=Integer.parseInt(br.readLine());
c14=350*time14;
System.out.println("THE COST OF YOUR GAME IS : "+c14);
break;
case 2: System.out.println("YOU CHOSE FOR FAR CRY 3");
System.out.println("PLEASE ENTER TIME");
int time15=Integer.parseInt(br.readLine());
c15=350*time15;
System.out.println("THE COST OF YOUR GAME IS : "+c15);
break;
default : System.out.println("WRONG CHOICE");
}
break;
default : System.out.println("WRONG CHOICE");
}
}
}
public void bill()throws IOException
{
    System.out.print("NAME:"+" "+n);
    int
    totalbill=c1+c2+c3+c4+c5+c6+c7+c8+c9+c10+c11+c12+c13+c14+c15+c16+c17+c18+c19+c20+c21+c22+c23+c24+c25+c26+c27+c28+c29+c30+c31+c32+c33+c34+c35+c36+c37+c38+c39+c40;
    System.out.println(" DO YOU WANT TO PAY BY");
    System.out.println("1. CREDIT CARD");
    System.out.println("2. CASH");
    System.out.println("PLEASE ENTER YOUR CHOICE");
    int ch=Integer.parseInt(br.readLine());
    switch(ch)
    {
        case 1:
        System.out.println("PLEASE ENTER YOU CARD NUMBER");
        long cn=Integer.parseInt(br.readLine());
        System.out.println("YOUR TOTAL BILL:"+totalbill);
        break;
        case 2:
        System.out.println("YOUR TOTAL BILL:"+totalbill);
        break;  
        default:     
        System.out.println("WRONG CHOICE");
    }
}
public static void main(String args[])throws IOException
{
    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    projj ob=new projj();int ans;System.out.println("ENTER YOUR NAME");
    ob.name=br.readLine();ob.n=ob.name.toUpperCase ();
    do
    {
        System.out.println("WELCOME TO GAMEZONE");
        System.out.println("1.PS4");
        System.out.println("2.PS3");
        System.out.println("3.NINTENDO WII");
        System.out.println("4.XBOX ONE");
        System.out.println("5.XBOX 360");
        System.out.println("PLEASE ENTER YOUR CHOICE");
        int ch=Integer.parseInt(br.readLine());
        switch(ch){
        case 1:ob.game();
        break;
        default:     
        System.out.println("WRONG CHOICE");
    }
    System.out.println("PRESS 0 TO GO TO THE MENU OR PRESS 9 TO GO TO BILL");
    ans=Integer.parseInt(br.readLine());
    }
    while(ans==0);
    ob.bill();

    }
}
3
Contributors
2
Replies
17
Views
1 Year
Discussion Span
Last Post by Keshav_1
0
  1. Please indent your code.
  2. It is not polite to ask people to analyze almost 300 lines of code in a forum like this.
  3. Isolate your problematic code and tell us what is going on.
0

But I can't do that.. I am not aware that where my problem lies in the program.....if you know about Java or bluej then can u Plz copy the program in it and answer me the solution...
I request you...
Thank you...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.