Question
1. Create a method to calculate the price of a pizza and return it as a double. The method should take at least 3 parameters:
1. Create a method to calculate the price of a pizza and return it as a double. The method should take at least 3 parameters: Size, toppings, and crust style. Create an app which makes 3 pizzas and describes them at the console.
2. Create a method to validate a coupon code passed to it. The code should be a String and the method should return a double representing the value of the coupon. Pick a few valid codes and assign them each a discount value. Return 0.0 if the coupon code is not valid. Create an app which makes 2 pizzas, one with a valid coupon code and one without, and describes them at the console.
Please do this in Eclipse and leave comments to explain what you're doing! It should be in Java and
* For the first question, there should be an app with a button to get display the 3 pizzas in the console
*for the second question, the coupon names can be anything of your choice but they should have a value (coupon is pretty much same as discount)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started