Results 1 to 3 of 3
  1. #1
    WastedxYears is offline Member
    Join Date
    Jan 2010
    Posts
    1
    Rep Power
    0

    Default A Number Converting Program!

    Hey guys,

    I am creating a cool number converting program that will be able to convert from a variety of different values like Inches to Centimeters or Celsius to Fahrenheit.

    I will have a main method that lets the users enter the number they wish to convert and then what base they wish to convert that number to.

    I will then have several methods that each will contain algorithms for converting the given number.

    So i ask you all here at the Java Forums, what is the best way to go about this? Am i doing it the most efficient way? Are there any things i should be mindful of? etc. Just general advice for my project would be wonderful!

    also, i created a method that returns a double value but i don't know how to print it out to the user. do i need to create a separate method for retrieving the returned value?

    i can post some of my code if you guys need to look at it or something.

  2. #2
    Dominique's Avatar
    Dominique is offline Member
    Join Date
    Jan 2010
    Posts
    1
    Rep Power
    0

    Default

    Your way of going about it sounds right.

    Perhaps you could post a bit of code so we can see what you mean by:

    also, i created a method that returns a double value but i don't know how to print it out to the user. do i need to create a separate method for retrieving the returned value?

  3. #3
    SwEeTAcTioN's Avatar
    SwEeTAcTioN is offline Member
    Join Date
    Oct 2009
    Posts
    69
    Rep Power
    0

    Default

    just put that method call in a System.out.println
    Are you suggesting that Cocunuts migrate?!! -Monty Python

Similar Threads

  1. Replies: 1
    Last Post: 08-07-2009, 12:14 PM
  2. Replies: 1
    Last Post: 11-03-2008, 02:38 PM
  3. Replies: 1
    Last Post: 07-02-2008, 01:58 PM
  4. Replies: 8
    Last Post: 04-22-2008, 03:21 AM
  5. Converting URL to URI
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-26-2007, 10:15 AM

Posting Permissions

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