p4 - import import import import import import import...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.*; import java.lang.String; import java.io.*; import java.text.*; import java.math.*; import java.text.DecimalFormat; import javax.swing.JOptionPane; //Jeremy Debruce //Professor Campbell //Computer Science One //Program4 / public class p4 { public static void main(String[] args) throws FileNotFoundException, IOException { int num; System.out.println("************************************************************"); System.out.println("* Maripot Carpet Store *"); System.out.println("*The purpose of this program is to compute Customer Bills *"); System.out.println("* JOptionPane, and *"); System.out.println("* reading from a data file. *"); System.out.println("************************************************************"); do { System.out.println(); System.out.println("\t1. JOptionPane"); System.out.println("\t2. Data File"); System.out.println("\tPlease enter 1, 2, and 3 to exit"); System.out.println(); S Scanner scan = new Scanner(System.in); num = scan.nextInt(); switch(num) { case 1: JOptionPane(); break; case 2: Data_File(); break; case 3: System.out.println("Thank You for using this program!"); break; default: System.out.println("Please follow directions \n" +" Only 1, 2, and 3 to quit.");
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
break; b } }while (num !=3); } public static void JOptionPane() { //strings String inputStr; String outputStr; S //variables int customer, sq_yd; double cost_per_sq_yd, labor_per_sq_yd, prep_cost, discount; double cost_for_carpet, cost_for_labor, tax_on_carpet, charge_to_customer, tax; c //Please enter the following input inputStr = JOptionPane.showInputDialog("Enter Customer");
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/17/2011 for the course COMP CS 2301 taught by Professor Staff during the Spring '10 term at Kennesaw.

Page1 / 5

p4 - import import import import import import import...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online