Question: Write a Java program: Wally's Wholesale Widgets creates and sells widgets. He sells them according to the following price structure: 1-99 - $1.00 each 100-199
Write a Java program:
Wally's Wholesale Widgets creates and sells widgets. He sells them according to the following price structure:
1-99 - $1.00 each
100-199 - $0.95 each
200-299 - $0.90 each
300-399 - $0.85 each
400+ - $0.80 each
Program Inputs:
Customer account number
Customer first name
Customer last name
Number of widgets purchased
Calculations:
Determine the total
Program Outputs:
[Account number] - [Customer first name] [Customer last name] - [Widgets purchased] - [Total price]
Sample output:
123456789 - Marvin Miller - 5 - $5.00 I have started the program; I am just not sure where to go from here / next steps would be.
import javax.swing.JOptionPane; // Needed for JOptionPane
/** This program is used to calculate the sale of widgets. Allowing the customer input an account number, along with their name to calculate the total owed. */
public class Wholesale { public static void main(String[] args) {
double accountNumber; //to hold the account number double firstName; //to hold customers first name double lastName; //to hold customers last name double widgetsP; //to hthe number of of widgets sold String input; //to hold the users input } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
