Results 1 to 3 of 3
  1. #1
    MomenT is offline Member
    Join Date
    Sep 2008
    Posts
    25
    Rep Power
    0

    Default Need help with this

    Hello people.. I need help with this scenario..

    A customer will be given discounts based on the following conditions:
    a) 10% discount if he buys more than $500
    b) 5% discount if he buys more than $300
    c) 2% discount if he buys more than $100
    d) No discount if he buys less than $100

    I can do it with the If-else statement but had problems with Switch statement and JOptionPane

    If anyone could be so kind to help me.. thank you.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default

    Homework, huh? Why don't you set the ball rolling by posting your best efforts so that we can see exactly what you're having trouble with.

    luck, db

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    What you have tried up to now? You should something first, no one here write codes for you. Show your code here if you stuck, and explain what you really want to know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •