Question: Complete Java programs public class PennySpender { /** * @param args */ public static void main(String[] args) { double weight,price, cost; String item; //input
Complete Java programs
publicclass PennySpender {
/**
*@param args
*/
publicstaticvoid main(String[] args) {
double weight,price, cost;
String item;
//input
item ="A";
weight = 2.0;
price = 1.98;
//process
cost = weight * price;
//output
System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
System.out.println("Penny Spender Supermarket");
System.out.println("Produce Department");
System.out.println("Item tWeight tCost/lb tCost");
System.out.println(item +"t" + weight +"t" + price +"tt" + cost);
System.out.println("Thankyou!");
System.out.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
}
}
Redo-PENNY SPENDER JAVA PROGRAM using JOptionPane
Step by Step Solution
3.36 Rating (146 Votes )
There are 3 Steps involved in it
J PennySpenderjava 1 Source code answer to redo PennySpender program with JOptionPane 2 impor... View full answer
Get step-by-step solutions from verified subject matter experts
