/** * File: ExpMain.java * * Solves programming problem 20, page 294 of "An Introduction * to Object-Oriented Programming with Java" (3rd Ed. Update), * by C. Thomas Wu. * Homework assignment 4, CSC 211-101, Fall 04/05. * * @author G. Andrus * @version 10-21-04 */ import javax.swing.*; import java.text.DecimalFormat; public class ExpMain { public static void main(String[] args) { DecimalFormat nf = new DecimalFormat("0.00"); Expressimo cof = new Expressimo(); // display results JOptionPane.showMessageDialog(null, "\tType: " + cof.getType() + "\n" + "\tService: " + cof.getService() + "\n" + "\tWeight: " + cof.getWeight() + " oz" + "\n" + "TOTAL FEE $ " + nf.format(cof.getFee()) + "\n"); System.exit( 0 ); } }