My class recently switched from python to java. I feel like they just threw us in and said " oh they know python so they must know java" My first assignment is quite simple but having no prior knowledge of java i'm lost.
basicly "PizzaRun is a simple program that calculates the number of pizzas to buy based on the sum of the slices entered on the command line arguments after the first argument, the price per pizza." link here
This is what I have so far.
/**
* @author *
*/
public class PizzaRun {
public static void main(String[] args) {
ArrayList<Ineger> pizza = calcWholePie( nSlices );
}
public static int slicePerPie = 8;
public static void calcWholePie(int nSlices) {
int pies = 0;
while(nSlices > 0) {
if(nSlices > slicePerPie) {
nSlices = 8 - nSlices;
pies = pies + 1;
} else {
pies = pies + 1;
}
}
System.out.println("buy" + pies + "pizzas");
}
}