answersLogoWhite

0


Best Answer

import java.io.*;

class Bill

{

String item[]={"A","B","C","D","E","F","G","H","I","J"};

double rate[]={1,2,3,4,5,6,7,8,9,10};

String order[]=new String[10];

double amt[]=new double[10];

String ans;

int quantity[]=new int[10];

int i,n=0,no,x=0;

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

Bill()

{

}

public void putOrder()throws IOException

{

System.out.println("**********************************************");

System.out.println("Kentucky Fried Chicken- MENU CARD");

System.out.println("*********************************************");

System.out.println("Item No. Item Rate");

for(i=0;i< 10;i++)

{

System.out.println((i+1)+ ": "+item[i]+"------------------"+rate[i]);

}

System.out.println("Enter item number to place your order\n");

while(true)

{

if(x==10)

break;

System.out.println("Enter item number:");

no=Integer.parseInt(br.readLine());

order[x]=item[no-1];

amt[x]=rate[no-1];

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

no=Integer.parseInt(br.readLine());

quantity[x]=no;

x++;

if(x>0)

{

System.out.println("Any More Items ?(Y/N):");

ans=br.readLine().toUpperCase();

if(ans.equals("N"))

break;

}

}

showBill();

}

private void showBill() throws IOException

{

double bamt=0,b;

System.out.println("You have ordered\n");

System.out.println("Item Rate No. of quantity");

for(i=0;i< x;i++)

{

System.out.println((i+1)+":"+order[i]+"---------"+amt[i]+"------------"+quantity[i]);

}

while(true)

{

if(x< 2)

break;

System.out.println("Do you want to cancel any item (Y/N):");

ans=br.readLine().toUpperCase();

if(ans.equals("N"))

break;

System.out.println("Enter the item number of the item you want to cancel:");

no=Integer.parseInt(br.readLine());

for(i=no-1;i< x-1;i++)

{

order[i]=order[i+1];

amt[i]=amt[i+1];

quantity[i]=quantity[i+1];

}

x--;

}

System.out.println("Cash Memo\n");

System.out.println("*****************************************************************");

System.out.println("Item No. of quantity Rate Amount\n");

System.out.println("***************************************************************");

for (i=0;i< x;i++)

{

System.out.print( order[i]+ " "+quantity[i]+ " "+ amt[i]+ " ");

b=quantity[i]*amt[i];

System.out.println(b);

bamt=bamt+b;

}

System.out.println("Bill Amount Rs. "+bamt);

System.out.println("*******************");

bamt=bamt+bamt*.125;

System.out.println("Total Amount including service charge @ 12.5% Rs. "+bamt);

}

}

User Avatar

Wiki User

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Java Billing system? Probably you are willing to develop a billing system in Java. To do this you need below:

1) List out what exactly you want from the billing system

2) Learn java or hire a person who can do this

3) Develop the system based on the requirements

If you are willing to hire a java person then let me know so that I can help you.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

There are a few different programs for billing software in Java, depending on what your needs are. Shareware Central has some programs available.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make restaurant bill program in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is there a Java program for finding the zodiac sign?

I could make one, but "a program of zodiac signs" tells me little.


What do you get when you compile a java program?

The java interpreter or JVM (Java Virtual Machine) is not able to execute the java source code for a program. The java source code first needs to be compiled into bytecode that can be processed by JVM. Producing bytecode make the program platform independent as each platform has its own JVM. It is also possible to directly write bytecode, bypassing the need to compile, but that would be tedious job and also not good for security purpose as the compiler checks for various errors in a program.


How do you make an antivirus program using Java?

A running java program only has access to the memory allocated to it by the Java Runtime Environment. Java by design does not allow access to absolute memory locations which is required to scan for memory resident viruses. A Java-based anti-virus program can still read a virus-signature file and use it to scan for those patterns in files to identify possible infected files.


How do you write a java program to make a periodic table?

See the related links section for a link to a JAR file containing this program.


Can you write java program in Microsoft Word?

Since the Java program is basically a text file, you can write it in any text editor (although using a Java IDE, or an IDE with support for Java, does give you certain advantages). Thus, you can use programs such as NotePad or NotePad++ to write the Java program. Using word processors such as MS-Word is problematic, because these insert additional codes. You would have to make sure you save the resulting file in the text format - give the "Save As" command, and choose a text format from the list.

Related questions

Who make Java Program?

Many people make Java programs, but if you mean who invented the Java programming language it was James Gosling of Sun Microsystems.


What do a java developer do?

A Java developer helps create a program which can understand any form of computer language. A Java developer tries to make a program that can understand the computer language that is on any computer platform.


How do people make minecraft mods?

They program them using code and Java.


How can you make java program to solve finite automata?

A person can make a Java program solve Finite Automata by creating a tool with Discrete. This should be done overt a network, so that all employees have access to the programming.


Is there a Java program for finding the zodiac sign?

I could make one, but "a program of zodiac signs" tells me little.


What do you get when you compile a java program?

The java interpreter or JVM (Java Virtual Machine) is not able to execute the java source code for a program. The java source code first needs to be compiled into bytecode that can be processed by JVM. Producing bytecode make the program platform independent as each platform has its own JVM. It is also possible to directly write bytecode, bypassing the need to compile, but that would be tedious job and also not good for security purpose as the compiler checks for various errors in a program.


How do you run java program in ubuntu OS?

Download the JRE (java runtime environment) from Sun's website. make sure you get a version that will run on your os.


How do you make an antivirus program using Java?

A running java program only has access to the memory allocated to it by the Java Runtime Environment. Java by design does not allow access to absolute memory locations which is required to scan for memory resident viruses. A Java-based anti-virus program can still read a virus-signature file and use it to scan for those patterns in files to identify possible infected files.


How do you write a java program to make a periodic table?

See the related links section for a link to a JAR file containing this program.


In relation to Java what is a thread?

A Java Thread is a thread of execution in a Java Program. A Java Virtual Machine can have a single application running multiple threads, which is known as concurrency. Threads are what make the program run. Each thread has a different priority, and when the machine queue fills up, the threads are executed in the order of their priority.


Does using Java make a computer accessible to viruses?

sometimes, it all depends on what program you are using.


Do you have type a file extension if you want to include the file name?

No, you do not have to type the file extension if you want to include the file name. You only use file extension to make the specific file be able to be run by the program. Example: I want to make my file into a java program so i can use with a specific type of program which only runs java file i put .jav at the end of the title to make it from a text file to a java file.