Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Number Systems Conversion

$
0
0
I'm Quang Pham, a computer science student at Palomar College. I'm having trouble developing a number systems conversion program in Java. This is what I've written so far:
/**
 * Write a description of class Decimal here.
 * 
 * @Quang Pham
 * @1/31/13
 */
import java.swing;

import java.util.Scanner;

public class Decimal
{
    
        public void getDec() 
        {
            String s1;
            s1 = JOptionPane.showInputDialog("Please enter the Decimal number you wish to convert.");
            Scanner in1 = new Scanner(s1);
            inDec = in1.nextInt();
        }
        public void toBin();  
        public void toHex();  
        public void outBin();
        public void outHex(); 
    
}

Does anybody know how to make the conversions? Thanks for any help.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>