Give me feedback

BASIC PROGRAMMING - Compiler error

Trying to write code for an assignment

LemonadeStand.java
/** * Add your code here * Any language, just go for it. */ //Define the class name as LemonadeStand public class LemonadeStand{ //Define a main method public static void main(Strings[] args){ int numSales = 10; double price = price(); double total = numSales * price; printTotal(numSales, price, total); } public static double price(){ return 3.5; } public static void printTotal(int numSales, double price, double total){ System.out.println("We sold " + numSales + "units at $" + price + "each, which totals $" + total); } }

Reactions 0 reactions

No reactions yet, be the first: comment or tweak the code

Comment on this code:

Please Login or Register to leave a comment.