[ad_1]
import java.util.Scanner;
public class PizzaPerfecter {
public static void main(String[] args) {
scanner sc = new scanner(System.in);
System.out.println("Please enter the number of slices you would like: ");
}
public static int readInt( String message ) {
Scanner sc = new Scanner(System.in);
System.out.println( message );
return sc.nextInt();
}
}
Create a class called PizzaPerfecter.
Paste a readInt method into it.
Write a main method that uses the readInt method to ask the user how many equal
slices they would like a circular pizza divided into, and stores the value in a local variable.
Write a method that accepts a parameter of type int representing the number of slices
desired. The method should return the angle of each slice in degrees. Note: there are 360
degrees in a circle.
The main method should display a message describing the result of a call to this
method. The expected output (where 12 is the number entered by the user) is shown
below:
Please enter the number of pizza slices you would like:
12
Each slice will arc through 30.0 degrees.
[ad_2]