Register Reciept Program

I'm having problems with writing a Register Reciept Program, the problem is with the BufferReader, giving erronious information to the screen, especially with the variable Food_price1. I going to attach the text part of the code to this thread if someone could tell me where I'm going wrong I would appreciate it.

/*

* Main.java

*

* Created on May 11, 2007, 12:12 AM

*

* To change this template, choose Tools | Template Manager

* and open the template in the editor.

*/

package reciept;

/**

*

* @author Frank Brenneman

*/

import java.io.*;

public class Main {

/** Creates a new instance of Main */

public Main() {

}

/**

* @param args the command line arguments

*/

public static void main(String[] args) {

try

{

String Food1 = "";

String Food2 = "";

String Food3 = "";

int Food_quantity1 = 0;

int Food_quantity2 = 0;

int Food_quantity3 = 0;

int Food_price1 = 0;

int Food_price2 = 0;

int Food_price3 = 0;

int Sum = 0;

int Tax = 0;

System.out.println("Welcome to Frank's RoadKill Cafe:");

System.out.println("Enter the type of food you would like to order:");

System.out.println("For French Fries enter F,For Cheeseburger enter C,For Soda enter S:");

BufferedReader console = new BufferedReader(

new InputStreamReader(System.in));

Food1 = console.readLine();

System.out.println("Enter quantity:");

Food_quantity1 = console.read();

System.out.println("Enter Price:");

Food_price1 = console.read();

System.out.println("Enter type of food, for french fries F,for cheeseburger C,for soda S:");

Food2 = console.readLine();

System.out.println("Enter quantity:");

Food_quantity2 = console.read();

System.out.println("Enter Price:");

Food_price2 = console.read();

System.out.println("Enter type of food, for french fries F,for cheeseburger C,for soda C:");

Food3 = console.readLine();

System.out.println("Enter quantity:");

Food_quantity3 = console.read();

System.out.println("Enter Price:");

Food_price3 = console.read();

}

catch (IOException ioex)

{

System.out.println("Input error");

System.exit(1);

}

}

}

[2431 byte] By [fbrennemana] at [2007-11-27 4:06:43]
# 1

Here is some things you should be doing - Start with these then we can see about your problem.

1) when posting on here highlight your code and click the code button - it makes things more readable and people will be more inclined to help you

2) your variable names should start with a lower case letter.

3) describe in details your problem including what you expect to happen and what is happening - including any stack traces from errors that occur.

*Edit* cut needless info out.

Aknibbsa at 2007-7-12 9:11:51 > top of Java-index,Java Essentials,Java Programming...