Instructions<br />Wings Coffee Shop <br />A local coffee shop sells a variety of different items shown below to their customers. You are asked to write a Java application that can be used to keep track of these items. Additionally, this program provides a way to print out a listing of the items. Item Name Price Coffee $1.00 Water $2.00 Milk $1.50 Bagel $1.25 Donut $0.75 Your program will create a class, named Item. This class has the following: * A String instance variable to hold the item name * A double instance variable to hold the price * A constructor that takes a String and double to initialize the instance variables * A get and set method for each instance variable Once you have this class created, you write a second class named CoffeeDriver. This class has the following methods: * sortName – this method sorts the array of items by item name and then displays the name and price of all items on the screen * sortPrice – this method sorts the array of items by item price and then displays the name and price of all items on the screen * main - It creates an array of Item objects using the data above to set each Item's information. After initializing the array, prompt the user for how they want to see the list – sorted by name or price. Then call the appropriate method. Be sure your program demonstrates good programming style (appropriate comments, identifier names, indenting, etc). Although it is not required to look this way, your output might look something like the following: Welcome to Wings Coffee Shop. We have a great list items on our menu. Would you like to see these items sorted by name or by price? (n / p): n Item Name Price Bagel $1.25 Water $2.00 Coffee $1.00 Donut $0.75 Milk $1.50
Hi...I can help you answer this question
How soon do you need the answer ?
will it work for you if I get it in the next five hours? if not let me know and we might work something out
I should be able to answer your question by then
I am leaving the chat but I guess I will get an email when the answer is ready?
I have never used a chat before so not sure how it works
you should get a email
if not then please check back in 2 hours
I am uploading answer
Link : http://wikisend.com/download/398966/CoffeeDriver.java let me know if you need changes
<br />can you please make the code to show the name of the item name and the price in column after compiling. the item name should be the first column and the second one should be price. <br />example of what I am talking about. I hope you understand what I'm trying to say<br />Item Name Price<br />Bagel $1.25<br />Water $2.00<br />Coffee $1.00<br />Donut $0.75<br />Milk $1.50<br /><br /> <br />with a better alignment than what is dispalying here<br /><br />PS: the web site have some sort of bugs because it messes up how I want to show you
ok....I can do that, give me few minutes
Try this,,,, http://wikisend.com/download/420718/CoffeeDriver.java
okay thanks much
after compiling, the sorting only displays by name (n) only even when you select(price) p it still displays the sorting in by n.
ok...I will take a look. When do you need these changes ?
if I can get by 12pm EST that will be great.
Here you go....http://wikisend.com/download/448358/CoffeeDriver.javaLet me know if it helps
no, it did not help, it still displays in name
oops..I agve you wrong link... Try this one .. http://wikisend.com/download/940122/CoffeeDriver.java Sorry.
Yes that is the way this program runs!