please iam stuck

please iam stuck

View Answers

January 28, 2009 at 4:26 AM

Hi allo

Here is your solved code..

import java.util.*;
import java.util.Scanner;

class Bell{
String bellName;
double bellPrice;
int bellNumber;
String bellDay;

public Bell(){}

public Bell (String bell_name, double bell_price,int bell_number, String bell_day){
bellName = bell_name;
bellPrice= bell_price;
bellNumber= bell_number;
bellDay= bell_day;
}
}

class Order{
String orderName;
double orderPrice;

public Order(){}

public Order(String order_name, double order_price){
orderName= order_name;
orderPrice= order_price;
}
}

public class Coffee{

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 28, 2009 at 4:26 AM

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();
}
}

Thanks...









Related Tutorials/Questions & Answers:
please iam stuck - Java Beginners
please iam stuck  please help i dont find the errors to fix my home wrok this is the program :::: import java.util.*; import java.util.Scanner; class Bell{ String name; double price; int number; String day
stuck
Advertisements
ModuleNotFoundError: No module named 'stuck'
ModuleNotFoundError: No module named 'stuck'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'stuck' How to remove the ModuleNotFoundError: No module named 'stuck'
java please please help
java please please help  Dear Friends plz help me to complete this program import java.util.*; public class StringDemo { static String a="{a=100;b=200;c=300}"; public static void main(String args
please help
please help  please send me the code of dynamic stack in java without using the built in functions
please answer me
please answer me  iam using html in select tag.in this one option i selected and that option data will be display in table.And use servlet with html and how to retrieve the data from data base
Define please!?!
Define please!?!  What is tree map sort
urgent...pleAse help me.....please!
urgent...pleAse help me.....please!  please help me urgent! how can i do dictionary with the use of array code in java, where i will type the word then the corresponding meaning for that word will appear...thanks
Please Help
Please Help  How do I create an attribute that represents the following: A grayscale 'color' value, that is, an integer between 0 and 255 inclusive, where 0 corresponds to the darkest black and 255 to the brightest white
Please Help
Please Help  How do I create an attribute that represents the following: A grayscale â??colorâ?? value, that is, an integer between 0 and 255 inclusive, where 0 corresponds to the darkest black and 255 to the brightest white
Please help
Please help  Problem: Write a program that does addition, subtraction, multiplication and division operation on real numbers. The operation started with a user entered 2 numbers and click one of the operation buttons
Please help
Please help  Problem: Write a program that does addition, subtraction, multiplication and division operation on real numbers. The operation started with a user entered 2 numbers and click one of the operation buttons
please help//
please help//  Number square cube 1 1 1 3 9 27 5 25 125 7 49 343 9 81 729 total 165 1225 â?? this is the ouput..;;; i
please help//
please help//  Number square cube 1 1 1 3 9 27 5 25 125 7 49 343 9 81 729 total 165 1225 â?? this is the ouput..;;; i
please help//
please help//  Number square cube 1 1 1 3 9 27 5 25 125 7 49 343 9 81 729 total 165 1225 â?? this is the ouput..;;; i
help please?
help please?  Define a class named Circle with the following properties: â?¢ An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both data fields
help please?
help please?  Define a class named Circle with the following properties: List item â?¢ An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please?  Define a class named Circle with the following properties: List item An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please?  Define a class named Circle with the following properties: List item An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
help please?
help please?  Define a class named Circle with the following properties: List item An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both
please help
please help  public class AllContact extends javax.swing.JFrame { /** Creates new form AllContact */ public AllContact() { initComponents(); try{ Connection1 con =new Connection1(); Connection conobj
Please HELPP
Please HELPP  The University wants to make a basic graphical display to show how many people received different grades for a piece of work on a module. You are required to write a program in Java that achieves this. The program
help please?
help please?  Define a class named Circle with the following properties: ? An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both data fields
please - Java Beginners
please   it did run in one of my friend computer but not mine bcoz she has editor iam running my code using Dos so can you send me the softwere of a good editor thanks for ur help my email is [email protected] 
My screen EPAD is broken ...please help
My screen EPAD is broken ...please help   iam in iraq and my screen EPAD is broken ,.please help..can tel me a place to join it to solve this problem ?..Sory
need help...................please
should show in texfield that already create in the web page. I'm really stuck on this area. Please help me. By the way, I'm using access Database and JSP coding...("GET",url,true) xmlHttp.send(null) } else{ alert("Please Select Employee Id
problem in writing coding. Please help me.
like? I'm really stuck on this. Please help me. By the way, I'm using Access...problem in writing coding. Please help me.  Hi sir, my name is Logeswaran. I have problem in writing JSP coding for my university assigments
ModuleNotFoundError: No module named 'PLEASE'
ModuleNotFoundError: No module named 'PLEASE'  Hi, My Python... 'PLEASE' How to remove the ModuleNotFoundError: No module named 'PLEASE'... to install padas library. You can install PLEASE python with following command
ModuleNotFoundError: No module named 'PLEASE'
ModuleNotFoundError: No module named 'PLEASE'  Hi, My Python... 'PLEASE' How to remove the ModuleNotFoundError: No module named 'PLEASE'... to install padas library. You can install PLEASE python with following command
please help me.
please help me.  How to read a properties file in java with a suitable example. Please send me. Thanks Trinath   Please visit the following link: Java read properties file
please tell me
please tell me  why we are using http protocol in servlets
please provide the code
please provide the code   Develop a multi-client chat application
please help me.
please help me.  Please send me a code of template in opencms and its procedure.so i can implement the code. Thanks trinath
please tell me
please tell me  what are the topics in core and advaced java....   Hi Friend, Please visit the following links: http://www.roseindia.net/ http://www.roseindia.net/java/ Thanks   Hi Friend, Please visit
please help me.
please help me.  Please send me the validation of this below link. the link is http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html Thanks Trinath
please tell me
please tell me  i have created one table,when i close and again login, table name will be there, but its content not displayed, showing as no rows selected, please tell me the reason
please tell me
please tell me  which cmd we use to clear the screen in sql prompt
please tell me
please tell me  why we use public static main(String ar){} in java instead of main
Please provide the code
Please provide the code   Write a program to recursively download the web pages available in the given site URL
please explain this program
please explain this program  public class MainClass { public static void main(String[] args) { System.out.println("Java
Confusion on Functions. Help Please?!
Confusion on Functions. Help Please?!  Write a program which has a number of functions for getting the area i.e. area of circle, area of square, area... not getting anywhere with it really :( Some help please
help me please
help me please   Hello I want helping for this question , Please Write a program that reads some friendsââ?¬â?¢ names, stores them in an array, and then prints out on the screen all friends who start by a particular letter
please tell me
please tell me  select * from emp order by 5 desc; in the above what is the meaning of 5, and what its functionality
please help me.
please help me.  How to move the edits.jsp in below link? http://www.roseindia.net/answers/viewqa/JSP-Servlet/9584-JSP-Servlet-Search-and-Edit.html
Please provide the code
Please provide the code   Program to find depth of the file in a directory and list all files those are having more number of parent directories
Please help me
Please help me  program for when a user enter his card number, it has to create default security pin in the database
PLEASE HELP WITH MY JAVA
PLEASE HELP WITH MY JAVA  Hey my name is Gavin and im a student... please help!!!!!!!! it is a for-loop question: Display the first 5 multiples... and average If u can please help...   
java programming please - Spring
java programming please  please i want your help :-( using... information Please Enter Your Name Please Enter your current balance Please Enter the amount you want to deposit Please Enter the amount you want to withdraw
help please!!! T_T
help please!!! T_T  what is wrong in this?: import java.io.*; class...("please enter your name:"); name1= input.readline(); System.out.println("please... { String name1; String name2; System.out.println("please enter
Logic error? HELP PLEASE! :(
Logic error? HELP PLEASE! :(  Hello Guys! i have a huge problem. What... email the page stuck which shows a blank page. By right it should display the date... your saved Quick Quotes, please enter your Email Address

Ads