public static void main(String[] args){ Scanner in =new Scanner(System.in); int counter = 0; double total = 0; String today = "first"; String orderName[] = {"Tofu Burger","Cajun Chicken","Buffalo Wings","RainbowFillet","Rice Cracker","NoSalt Fries","Zuccini","Browen Rice","Cafe Mocha","Cafe Latte","Espresso","Oolong Tea"}; double orderPrice[] = {3.49, 4.59, 2.99, 2.99, 0.79, 0.69, 1.90, 0.59, 1.99, 1.99, 2.49, 0.99}; Order[] orderObj = new Order[12]; Bell[] bellObj = new Bell[100];
int z; int per, d; System.out.print ("\n\tEntree\t"); System.out.print ("\t\tSide Dish\t"); System.out.println("\tDrink"); System.out.print("______________________________________________________________________");
January 29, 2009 at 10:35 PM
do{ do{ do{ for(int i=0; i<=11; i++){ System.out.println ("\n\t" + i + "\t\t\t" + orderName[i] + "\t\t" + orderPrice[i]); } System.out.print ("\nEnter your choice:"); int x ; x=in.nextInt(); int y; System.out.print ("How many order do you want from it??"); y=in.nextInt(); total+=orderPrice[x]*y; bellObj [counter]= new Bell(); bellObj [counter].bellName= orderName[x]; bellObj [counter].bellPrice=orderPrice[x]; bellObj [counter].bellNumber= y; bellObj [counter].bellDay = today; counter++; System.out.print ("Do you want another order??if you finish Press 0 "); z=in.nextInt(); }while(z!=0); for(int i=0; i<bellObj.length; ++i){ if(bellObj[i]!=null) System.out.println(bellObj[i].bellName+"\t"+bellObj[i].bellPrice+"\t"+bellObj[i].bellNumber+"\t"+bellObj[i].bellDay); } System.out.println("Your Orders cost: " +total); System.out.print ("is there another person??if No press 0"); per=in.nextInt(); if (per==0){ System.out.println("Thank You for your Interest.."); } }while(per!=0);
System.out.print ("Start another day??if Yes Press 0"); d = in.nextInt(); if(d==0) today="second"; }while(d!=0);
System.out.print ("Yor bell is: "); for(int i=0; i<bellObj.length; ++i) in.close(); } }
Related Pages:
doesnt run again - Java Beginners doesntrun again the code u sent doesntrun
and the error msg says
illegal start with do
even if i change it
it keeps telling me the same... the soltion
Hi
I am sending u again the code, this code run in my
again java - Java Beginners again java Hi,
i will ask
iam using servlets ,in one program my requirement is if there is a image(if u like) in anywhere and we browse...){e.printStackTrace();}
}
}
}
my problem is
how to compile,run and where to see o/p
java again - Date Calendar
java again I can't combine your source code yesterday, can you help me again. My problem is how we get result jtextfield2 from if jtexfield1 we...[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run
hi again - Java Beginners
(this);
t.start();
}
public void run(){
try
{
Thread.sleep(10);
System.out.println...;
MyThread1(String s2){
s1=s2;
t=new Thread(this);
t.start();
}
public void run
Hi .Again me.. - Java Beginners
Hi .Again me.. Hi Friend......
can u pls send me some code on JPanel..
JPanel shoul have
1pic 1RadioButton
..
Like a Voter List...() {
public void run() {
createAndShowGUI
call frame again - Java Beginners
can run ,first i have one frameA in this frame have one jTextfield1,one...() {
public void run() {
new FrameA1().setVisible(true
help again plz sorry - Java Beginners
help again plz sorry Thanks for giving me thread code
but i have...;
t=new Thread(this);
t.start();
}
public void run(){
try
{
Thread.sleep...,
Please change some code,
public void run(){
try{
Thread.sleep(10
There and Back Again
There and Back Again
The weblog of Joshua Eichorn, AJAX, PHP and Open Source
Read full Description
again with xml - XML again with xml hi all
i am a beginner in xml so pls give me the details regarding the methods used in it.
wat will return the methods getElementsByTagName(), getChildNodes(), getParentNode(), nextSibling(),etc and when
again java - Java Beginners again java i will ask
iam using servlets ,in one program my requirement is if there is a image(if u like) in anywhere and we browse that image and it is store in u r account like orkut.
my doubt is if the image is stored
How to call the run method from another class?
AdaugaChitanta.java. If I don't call a method, then I have to run FereastraPrincipala.java again...How to call the run method from another class? Sorry, if this is a stupid question.
I would like to find out how to call the run method
matching database again - Java Beginners
matching database again Dear experts,
So happy I get through this ask a question page again. Thank God.
I want to say "A BIG THANK YOU" for helping me about the matching codes.
It is working now after fine tuning
Read data again - Java Beginners
Read data again sir,
i still hav a problem,first your code will be change like this :
in netbeans out message error 5. Can you help me again. My database like my question before.Can you fix and find the problem in my code
Read data again - Java Beginners
Read data again Hey,
i want to ask again about how to read data from txt,
My DB:
kd_div varchar(15),
nm_div varchar(30),
dep varchar(25),
jab varchar(35),
cab varchar(15),
ket varchar(30)
My data in txt file is://i
Hi..Again Doubt .. - Java Beginners
Hi..Again Doubt .. Thank u for ur Very Good Response...Really great..
i have completed that..
If i click the RadioButton,,ActionListenr should get call. It should add to the MS Acess table..Plz check this out....
hope u ill
Failed to run Online Quiz Application in JSP - JSP-Interview Questions
Failed to run Online Quiz Application in JSP Hi,
I have been following your following link to run the online quiz application, but I failed... you kindly document the steps in more details to run your application
Loops
to $ Counting;
d. go to sep a. and run this script again with the new value... instructions to repeat the code itself again and again until certain conditions are met... to repeat again and again until the result found or the number of times
Script on the page used too much memory. Reload to enable script again.
Script on the page used too much memory. Reload to enable script again. ... to enable script again". After getting this error other pages also not working. Logout and login again not working. if open the new tab then only working other
run php code online run php code online Is it possible to run PHP Code online
Run time error - WebSevices Run time error Hello,
Anyone know, how run the template files in zend framework.Anybody help me.
Rgds,
Pras code to help in solving the problem :
protected function _run($template
how to run this program?
how to run this program? how to run java swing program
Java Swing program runs same as a simple java program. There is no difference... with javac and run with java command, same as a simple java program.
Learn Swing
Run time exception Run time exception What class of exceptions are generated by the Java run-time system? Java runtime system generates RuntimeException and Error exceptions
how to run servlet
how to run servlet Servlet run procedure for J2EE Software
Hi Friend,
Please visit the following links:
http://www.roseindia.net/servlets/introductiontoconfigrationservlet.shtml
http://www.roseindia.net/servlets
java not run on my pc
java not run on my pc i have installed java in pc but when i run and compile any program the massage is display that 'javac' is not recognized as an internal or external command
how to run - Java Beginners
how to run how to run java program...
brifely Hi... to execute or run the program. For ex, If you have the following java program... file on the command prompt using: "javac HelloWorld.java". And then run it using
j2me pgrm run
j2me pgrm run How to run a j2me program
Please visit the following link:
J2ME Tutorials
How to compile and run the JSP
How to compile and run the JSP Hi
Kindly tell me how to run and compile JSP small Program using Tomcat as webserver.
I created small program HELLO JSP in HTML and compile the program but it is saying Class o r interface
run exe on remote client run exe on remote client I am making a client server application using netbins 6.1 , Jsp servlet, Mysql5.1...
I want to run an batch file or exe... copied files fromserver to client using my application but i cant run it on remote
Run a simple EJB code Run a simple EJB code I found the code this. However, as I have no idea with EJB, I can't understand how to run it. Can anybody help me by giving steps (by giving snapshots or writing full procedure)how to run it (any platform
Run a simple EJB code Run a simple EJB code I found the code this. However, as I have no idea with EJB, I can't understand how to run it. Can anybody help me by giving steps (by giving snapshots or writing full procedure)how to run it (any platform
get integer at run time
get integer at run time how to get integer value at run time in j2ee using servlets
Hi,
You can get the value from request parameter and then convert using the function Integer.parseInt(variable).
Here
run jsp file run jsp file how to run the jsp file in varies web servers
Hi Friend,
For Apache Tomcat,there is a basic directory structure:
webapps-Web Application Folder- WEB INF-classes
You have to set the class path also
compile and run java program
compile and run java program Hello, everyone!!!
I just want to ask if you anyone here knows how to compile java file in linux specifically UBUNTU... do I compile and run this file using the terminal of ubuntu...
By the way, I am
Need a query to run in db2
Need a query to run in db2 hi all,
I need a query to run in DB2 for the following:
Table 1- MARKETINGACCOUNTS
Fields-ACCOUNTTYPE,Accountnumber;
Table 2- ACCOUNTS
Fields-LEDGERCODE,ACCOUNTNUMBER,BALANCE
FROM THE ABOVE I NEED
Run time problem Run time problem when i run a project,it shows an exception like "unable to create MIDlet".It also shows
"running with locale:English_united States.1252
running in the identified third party security domain"
"please help
java pages run
java pages run how do we run jsp file in the browser. do we need to install server. could it be run on the xamp server
You need Apache Tomcat Server to run the jsp code over it. Follow these steps to run the simple