# Lab 5 â€“ Java Sequences

## Assignment needs to be done in IntelliJ IDEA with SDK.

Create a Java program that prompts a user to input the radius of a circle and computes the circleâ€™s area and perimeter.

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

public class Main {

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

public static void main(String[] args) {

// TODO your code goes here

}
}

## Example Output

Circle program

The area of a circle with a radius of 3.0 is 28.274333882308138

The perimeter of a circle with a radius of 3.0 is 18.84955592153876

Process finished with exit code 0

# Lab 6 â€“ Java Decisions

## Assignment same program….but needs to be in a different file

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.

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

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