
Gross And Dozens Design and implement a class called GrossAndDozens to convert a given number of eggs into the number of gross, the number of dozens, and to the number of left over eggs. If you have N eggs, then you have N/12 dozen eggs, with N%12 eggs left. Write a program that asks the user how many eggs he has and then tells the user how many dozen eggs he has and how many extra eggs are left over. A gross of eggs is equal to 144 eggs. Extend your program so that it will tell the user how many gross, how many dozen, and how many left over eggs he has. For example, if the user says that he has 1342 eggs, then your program would respond with
Your number of eggs is 9 gross, 3 dozen, and 10
since 1342 is equal to 9144 + 312 + 10.

import java.util.*;
public class GrossAndDozens {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("How many eggs do you have: ");
int eggs = input.nextInt();
int gross = eggs / 144;
int aboveGross = eggs % 144;
int dozens = aboveGross / 12;
int extras = aboveGross % 12;
System.out.println("Your number of eggs is: "+gross+" gross, "+dozens+" dozen, and "+extras);
}
}