Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a Snack class as a subclass of Product. In addition to description and pri

ID: 3819841 • Letter: W

Question

Write a Snack class as a subclass of Product. In addition to description and price, Snack has integer instance variable gramsOfFat.

Write a method getGramsOfFat.

Write a method isHealther which returns true if this Snack has fewer grams of fat than the parameter Snack.

Include toString and equals.

Snack should implement Comparable interface. Snacks are ordered first by gramsOfFat with the Snack with the fewer grams of fat coming first. If the grams of fat are the same order by price with the lowest price coming first, If prices are also equal, order alphabetically by description

Implement the Clonable interface.

Use the following files:

**************************Product.java***********************************

*********************SnackTester.java**************************

Explanation / Answer

*********************SnackTester.java**************************

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote