Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java testing pizza joint question using junit: A soccer-themed pizza pub in Belfast creates new pizzas from unique combination of toppings, and gives a new

Java testing pizza joint question using junit:

A soccer-themed pizza pub in Belfast creates new pizzas from unique combination of toppings, and gives a new name. These pizzas are always sold for $5.95, however the cost for each pizza changes depending on the ingredients used. You are to create an application using object oriented programming which allows the creation of new pizzas using lists of ingredients, and computes the cost.

Ingredient List

Name Price
Dough 0.50
Crusty dough 0.70
Extra crusty dough 0.70
Meat 1.00
Feta 0.25
Cheddar 0.20
Mozzarella 0.20
Cheese Curds 2.00
Egg 0.20
Mayo 0.05
Mustard 0.03
Sour Cream 0.03
Sriracha 0.03
Arugula 0.25
Black Garlic 0.25
Chives 0.05
Iskander special 0.12
Pickle 0.03
Spinach 0.20
Guinness roasted beer 0.01
Belfast grilled soccer ball 0.25
Tomato 0.07
Fries 0.30
Gravy 0.10

You are to test the correct usage of your application by assembling five pizzas:

Name Ingredient List Price
Chavver off chav Crusty dough, meat, Feta, Mayo, Mustard, Arugula, Fries 2.58
Whatcha starin at mate Extra crusty dough, meat, Cheddar, Egg, Iskander special, Fries 2.52
Ya from belfast eh Dough, meat, Iskander special, Tomato, Guinness roasted beer, Belfast grilled soccer ball, Fries, Gravy, Cheese Curds 4.35
Arsenal ist da bast Dough, meat, Feta, Mustard, Sour Cream, Chives, Pickle, Fries 2.19
I betcha never been to cork Dough, meat, Mozzarella, Mayo, Sriracha, Black Garlic, Spinach, Fries 2.53

You should construct the pizza, and verify through tests that the cost matches what is expected.

You should also appropriately handle the case of attempting to use ingredients which do not exist.

Finally, construct 3 pizzas with names, ingredients and prices, and verify the correct cost is computed.

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

Step: 3

blur-text-image

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

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago