Car Park Ticket System with if statements which is half working...

Hi
I have this following program which is a Car Park System, if you click the amount of hours, you can then pay for your ticket by clicking the money buttons on the left. The program is supposed to show a message dialog box when the amount turns to 0.00 or it shows a message with the amount of change if it goes under 0.00. The problem i am having is that the program works when i am using 50p's, �1's and �2's. But when i use several 10p's or 20p's, the amount reaches 0.00, but no message dialog box is shown, or sometimes when it reaches 0.00 it says Your change is �0.00 rather than just saying thank you.
The whole source code is here http://www.phpfi.com/89445
Thanks a lot for your help.

Like warneja said above........................
It's probably related to this:-
   double amount = 0;
        if ( amount == 0.00 )
              message.setText(" ");
                 JOptionPane.showMessageDialog( null,
              "Thank you", "EXACT AMOUNT", JOptionPane.INFORMATION_MESSAGE  );
         else if ( amount < 0.00 )
              message.setText(" ");
                 JOptionPane.showMessageDialog( null,
              "Your change is "+(pounds.format(Math.abs(amount))), "CHANGE", JOptionPane.INFORMATION_MESSAGE  );
         }Apart from changing the implementation tou might try something along the lines of
IF | amount | < eps THEN : Exact ammount of money reached.
where eps is a small number
'cos a lot of times you're going to get:
EXACT CHANGE reached - amount = 0.0000000000001
You could fing these things by putting in something like this:
At line 316
        System.out.println( "Amount is >"+ amount );
        if ( amount == 0.00 )
//......................then you'd be able to find your own bugs.
I can't thnk of the Java for Absolute Value now but try something like
           if( (amount < 0.10) && (amount > -0.10) )    // Less Than 10 Pennies
                 System.out.println( "Correct Money");
          }

Similar Messages

  • Why can't my g3 work with my car stereo while connected with the usb cable? It works via the bluetooth, but I get no song info on the radio.

    Any ideas?

        Thank you for reaching out to us, jmush. There are so many options to listen to music from cars nowadays. It's awesome and really convenient. Unfortunately, some features may not work correctly due to software both from devices and headunits. While, bluetooth can display your phone name and contacts, it may not display song ID3 tags, etc.
    With regards to plugging it in via the USB cable, you can try setting your phone to storage mode, and the headunit may be able to read stored music found in your phone, but it may not be compatible. http://www.verizonwireless.com/support/knowledge-base-113331/
    Keep us posted!
    NicandroN_VZW
    Follow us on twitter @VZWSupport

  • I have a Seagate 3TB external hard drive and was using it with time machine on my old system with Snow Leopard and it was working smoothly. I have now upgraded to Mavericks and when I tried setting up time machine again, it did not work.

    The OS does not detect the drive when I start the system, but Disk Utility shows the disk as an external drive. I seem to be going around in circles. Please take a look at the following screen grabs for the errors I am getting.

    But When I verify The sub-partition in the Disk (disk4s2), it asks me to repair disk. When I try to repair disk, it gives me this error.

  • IE 8 Thin App package in not working on system with IE 10 installed

    We have published IE8 thin app package for our users. But today I noticed that after upgrading IE browser to version 10 it is not working. when we launch the application on system with IE 8 than it is working fine.
    It crashes on systems with IE10. Any idea why it is happening?
    Regards,
    VST

    Download the offline installer here: http://fpdownload.macromedia.com/get/flashplayer/current/licensing/mac/install_flash_playe r_11_osx.dmg
    If it won't download directly, right click and "Save as"
    Go to: Mac HD/Library/Internet Plugins
    Trash the Flash Player.plugin file from there
    Go to: Mac HD/Library/Application Support/Adobe
    Trash the Flash Player folder (the whole folder)
    Empty the trash
    Reboot
    Mount the DMG and run the installer.
    BEFORE opening any Flash content in Safari, open Safari>Preferences, and check the Security tab to make sure "Allow all other plugins" is checked.

  • Statements which should not use in BADIs

    One Question ...
    Any specific statements are there which we should not use in BADIs ?
    Thanks

    Hi,
    BADI is an OO ABAP approach, therefore any statement which won't work in the OO context won't work here! Instead breaking your head on what is to be used? and what not? , run a "code inspector" and "EPC" on your implementation class.it will show list of illegal statements in your BADI implementation
    Regards
    Naren

  • Configuring an online shop / payment system with Muse / BC

    I am trying to configure an online shop and integrate it with a Muse site.
    I am going to try and keep this short and to the point. The client sells therapy, hour slots of either Acupuncture, Chiropractor, Holistic medicine etc, they want the following system on their site.
    Customers browse available therapies on a website > They select date >  they select a time slot > they pay for a booking.
    At first I looked at the events booking system with BC, but this didn’t work, I couldn’t work out how to configure the events booking module to have time slots. Plus a Calendar / date picker is useless as the individual therapists work very specific hours / days from month to month.
    There is third party time slot booking software, but it’s very price, and only a few offer free trial (I need to see how it will integrate with a Muse site first).
    Then I though SHOPPING CART!!! For instance the variables I have can easily be interchanged, for size / colour etc.
    For example:
    CATALOG: List of various therapies
    PRODUCT: Acupuncture (for example)
    ATTRIBUTE: February 28th (example)
    OPTION: Drop down time slots available - 9am - 10am
    PAYMENT!
    I tried to configure this with BC at first (I’ve never used it) and at first I found it a little complex. Then I found Ecwid, they are brilliant, you sign up for a free account, you build the shop online then Ecwid generates the code and you simply copy and embed it within Muse. Its beautiful. Sadly to be able to use the product variation (different times slots ensuring only one is in stock) you need to upgrade to a Business account, with is quite expensive.
    So I have gone back to BC. I am slowly making progress, setting up the shop and integrating it with Muse, but I’m new to BC and my progress is slow. As much as I see the value and validity in learning BC I am faced with derogatory comments on the BC forum. I’ll be honest I have tried to ask advice a couple of times with BC or with reference to it, and it’s as if as soon you mention you use MUSE it is assumed you must be an idiot. One comment referred to us as the “Muse generation - point and click”. I am learning BC, I’ve been on it two weeks, I am getting there, but the client is paying peanuts for this site (I should have re-negotiated) and MOST IMPORTANTLY I am also beginning to think that the clients are going to struggle using the BC interface to populate their product list.
    To summise:
    I need an online ‘plug and play’ shopping cart for a Muse website, that my client can understand? They will be frightened by BC
    Can anyone recommend a solution that can be configured as above?
    BTW: Just becuase I work with Muse, I'm still allowed to play with the Big boys toys ;-)

    Hi Irene,
    I did and I didn't. I gave up on BC as I really didn't think the client would be able to cope with the administration of it. But I did find a great plug in system called Booking Bug. You do have to pay a subscription for it (but there is a free trial), but it's a simple product, effective too. You build it online, it generates the html code for you and you jsut insert it in the relevant position on the relevant page.
    I do believe that as a designer who enjoys working with Muse, it's worth getting to know Business Catalyst inside out. Muse lacks some powerful tools that some of the other systems (Wordpress etc) seem to benefit from. However it's all there in BC, it's just going to take me sometime to get to know it.
    But I can recommend Booking Bug.

  • I have found an issue with MS13-098 which causes systems to be renamed to MINWINPC

    I have found an issue with MS13-098 which causes systems to be renamed to  MINWINPC.  The issue has been reported in Japanese by Microsoft. The translation is:
    Phenomenon
      In Windows Server 2008 or Windows Vista, you might not be able to log an error appears to apply the new update the following programs, if you try to log on after the restart. •  MS12-024 (KB2653956)
    •  MS13-098 (KB2893294)
     Error message displayed is as follows.
     Incorrect password or user name
      Back to the top | feedback
    Collapse image  Cause
      This behavior occurs when you apply the update KB2653956 in the state of some data is damaged following registry key, or does not exist.
     HKEY_LOCAL_MACHINE \ SCHEMA \ wcm :/ / Microsoft-Windows-CoreOS? ...
     Any string will contain the part of the ... Note:.  Also, make sure to load the SystemRoot% \ system32 \ SMI \ Store \ Machine \ SCHEMA.DAT file% if the HKEY_LOCAL_MACHINE \ SCHEMA does not exist.
     When you apply the update of KB2653956 in the state where the registry key is not present, the value of the following registry is changed to MINWINPC, logon will not be able to.
    •  HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ ComputerName \ ActiveComputerName
    •  HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ ComputerName \ ComputerName
      Back to the top | feedback
    Collapse image  Solution
      If this occurs, change to the correct computer name the value of the ComputerName registry and ActiveComputerName start in safe mode, has been mentioned above, and then restart.
      Back to the top | feedback
    Collapse image  Workaround
      To prevent this phenomenon occurs, you download and run the System Update Readiness Tool from the following KB.
     http://support.microsoft.com/kb/947821
     By performing the system update Preparation tool registry that is described in Section Symptoms are repaired.
     If the repair is made, starting with log Recreated missing key as the following WinDir% \ Logs \ CBS \ CheckSUR.log file% is recorded.
     Recreated missing key:? Wcm :/ / Microsoft-Windows-CoreOS ... \ metadata \ elements \ ComputerName
     In addition, regardless of the presence or absence of entry damaged Microsoft-Windows-CoreOS, you can set the value of the ComputerName key in this tool.  For this reason, the following log is recorded in the CheckSUR.log.
     Recreated value: @ _type.
     Recreated value: @ dataOnly.
     Recreated value: @ default.
     Recreated value: @ description.
     Recreated value: @ displayName.
     Recreated value: @ handler.
     Recreated value: @ legacyName.
     Recreated value: @ legacyType.
     Recreated value: @ migrate.
     Recreated value: @ scope.
     Recreated value: @ xsd: type.
      Back to the top | feedback
     Note: This is a "FAST PUBLISH" article created directly from within the Microsoft support organization.  It contains information in response to emerging issues are listed.  As a result of the speed of information provided may be
    typographical errors are included in the article, you might be revised at any time without prior notice.  For other considerations, and use conditions
     Please refer to.
      Back to the top | feedback
    Collapse image  Property
      December 11, 2013 - Revision: - Last Review: 2901584: 4.0 Document Number
      This document that was written about products for.
    •  Windows Vista Business
    •  Windows Vista Business 64-bit edition
    •  Windows Vista Enterprise
    •  Windows Vista Enterprise 64-bit edition
    •  Windows Vista Home Basic
    •  Windows Vista Home Basic 64-bit edition
    •  Windows Vista Home Premium
    •  Windows Vista Home Premium 64-bit edition
    •  Windows Vista Starter
    •  Windows Vista Ultimate
    •  Windows Vista Ultimate 64-bit edition
    •  Windows Server 2008 Datacenter
    •  Windows Server 2008 Datacenter without Hyper-V
    •  Windows Server 2008 Enterprise
    •  Windows Server 2008 Enterprise without Hyper-V
    •  Windows Server 2008 for Itanium-Based Systems
    •  Windows Server 2008 Foundation
    •  Windows Server 2008 Standard
    •  Windows Server 2008 Standard without Hyper-V
    •  Windows Web Server 2008
    •  Windows HPC Server 2008
    •  Windows Essential Business Server 2008
    We are having the issue on hundreds of systems and I am rolling out the readiness tool mentioned above to prevent other systems from being affected.  In the mean time I have stopped deploying MS13-098 and am hoping Microsoft will go ahead and let all
    of their customers know about the problem instead of just one country.  Hopefully the original bulletin will be updated with this known issue.

    PPoj,
    Apple has offered replacement or pro-rated refunds in the US as a settlement of a class action lawsuit, not because of pride in their design-centric approach to their products. If you seek a similar replacement/refund program in India, then the odds are pretty good that you’d need a similar legal approach with which to convince Apple to offer a similar program there. If you’re unwilling to wait for such an event, then you can purchase a replacement power cable now, and hope for a pro-rated refund at some point in the future.

  • I have my iPhone 4s backed up on my mac but it seems it was encrypted with a password which i do not remember is there any other option to retrieve to the backup without restoring the device as a new one. Also I do not have access to a windows system.

    I have my iPhone 4s backed up on my mac but it seems it was encrypted with a password which i do not remember is there any other option to retrieve to the backup without restoring the device as a new one. Also I do not have access to a windows system.

    Sorry no, if you don't knnow the encrypted password, then you can't use that backjup.

  • HT2801 I understand there is a way to use my Super Drive with my PC.  However, it requires a System OS Disk.  Which I never received.  Can you help me with this?

    I understand there is a way to use my Super Drive with my PC.  However, it requires a System OS Disk.  Which I never received.  Can you help me with this?

    Rick6812 wrote:
      I'm using Windows 8.1. 
    I do not know what you mean by a Windows 8.1.  Please clarify.
    The Apple superdrive is designed to be used with the following Macs.
    It will not work with any other Mac unless you perform this modification;
    http://www.tuaw.com/2012/04/02/use-the-macbook-air-superdrive-with-any-almost-ma c/
    Are you trying to get it to work with a PC? 
    Ciao.

  • Is it possible to integrate fingerprint to a car park with LV

    Sorry, i am new to LV. I would like to know Is it possible to integrate fingerprint device to lv car park?

    sorry for not being clear.
    Excually i want to develop a car park elevator using labview. And if the person wants to park the car, he would need to use his fingerprint to access the elevator and also remove the car, which would be done using LED. So, is it possible to use fingerprint device for it and is it possible to store the fingerprint in labview?
    Thanks alot guys.

  • I m having issues with the phone which i made a recording but the customer care support in our place donot seem to be of much help. i have told them nuumerous times that for better understanding i have made a video of it but no response.. really disspoint

    i m having issues with the phone which i made a recording but the customer care support in our place donot seem to be of much help.
    i have told them nuumerous times that for better understanding i have made a video of it but no response..
    really disspointed with your customer support.
    i have uploaded them in google docs..links below.. t
    he first one happened on 30th of april 2014   https://docs.google.com/file/d/0B6z0lUXVGPGrc0tXNnZFaDQ3WDg/edit
    the second happened today. i called customer care but no satisfactory respose either.  https://docs.google.com/file/d/0B6z0lUXVGPGrSldEeWQ3aGFhaDA/edit
    who is going to help me out and atleast pay attention to what my problem is. apple seems to ignore my attempts to show them what is the problem... the dont even want to see the videos.. !! disgusting.
    its still under warrenty. please help.

    Take your iPhone to an Apple Store or authorized service center in the country where you purchased the iPhone and they will look at it and replace it under warranty if applicable.
    If you cannot take it person contact them to determine how to send them your phone.
    You can't expect them to replace your iPhone without first examining it.

  • Integrating OIA with Remedy Ticketing system

    Hi,
    Did anyone tried to integrate OIA with Remedy ticketing system to send remediation actions via tickets to the appropriate group?
    I see that in several white papers that it's possible but could not find any good source to do the same.
    I also see the following in the OIA guide;
    To Create a Business Structure Hierarchy
    An n-level business structure hierarchy can be defined in Oracle Identity Analytics. A business structure can have various child business structures under it.
    1. Log in to Oracle Identity Analytics.
    2. Choose Identity Warehouse > Business Structures.
    WorkingWith Business Structures
    36 Oracle Identity Analytics User's Guide • August 2010
    3. ClickNew Business Structure to create a business structure.
    The Create Business Structure window opens.
    4. Complete the form as follows:
    ■ Name - Type the name of the business structure.
    ■ Parent - Select the parent business structure from the drop-down menu.
    *■ Enter the Service Desk Tick # - Each business structure can be associated with a unique*
    service desk ticket number if an integration between Oracle Identity Analytics and a
    ticketing system is used in your organization.5. ClickOK.
    Can anyone explain what is this Service Desk Tick # here?
    Thanks
    Arun

    You should post your question to the SBO forum:
    SAP Business One SDK

  • TS1424 itunes purchase security questions & answers reset and answered correctly.  Can not log in with updated answers which state one or both are incorrect.

    Can anyone help with this situation?
    itunes purchase security questions & answers reset and answered correctly.  Can not log in with updated answers which state one or both are incorrect.

    You need to contact Apple to get the questions reset. Click here, phone them, and ask for the Account Security team, or fill out and submit this form.
    (94948)

  • Helpdesk ticket system for use with SBO

    Hello Experts,
    I am searching for a helpdesk - message or ticket system for or own use, to improve our customer support.
    At this moment we simply use the email (pop inbox) and the SBO service module, but we want a more sophisticated solution.
    I would Like:
    Automatic reply and a tracking system for ourselve and our customers to follow the processes of a message.
    Connection with our a AR invoicing system.
    What systems can you experts advise me for further investigation?
    Kind regards
    Henk Tjassing

    Project Management for Business One, developed by Maringo, is an Add-on that you can use.
    Kind regards
    Carin

  • Systems with CSA not boot

    After update from 6.0.1 to 6.0.2 some systems with CSA cun`t boot.
    If manualy delete agent (in safe mode) - everething ok.
    Few systems butable, but agent process takes more then 90% processor resourses.
    Logs on CSA MC are clean
    Any ideas? Manual uninstall agent on few hungreds workstaitions is unreal...

    There has been a recent bug discovered with interaction of CSA and Windows 7 hosts where a file access control rule which implements digital suignature checking can cause a system to "hang" after entering credentials.  The bug is CSCtg98849.  The following workaround is provided in the bug:
    Edit the "Base - Digital Signing of Downloaded Executables" rule module and disable the file access control "Send downloaded executables for scanning if opened for read".
    Save the change.
    Generate rules and deploy to affected hosts.
    [Wrap text]  [Edit this enclosure]
    Release-note: Added 05/25/2010  06:26:54 by scfringe
    [Unwrap text]  [Edit this enclosure]
    Release-note: Added 05/25/2010  06:26:54 by scfringe
    [Unwrap text]  [Edit this enclosure]
    SS-Review: Added 05/25/2010 06:13:20  by scfringe
    [Wrap text]  [Edit this enclosure]
    SS-Review: Added 05/25/2010 06:13:20  by scfringe
    [Unwrap text]  [Edit this enclosure]
    SS-Review: Added 05/25/2010 06:13:20  by scfringe
    There has also been an issue seen where agents that have not received the new 6.0.2 binaries, but have had 6.0.2 rules pushed encounter issues.  The workaround in this instance is to schedule an update for the agents.
    It would be advatageous to open a service request with TAC to effectively diagnose the issue, and ensure this is the proper bug for the behavior.
    Scott
    What
    How Bad
    Who
    Versions
    Status
       A-Assigned
    Found
    customer-use
    Original-found
    customer-use
    Project
    CSC.security
    Product
    csa
    Component
    client
    Software
    none
    Obs-software
    none
    Hardware
    none
    Keyword
    none          
    Priority
    P3
    Severity
       severe (Sev2)
    DE-priority
    2
    Dev-escape
    Y
    BadCodeFlag
    N
    DE-manager
    ibonias
    DTPT-manager
    vidhya
    Engineer
    bipswain
    Submitter
    scfringe
    Assigner
    pgiang
    Version
    006.000(002.126)          
    Original-version
    006.000(002.126)
    To-be-fixed
    006.000(002)          
    History
    Histogram of CSCtg98849: Covering 2 days and counting, currently in A-Assigned state.
              N -> A [    0] |
              A ->   [    2] ------------------------------------A-----------------------------------[100.00%]
                              <-----------------------------------+----------------------------------->
                        25-May-2010                         26-May-2010                         27-May-2010
    cdreier
    05/26/2010  09:52:05 
    Headline:
    CSA: Windows Login Hangs or Takes  Excessive Time with CSA Enabled   --> CSA: Windows 7 Login Hangs or  Takes Excessive Time with CSA Enabled
    cdetsbsi
    05/25/2010  10:08:31 
    Trouble-Tickets:
    --> 614262487
    pgiang
    05/25/2010  06:35:29 
    Assigner:
    --> pgiang
    pgiang
    05/25/2010  06:35:29 
    Assigned Date:
    --> 05/25/2010 09:35:29
    pgiang
    05/25/2010  06:35:19 
    Engineer:
    --> bipswain
    pgiang
    05/25/2010  06:35:01 
    Status:
    N   --> A
    pgiang
    05/25/2010  06:35:29 
    To-be-fixed:
    --> 006.000(002)
    cdetsbsi
    05/25/2010  06:29:31 
    Trouble-Tickets:
    --> 614327539
    cdetsbsi
    05/25/2010  06:29:31 
    Urgency-desc:
    NA   --> P3
    scfringe
    05/25/2010  06:26:54 
    Note Title:
    --> Release-note
    scfringe
    05/25/2010  06:14:01 
    Summary:
    -->
    scfringe
    05/25/2010  06:13:20 
    RNE-Approval-Flg:
    N   -->
    scfringe
    05/25/2010  06:13:20 
    Note Title:
    --> SS-Review
    scfringe
    05/25/2010  06:12:14 
    Defect Created:
    -->

Maybe you are looking for