Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I( :Assignments-cse x D Assignment 4-Make ea Mail. Alabdulqader,h) Doodle 1:1 edu/bbcswebdav/ /pid-6282030-d dt-content-rid-5008806 62447/Assignmen Grammarly T TED: Ideas worth. Dictionary.com | F. Thesaurus.comNew Tab

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
I( :Assignments-cse x D Assignment 4-Make ea Mail. Alabdulqader,h) Doodle 1:1 edu/bbcswebdav/ /pid-6282030-d dt-content-rid-5008806 62447/Assignmen Grammarly T TED: Ideas worth. Dictionary.com | F. Thesaurus.comNew Tab Assignment 4: Make It Work A store sells FroYoCups with space for 5 Fooditems (FroYo or Toppings). The store owner hired a student during summer of 2018 to help with a simple program that can help to quickly print out a customer's order and the detailed items that a customer has added to their cup, including calories and taxes for a detailed bill. Sadly, the student went on to eat too much of the free froyo (brain freezel!) and left the code only partially finished. taro flavors of froyo are missing While all toppings were found in the code, it seems that the vanilla, chocolate, and Vanilla has a weight of 72 g and 114 kcal. Chocolate weighs as much as vanilla and has 115 calories. . Taro weighs as much as the other two and has 95 calories Use the provided code snippets with a Main class to demonstrate with 3 different FroYo/Topping combinations of your choice how you were able to take the given code and turn it into a working program. Note: are no comments included in the code to make you go through and comment yourself as you work your way to an implementation . There are some "dummy" values utilized in the demo code, and some classes might be missing too. Fix them also. .. Mal-marwan alab. Academic Calendar ic x Assignments blackboard.cmich.edu/b pid-628203 Apps Netflix- Watch TV. ..speaking24.comG Login | Grammarly TED: Ideas worth package food ; publie abstract class FoodIten implements GetFoodDetails ( private String name i private int caloriesPerServing i private double weightPerserving public Fooditem String name , int caloriesPerserving, d ouble weightperServing this , name name ; this caloriesPerServing caloriesPerServing this weightPerserving veightPerserving public string getName return this name public int getcaloriesPerServing O ( return caloriesPerserving eoverride public String tostring O return this ..getsane () + " { * getcalories () + kcal /-+ getNeight () +g)"; al getheight +"g)" o. Mail-marwan alabdul 7 Academic Calendar I c x | th Assignments-CPS 18 x D https://blacbo e https://blackboard.cmich.edu/bbcswebdav/pid-6282030-dt-content-rid-50088 Netflix - Watch TV... speaking24.com-.. GLogin| Grammartly T TED: Ideas worth i Apps package food; public interface GetFoodDetails ( Login | Grammarly T TED: Ideas worth.. int getcalories double getWeight I full kcals I/ weight in grams package food publie interface Toppingtist ( public static final Topping HANDMS ne Topping (Ms24048)1 public static final Topping REESESnewTopping "Reeses Mini Cups20039) public static final Topping ALMONDS w Topping ("Raw Alnonds 16328)1 publie statie final Topping PEANUTS RAM-new Topping ("Raw Peanats 16128) publie static final Topping PEANUTS ROASTED nev Topping(Roasted Peanuts 248 42) 2 3 4 5 6 Q w E cademic CalenderIC Assignments-CPS18 XD htps/blackboard.em xs Mail-Alabdulgader blackboard Netflix-Watch TV. speaking24.com Login | Grammarly TED: Ideas worth package food public class Froyo extends FoodItem ( public Froyo (String name int caloriesPerserving , double weightPerServing) ( super name, caloriesPerServing weightPerServing override public int getcalories return 0 eoverride public double getweight return 0 2 3 4 7 tab o. Mail. marwan alabdul Academic Caledar l c D h x E Assignmerts-CPS18 x https //blackboard.cmch.edu.b t Apps Netfilk- Watch TV speking24.com package shoppe; public interface Checkout ( Login1Orammary TED Ideas worthDictionary.com |F double PRICE_PER z 1.00 double TAX RATE 6: 1 6 tax rate int MAX ITEMS 5; /1 5 items that fit in a cup int getweight int totalcalories double weightToDollars (double weightInGrams) double taxAmount (double preTaxDollars) i WNBNKBUHKO.ks ^ esc Assignments-CPS 18 Xhttps://blackboare a https://blackboard.cmich.edu/bbcswebdav/pid-6282030-dt-content-rid-50088076 Di Apps Netflix-watch TV-n speaking24.com--@Login l Grammarly package shoppe; import java.util.ArrayList TTED:Ideas worth- import food. FoodItem public class FroYoCup implements Checkout ArrayList contents public FroYocup this.contents new ArrayListoo public boolean addItem FoodItem item)f if ( contents . size() contents public FroYocup this.contents new ArrayListoo public boolean addItem FoodItem item)f if ( contents . size()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

Explain how not all labor is physical.

Answered: 1 week ago