Java Lab 6

I need help with a Software Development question. All explanations and answers will be used to help me learn.

Lab 6 – Java Decisions

Assignment

Create a Java program that prompts a user for the cost of a product and then prompts the user for one of three shipping options

  • Standard shipping (enter ‘1’) for $7.95
  • Express shipping (enter ‘2’) for $13.95
  • Priority shipping (enter ‘3’) for $23.95

The program then prints the cost of the product, the cost of shipping, and the total cost.

Start your program as follows:

package edu.cscc;
import java.util.Scanner;

// TODO add comments with your name and the purpose of the program
public class Main {

private static Scanner input = new Scanner(System.in);

public static void main(String[] args) {

int shippingType;

double shippingCost, productCost, totalCost;
// TODO your code goes here

}
}

Example Output

Shipping costs

Enter the cost of the product ordered: 157.90

Standard shipping (enter ‘1’) for $7.95

Express shipping (enter ‘2’) for $13.95

Priority shipping (enter ‘3’) for $23.95

Enter your choice (1, 2 or 3): 2

The cost of the product is 157.9 plus shipping of 13.95 equals 171.85

Process finished with exit code 0

Quite Quote

QUICK QUOTE

Approximately 250 words

custom essy

Order an essay from experts and get an A+

Address: 679 Dola Mine Road Raleigh
Email: support@academic-research-pro.com
Website: www.academic-research-pro.com
Toll Free: +1800-672-9816

Disclaimer

All Papers produced are meant for reference purposes only. Academic Research Pro does not give the consent and authority to copy and reproduce the papers.

Terms and Conditions | Privacy Policy 

Banner of payment methods of cheap essay writing service