Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

6. Identify seven types of hidden histories.

Answered: 1 week ago

Question

What is human nature?

Answered: 1 week ago