*Watch copying and pasting the quotation marks, you may have to retype them to avoid an error
————–Code Screenshots————



———————Beginning of Source Code————————-
/****************************************************
Programmer: Akinwale Owi
Company:Dagba Computers
Program Description:Format Doubles to Dollars
***********************************************************/
package straightcash;
//imports
import java.text.NumberFormat;
import java.util.Scanner; //scanner to read in values
import java.util.Locale; //for location
public class StraightCash
{
public static void main(String[] args)
{
//Creating a Scanner
Scanner dirtyMoney = new Scanner(System.in);
//asking user for number
System.out.println(“Please enter a number to change to dollars”);
//variable to hold dollars
double preFormat = dirtyMoney.nextDouble();
//printing out preDollars to check
System.out.println(“Before formatting = ” + preFormat);
//creating locale for U.S. dollars
Locale US = new Locale(“en”, “US”);
//Creating Number Format Object for US
NumberFormat form = NumberFormat.getCurrencyInstance(US);
//Printing out formatted dollars to check
System.out.println(“Formatted for US Dollars = ” + (form.format(preFormat)));
}//end of main
}//End of program/end of StraightCash class (contains main)
———————End of Source Code——————————-