CorrectChange.java - /* * To change this license header,...

This preview shows page 1 out of 1 page.

/** To change this license header, choose License Headers in Project Properties.* To change this template file, choose Tools | Templates* and open the template in the editor.*/package correctchange;import java.io.PrintStream;import java.util.Scanner;/**** @author arjun*/public class CorrectChange {public static void main(String[] args) {Scanner TotalCost= new Scanner(System.in);System.out.println("Type in the TotalCost in cash ");String InputStuff = TotalCost.nextLine();Scanner TotalAmount = new Scanner(System.in);System.out.println ("Type in the Total Amount that you have paid");String InputStuff2 = TotalAmount.nextLine();CorrectChange.DoubleTotal(InputStuff, InputStuff2);CorrectChange.CalcChange(InputStuff, InputStuff2);}public static void DoubleTotal(String InputStuff,String InputStuff2){double TotAmount= Double.parseDouble(InputStuff2);double TotCost = Double.parseDouble(InputStuff);}public static void CalcChange (String InputStuff,String InputStuff2){double TotAmount= Double.parseDouble(InputStuff2);double TotCost = Double.parseDouble(InputStuff);double change = TotAmount - TotCost;
End of preview. Want to read the entire page?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A
Tags
editor, Project Properties, int dollarAmount

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture