Question: I need help editing my code public class Eggs{ { public static void main(String args[]) { scanner scan = new scanner(System.in); System.out.print(Enter number of Eggs

![static void main(String args[]) { scanner scan = new scanner(System.in); System.out.print("Enter number](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5100084f63_44766f50fffe6872.jpg)
I need help editing my code
public class Eggs{
{ public static void main(String args[]) { scanner scan = new scanner(System.in); System.out.print("Enter number of Eggs : "); int totalEggs = scan.nextInt();
int extra = totalEggs%12;
double ecost = (double)extra * 45 / 100;
double cost = totalEggs/12 * 3.25 + ecost; System.out.println(" You ordered "+totalEggs+" eggs."); System.out.println("That's "+totalEggs/12+" dozen at $3.25 per dozen and " +extra+" loose eggs at 45.0 cents each for a total of $"+cost+".");
}
}
Programming task The class will be called Eggs java. Meadowdale Dairy Farm sells organic brown eggs to local customers. They charge: -$3.25 for a dozen eggs-45 cents for individual eggs (not part of a dozen) As a special re-opening promotion, Meadowdale Dairy Farm will floor the price of the eggs (only charge the whole dollar amount) Write a class that accepts only one input from the user: for the number of eggs in the customer's order. After this, display the amount owed with a full explanation. Use arithmetic operations to calculate the correct dozens/loose eggs and total cost. For example, typical output might be: You ordered 27 eggs. That's 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents per each for a total of $7.85. With the special promotion, you pay $7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
