Search:

Type: Posts; User: divebomb33

Search: Search took 0.10 seconds.

  1. Re: Why so many decimal points in my basic code?

    I didn't deny getting great advice. I'm just not grasping the subject matter the way I had hoped. I'm looking for what I think is a few lines of code that will make my program work. I just don't know...
  2. Re: Why so many decimal points in my basic code?

    I understand. I believe the mod suggested I do that. What I have so far shows no errors, however the output doesn't show the way I'm looking for-



    import java.text.*;
    import java.util.Scanner;...
  3. Re: Why so many decimal points in my basic code?

    Well I imported this-


    import java.text.*;

    I also added


    DecimalFormat formattedDollars= new DecimalFormat("$#,##0.00");
  4. Re: Why so many decimal points in my basic code?

    I made the following changes but they still yield this output message
    Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - cannot find symbol
    symbol: class...
  5. Re: Why so many decimal points in my basic code?

    Any help guys?
  6. Re: Why so many decimal points in my basic code?

    Here is what I have so far that is fully functional. All I'd like to do is possibly add-


    import java.text.DecimalFormat;
    import java.text.NumberFormat

    in conjunction with what I already...
  7. Re: Why so many decimal points in my basic code?

    I also found this link which looked helpful but again don't grasp where to put code like this with my code
    Make cents with BigDecimal - JavaWorld
  8. Re: Why so many decimal points in my basic code?

    Here's what I tried recently-

    import java.util.Scanner;


    public class Commission{

    public static void main (String[] args){
    Scanner kb = new Scanner(System.in);
    double...
  9. Re: Why so many decimal points in my basic code?

    I've been trying to add the code mentioned but I'm struggling to put it in the right places.
  10. Re: Why so many decimal points in my basic code?

    The problem I'm having is each of you pointed out several techniques to help me get my desired results. I'm so new at this that I have no idea where the suggested code might go in conjunction to my...
  11. Re: Why so many decimal points in my basic code?

    Can either of you show me how I incorporate your suggested code into what I already have in my first post? Thanks in advance!
  12. Re: Why so many decimal points in my basic code?

    This looks extremely helpful. The only problem I'm having is where to place the code you described in conjunction with my code. Any help you could offer would be amazing!
  13. Re: Why so many decimal points in my basic code?

    Also my output looks like this-
    run:
    What is your fixed salary?
    50000
    Your fixed salary is $50000.0
    With the current commission being 10% of total sales, your total annual compensation is...
  14. Why so many decimal points in my basic code?

    A program I've been working on needs to calculate a number(salary), add a 10% commission to the salary and output to the user the total annual earnings. My programs gets those results, however the...
Results 1 to 14 of 14