Question
a. Create a method to calculate the price of a pizza and return it as a double. The method should take at least 3 parameters:
a. 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.
b. 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 code is not valid. Create an app which makes 2 pizzas, one with a valid code and one without, and describes them at the console. GUI in Java
c. Create an app that uses the methods you created in #a and #b. Allow the user to enter values in four text fields for each of the parameters you need (size, toppings, crust style, and coupon code). Display the resulting price.
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