Help java vendingMachine code runs doesn't work Why please help

import java.util.*;
public class Vend
     double costALL = 40.00;
     int invALL = 3;
     String nameALL = "ALLURE OF DARKNESS";
     double costJUD = 90.75;
     int invJUD = 2;
     String nameJUD = "JUDGMENT DRAGON ";
     double costCHA = 75.50;
     int invCHA = 3;
     String nameCHA = "CHARGE OF THE LIGHT BIRGADE";
     double costCRU = 399.99;
     int invCRU = 1;
     String nameCRU = "CRUSH CARD)";
     double costGORZ = 245.29;
     int invGORZ = 1;
     String nameGORZ = "GORZ THE EMISSARY OF DARKNESS";
     double costDAD = 220.00;
     int invDAD = 2;
     String nameDAD = "DARK ARMED DRAGON";
     double savedDeckpts = 100.00;
     double input = 0.00;
     double change = 0;
     int choice = 0;
     public static void main(String[] args)
          Vend machine = new Vend();
     public Vend()
          System.out.println(" Hello Duelist, my name is Yusie Fudo.This is the one and only Specific Rare Yu-Gi-Oh! card vending.Each card in this vending machine is sealed in a special card container.These cards are up to date with the currnet ban list and pack release's.");
          System.out.println(" in order to get cards, you will be asked to pay using your Deck Points, which are stored on your Acadmey Duel Disc");
          System.out.println("Please insert Deck Points equal to the card(s) you would like to purchase or just insert 1,703.87 Deck points");
          Scanner input = new Scanner(System.in);
          double insert = input.nextDouble();
          savedDeckpts = savedDeckpts + insert;
          change = insert - change;
          while(choice != 7 && insert > 0)
               System.out.println(" You still have " + change + " Deck Points");
               System.out.println("Press 1 if you would like the card ALLURE OF DARKNESS from the PhanTom of DarkNess booster pack(40.00 Dp)");
               System.out.println("Press 2 if you would like the card JUDGMENT DRAGON from the Light Of DesTruction booster pack(90.75 Dp)");
               System.out.println("Press 3 if you would like the card CHARGE OF THE LIGHT BIRGADE from The DuelistGeneSis booster pack(75.50 Dp)");
               System.out.println("Press 4 if you would like the card CRUSH CARD from the limited edition GoLD series booster pack(399.99 Dp)");
               System.out.println("Press 5 if you would like the card GORZ THE EMISSARY OF DARKNESS from the Dark LeGends booster pack(245.29 Dp)");
               System.out.println("Press 6 if you would like the card DARK ARMED DRAGON from the PhanTom of DarkNess booster pack(220.00 Dp)");
               System.out.println("Press 7 if you would like to have your Deck points added back to your Duel Disc");
               System.out.println("Press 8 if you would like to check how many cards are left in the machine");
               System.out.println("(*note you need exodius the ulitimate forbbiden one's card code inorder to use option 8)");
               choice = input.nextInt();
               if(choice == 1 && choice <= 8 && choice >= 1 && insert >= 40.00)
                    System.out.println("Congrats Duelist you have chosen to buy the card ALLURE OF DARKNESS from the PhanTom of DarkNess booster pack");
                    invALL = invALL - 1;
                    change = change - costALL;      
               else if(insert < 40.00 && choice == 1)
                    System.out.println("not correct amount of Deck Points.Please chose another card(s)");
                    if(choice == 2 && choice <= 8 && choice >= 1 && insert >= 90.75)
                    System.out.println("Congrats Duelist you have chosen to buy the card JUDGMENT DRAGON from the Light Of DesTruction booster pack");
                    invJUD = invJUD - 1;
                    change = change - costJUD;      
               else if(insert < 40.00 && choice == 2)
                    System.out.println("not correct amount of Deck Points.Please chose another card(s)");
                    if(choice == 3 && choice <= 8 && choice >= 1 && insert >= 75.50)
                    System.out.println("Congrats Duelist you have chosen to buy the card CHARGE OF THE LIGHT BIRGADE from The DuelistGeneSis booster pack");
                    invCHA = invCHA - 1;
                    change = change - costCHA;      
               else if(insert < 40.00 && choice == 3)
                    System.out.println("not correct amount of Deck Points.Please chose another card(s)");
                    if(choice == 4 && choice <= 8 && choice >= 1 && insert >= 399.99)
                    System.out.println("Congrats Duelist you have chosen to buy the card CRUSH CARD from the limited edition GoLD series booster pack");
                    invCRU = invCRU - 1;
                    change = change - costCRU;      
               else if(insert < 40.00 && choice == 4)
                    System.out.println("not correct amount of Deck Points.Please chose another card(s)");
                    if(choice == 5 && choice <= 8 && choice >= 1 && insert >= 245.29)
                    System.out.println("Congrats Duelist you have chosen to buy the card GORZ THE EMISSARY OF DARKNESS from the Dark LeGends booster pack");
                    invGORZ = invGORZ - 1;
                    change = change - costGORZ;      
               else if(insert < 40.00 && choice == 5)
                    System.out.println("not correct amount of Deck Points.Please chose another card(s)");
                    if(choice == 6 && choice <= 8 && choice >= 1 && insert >= 220.00)
                    System.out.println("Congrats Duelist you have chosen to buy the DARK ARMED DRAGON from the PhanTom of DarkNess booster pack");
                    invDAD = invDAD - 1;
                    change = change - costDAD;      
               else if(insert < 40.00 && choice == 6)
                    System.out.println("not correct amount of Deck Points.Please chose another card(s)");
               if(choice == 7 && choice <= 8 && choice >= 1 )
                    System.out.println(" You have chosen to have your Deck Points added back to your Duel Disc");
                    System.out.println("You have revceived " + change + " Deck Points back");
                    change = change * 0;
               if(choice == 8 && choice <= 8 && choice >= 1)
                    System.out.println("You have selected to see how many of what cards are left");
                    password();
          public void password()
          System.out.println("Please input ExodiusCardCode at this time");
          Scanner pass = new Scanner(System.in);
          String password = pass.next();
          if(password.equals("blackout"))
               System.out.println("There are " + invALL + "ALLURE OF DARKNESS ");
               System.out.println("There are " + invJUD + "JUDGMENT DRAGON ");
               System.out.println("There are " + invCHA + "CHARGE OF THE LIGHT BIRGADE ");
               System.out.println("There are " + invCRU + "CRUSH CARD ");
               System.out.println("There are " + invGORZ + "GORZ THE EMISSARY OF DARKNESS ");
               System.out.println("There are " + invDAD + "DARK ARMED DRAGON ");
               System.out.println("The machine has DP" + savedDeckpts + " Inside");
}

hi my name is exodiamaster3.14 my code runs but when it runs it tells me
System.out.println(" Hello Duelist, my name is Yusie Fudo.This is the one and only Specific Rare Yu-Gi-Oh! card vending.Each card in this vending machine is sealed in a special card container.These cards are up to date with the currnet ban list and pack release's.");
          System.out.println(" in order to get cards, you will be asked to pay using your Deck Points, which are stored on your Acadmey Duel Disc");
          System.out.println("Please insert Deck Points equal to the card(s) you would like to purchase or just insert 1,703.87 Deck points");
say i type in 500 it then gives me all my choices of what to buy. when you press 1-6 it just repeats it self on what you can chose.it does subtract the money but won't show that you bought it. and when you chose option 8 it does not show what is left in the machine. this is my problem please help b/c i am very stuck. thanks again.

Similar Messages

  • I restored my ipod and now the Nike app is crashing on me.  I've tried turning it off and back on but it doesn't work. Please help.

    I restored my ipod and now the Nike app is crashing on me.  I've tried turning it off and on again, but it still doesn't work.  Please help.

    Hi,
    Have you tried a Reset...
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    The Apple logo will Appear and then Disappear...
    Usually takes about 15 - 20 Seconds...
    Release the Buttons...

  • [Acrobat X Standard] The tool box doesn't work. Please help!

    [Acrobat X Standard] The tool box doesn't work. Please help!
    I have a Acrobat X Standard.
    When I open the documents, I can't click the tool box. but when I don't open the documents, I can use the tool box.
    To solve the problem,
    1. reinstall the menu.
    2. reboot the computer.
    But, It still didn't work.
    Plz help!!

    Was it AA X Std that you had these options in (sorry, I only have Pro)? If it was the trial (that is Pro), it may be that Std does not have to feature. Under XI at the Adobe site, there is a comparison of features between Std and Pro that might give you a hint.
    There is also an option to turn on or hide many tools. For me there is a small icon just above the tools...comment titles. If you select that it give a list of tools you can display. Often, several are not displayed by default. How you lost them is another things, but it is getting them that is the basic question.

  • HT1277 I cannot open the new email icon for 10.6.8 and the latest secrtoy update. My old "Stamp" icon email won't let me in either indicating that the new OS version doesn't work. Please help

    I cannot open the new email icon for 10.6.8 including the latest security update. My old "Stamp" icon email won't let me in either indicating that the new OS version doesn't work. Please help. I have spend over 4 hours installing and reinstalling updates, etc. and I don't know where to go from here.....

    Mac OS X v10.6: Mail.app won’t open, or "You can't use this version of Mail…" alert after installing Security Update 2012-004:
    http://support.apple.com/kb/TS4424?viewlocale=en_US&locale=en_US
    Fellow user Grant Bennet-Alder offers this solution:
    Some users have reported this problem if the Mail Application has been moved out of the top-level /Applications folder, or duplicated in another location.
    When the Security Update is done, the old version of Mail is disabled.
    The solution has been to:
    1) make certain Mail is in the /Applications folder
    2) There is no other copy anywhere else.
    3) Once steps 1 and 2 have been done, Manually download and re-apply the Security Update (2012-004) by hand.
    Security Update 2012-004 (Snow Leopard)
    If the Mail.app has been LOST, it can be re-installed by applying the 10.6.8 version 1.1 combo update. But this update is quite large and it is usually not necessary:
    Mac OS X 10.6.8 Update Combo v1.1

  • HT201304 I updated my ipad mini to ios7 and after that the restrictions have been turned on automatically. It was off before the update and I din do after either. I tried 1234 but it doesn't work. Please help me.

    I updated my ipad mini to ios7 and after that the restrictions have been turned on automatically. It was off before the update and I din do after either. I tried 1234 but it doesn't work. Please help me.

    1. It is never a good idea to include personal info like your email address or Apple ID in a post on an open forum.
    2. The email you received DOES NOT say your Apple ID cannot be used to unlock this iPad. The email informs you that your Apple ID was used to unlock an iPad. Fortunately the iPad is yours. The message confirms that. If your Apple ID was used to unlock an iPad that was not yours your would then know to change your password. Since the iPad is yours you do not need to change your password.
    Is your iPad working?

  • My ipad is on an infinite loop.  I used ios7 for a few days and then did updates on some of my apps. that's when the infinite loop started.  I have tried pressing the power and home button at the same time, but it doesn't work. Please help!

    my ipad is on an infinite loop.  I used ios7 for a few days and then did updates on some of my apps. that's when the infinite loop started.  I have tried pressing the power and home button at the same time, but it doesn't work. Please help!
    I even tried some hints posted for ios6 (turn off Ipad, holding home button and plugging in power cord at the same time and then releasing the home button)
    I did manage to get a different screen that shows the itunes icon and a power cord, but nothing happens.

    You were on the right track. You got the connect to iTunes screen and you ended to use iTujes to restore your iPad. Try recovery mode again.
    Recovery Mode Instructions
    Disconnect the USB cable from the iPad, but leave the other end of the cable connected to your computer's USB port.
    Turn off iPad: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for iPad to turn off.
    If you cannot turn off iPad using the slider, press and hold the Sleep/Wake and Home buttons at the same time. When the iPad turns off, release the Sleep/Wake and Home buttons.
    While pressing and holding the Home button, reconnect the USB cable to iPad. When you reconnect the USB cable, iPad should power on.
    Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears you can release the Home button.
    If necessary, open iTunes. You should see the recovery mode alert that iTunes has detected an iPad in recovery mode.
    Use iTunes to restore iPad.

  • Distributed cache doesn't work. Please help.

    Hi,
    I am trying to use distributed cache by:
    1. use coherence as 2nd level cache for hibernate in the application server (weblogic 9). Configuration as follows:
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>*</cache-name>
    <scheme-name>DistributedInMemoryCache</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>DistributedInMemoryCache</scheme-name>
    <service-name>DistributedCache</service-name>
    <backing-map-scheme>
    <local-scheme>
    <high-units>{size-limit 0}</high-units>
    </local-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    </caching-schemes>
    </cache-config>
    2. start a standalone jvm locally to form a 2 nodes cluster with the coherence node above using the same cache-config.xml as shown above. I use the following command to start this cache:
    %JAVA_HOME%/bin/java -server -showversion -jar %LIB_HOME%\coherence.jar
    I enable jmx on both jvm, the coherence cache on the coherence node in weblogic shows a bunch of caches exist (I use @Cache(usage = CacheConcurrencyStrategy.READ_ONLY) annontation in my code to enable cache for an entity), also there are a few cache services including DistributedCache started. However, from the standalone jvm, I didn't see any cache nor Distributed cache service (the only service is management from jconsole).
    My goal is to use the standalone jvm as a cache server that holds all the caches while the coherence in weblogic as the client which has no local storage but a near cache.
    However, I could not even get the distributed cache to work. Please help.
    Thanks

    Hi,
    To start the cache server you need to use the command like this:
    %JAVA_HOME%/bin/java -server -Dtangosol.coherence.cacheconfig=/path/to/cache_configuration_descriptor -cp %LIB_HOME%\coherence.jar com.tangosol.net.DefaultCacheServer
    Regards,
    Dimitri

  • The menu button doesn't work! Please help me!

    I own a really cute ipod mini and i love it. But I had some trouble lately...the latest problem: my menu button doesn't work. well, i did everything i could do...reset all setting etc etc. but the problem still persists. Please help me!
      Windows XP  

    I own a really cute ipod mini and i love it. But I
    had some trouble lately...the latest problem: my menu
    button doesn't work. well, i did everything i could
    do...reset all setting etc etc. but the problem still
    persists. Please help me!
      Windows XP  
    same thing is happening to mine. i own a silver mini and recently it has been acting skrewy. the backlight goes on and off (without holding MENU and when the setting is at OFF) and the menu button doesnt work too. just today i discovered that when i do the HOLD switch it replaces the MENU process or ability.
    PLEASE HELP!

  • My Safari shortcut Cmd+Opt+B doesn't work. Please Help.

    Hi fellow MacBook Pro Users,
    My Safari shortcut Cmd+Opt+B, to show and hide all bookmarks doesn't work.  The same shortcut is used in a third party app Scrivener and it doesn't work there too.  I had a look at all my keyboard shortcuts listed in System Preferences>Keyboard>Keyboard Shortcuts and don't see the shortcut listed there.  Also I checked my triggers in Quicksilver and didn't see the Cmd+Opt+B shortcut there too.  Any idea how I can fix this?  Had this issue for a long while now.
    Thanks!

    This issue may be resolved by installing the 10.6.8 v1.1 combo updater.
    Mac OS X 10.6.8 Update Combo v1.1

  • IPhone 4S microphone doesn's work! Please Help!

    My IPhone 4S is about a year and a half old and I got it last february. Now my microphone is not only not working in calls, but it doesn't work in apps either. It only works some of the time in my camera when i'm taking videos and in speaker phone during calls. I don't know what's wrong with it but I guess I'm not the only person with this issue. Also apparently Apple does absolutely nothing about it and just tell you to buy a new one. It seems like all IPhone 4(S) users have this problem eventually. Recently I took my phone off of insurance because of the cost before realizing that it doesn't work properly. Does anyone have suggestions or ways to fix this issue? I definitely cannot afford a new phone right now and i will definitely not be looking into another IPhone when i get an upgrade. Also, does anyone with the 5 have these problems after this long? Apple needs to fix this or they will lose me and possibly many more as a customer.

    It seems like all IPhone 4(S) users have this problem eventually.
    Nonsense. 
    Does anyone have suggestions or ways to fix this issue? I
    Do the basic troubleshooting steps.  If they don't work, there is a hardware problem.
    iPhone: Hardware troubleshooting
    definitely cannot afford a new phone right now and i will definitely not be looking into another IPhone when i get an upgrade.
    So, you think that you're entitled to an extended warranty without paying because of your financial limitations or idle threats?  Tell it to your parents.

  • My wireless drivers for Windows 7 Home Premium doesnt work for some reason. I downloaded plenty drivers and it still doesn't work. Please help?

    Well I just recently downloaded Windows 7 on my macbook a few hours ago. Everything work fine except for my wireless driver. My internet is completely fine because im currently using another computer in my house that is connected wireless to type this. What can it be? Please help.

    Hi Somehunk,
    Welcome to the Support Communities!
    The first thing I would suggest is to quit the iTunes Store app and sign out of your iTunes Store account on your iPhone.
    Then restart / reset the device.
    When you sign back in, you should be able to re-initiate the download.
    The following articles will explain these steps in more detail:
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311?viewlocale=en_US
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/HT2519
    Cheers,
    Judy

  • I cannot open any documents in Indesign after downloading Yosemite.  Says I need Java 6.  I have Java 8 and still doesn't work.  Please suggest.

    I cannot open any documents in InDesign after downloading Yosemite.  Says I need Java 6.  I have Java 8 and still doesn't open.

    It may seem strange indeed, but yes, you have to ALSO install the older version 6 for Apple's system; other applications will use your Java (which I believe is now even 9) and others will use that version 6.
    Download directly from Apple here:
    Java for OS X 2014-001

  • My JS code doesn't work. Please help =)

    Ok so, this is my select statement that's causing errors. I get an error saying object doesn't support that action. Is onchange not supported anymore in IE6? Because it works fine in firefox. Someone help please?
    <select name="modules" id="modules" onchange="selection()">
    And this is the js code that goes with it.
    <Script type="text/javascript">
    function selection() {
         var option=document.getElementById('modules').value
         var select_listitem="<table align='center' width='100%'><tr><td align='center'>Enter list item text here: <input type='text' name='list_textbox'></td></tr></table>"               
         var select_blockquote="<table align='center' width='100%'><tr><td align='center'>Enter blockquote text here: <input type='text' name='list_textbox'></td></tr></table>"          
         var select_option="<table align='center' width='100%'><tr><td align='center'>Enter option value text here: <input type='text' name='list_textbox'></td></tr></table>"                    
         var select_link="<table align='center' width='100%'><tr><td align='center'>Enter link url here: <input type='text' name='link_href'><br />Enter link text here: <input type='text' name='link_text'></td></tr></table>"                    
         var select_image="<table align='center' width='100%'><tr><td align='center'>Enter image source here: <input type='text' name='list_textbox'></td></tr></table>"                    
         if (option=='listitem'){
              document.getElementById('1').innerHTML=select_listitem           
         else if (option=='blockquote'){
              document.getElementById('1').innerHTML=select_blockquote
         else if (option=='option'){
              document.getElementById('1').innerHTML=select_option
         else if (option=='link'){
              document.getElementById('1').innerHTML=select_link
         else if (option=='image'){
              document.getElementById('1').innerHTML=select_image
         else{
              document.getElementById('1').innerHTML=""
    </script>

    onchange works just fine, your problem must lie in the selection() function. My particular concern goes with the getElementById('1'), what is '1' exactly? A number does not qualify as a valid element ID as far as I know.
    It may also be that the IE security settings are blocking you from changing the innerHTML property.

  • Informix9.4 to Oracle10gR1 doesn't work..please help

    Hi ,
    OS:linux
    Source: Informix 9.4
    Dest: Oracle 10gR1
    This is a test setup where, both source & destination are on the same server.
    I have downloaded drivers from IBM site & copied the relevent ifxjdbc.jar to drivers directory. But, whenever i try to connect to Informix, it is raising an exception "com.informix.asf.ifxASFException" ... there are no network related issues here-- how to resolve this-?
    Now i'm trying to offline capture.. this also giving so many troubles... :(
    whenever i try to capture , there are no tables captured in the source model. I have checked the XML files in offline_capture/stores_demo directory.. all the XML files are of 63KB. and the contents of all the files are same...
    <?xml version="1.0" encoding="UTF-8" ?><START><er></er></START>
    It seems that there is a problem with creating XML files.
    Thanks ,
    Ravi.M

    Hi,
    Thanks for the reply.
    After raising a TAR with Oracle, they 've provided me with a workaround. If we copy the offline data files with .dat extension to any windows system and try to run the Migration Workbench on Windows machine, we will get the Source Model with out any problem. This workaround did worked for me.
    Oracle Support didn't helped me with any solution to achieve the same on Linux. But, they told me that LANG environment variable could be the one causing the problems. But,i'm yet to confirm it.
    Overall, it works well on Windows... thats fine with me..
    Regards,
    Ravi.M

  • Remove the ink cartridge & reinstall it then press ok - Doesn't Work. Please Help !

    HP Envy 5660 Wireless All-In-One
    My black & color ink ran out and I changed them both. The color ink cartridge is fine but when I changed the black cartridge I get a message telling me to remove it and reinstall the black ink cartridge then press ok. I tried this several times. When it did not work after 4 tries, I decided to try another black cartridge. Again I got this message. I tried with 3 brand new black cartridges with no luck.
    I then decided to turn off the power to the printer and unplug the printer. Wait a few minutes then plug it in again and power up. Like a re-boot.  This did not help. I then tried cleaning the area where the cartridge goes in but this did not help either. I did not bother trying to clean the cartridges (3) themselves as they were all brand new, just out of the box.
    The only way I can use this printer right now was to remove the black cartridge all together and only use the color ink.
    I have only had this computer for 3 months so if anyone has any ideas it would be greatly appreciated. Thank you in advance.

    Hi @TracieDawn,
    I see that despite your best efforts so far, you can currently only use the printer when you remove the black cartridge and printer with the color ink. I suggest using the following document to troubleshooting the issue, and calling us if the issue persists; HP ENVY 5640, 5660, 7640 and Officejet 5740, 8040 e-All-in-One Printer Series - A 'Cartridges Missin....
    If you are in Canada or US call 800 474 6836, or you can Contact HP Worldwide.
    HP printers generally have a 1 year warranty from their purchase date, you can verify the warranty using the following link if you would like; warranty check. 
    I hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

Maybe you are looking for

  • How to stop family sharing on my apple id

    Family share is now on, which requires a credit card. I want to remove the card info and use cash gift cards from apple. Family does not allow cash nor paypal. So no family sharing for me. How do I turn it OFF.

  • Sometime Display not working

    Hi, I bought new Mac Pro and last few weeks facing a problem with my display (27" LED). Specially morning time, when I switch on computer, after bing sound.... display don't show anything.... just black screen, desktop light on and I can hear a littl

  • BizTalk AS2 Certificate configuration problem

    Hi, I'm having a problem with signing a certificate to send port. I have imported 2 diferent certificates in mmc to "Local Computer\Other People" and "Local Computer\Trusted Root Certification Authorities". Then I went to BTAdmin and select some Send

  • A Simple Java Editor

    Hello, I am looking for a very simple(barebone)Java editor which can provide syntax highlighting facility. I need to plug it into my application. Can anybody suggest me something? Looking forward 2 ur replies.

  • Ability to download folders/multi files from the file portal.

    It would be nice to be able to multi select files and especially be nice to be able to select folders in the file portal to restore the entire tree structure under a folder (like a users profile folder).   Seems like it should be doable.  thanks.