Question

Write a graphics program to calculate the cost per square inch of a circular pizza and...

Write a graphics program to calculate the cost per square inch of a circular pizza and use graphics .py libaray. Accept as input the diameter (in inches) and pizza price. Print the cost per square inch. If the cost per square inch is more than $.10 print a message that informing the user that this pizza is too expensive. Otherwise let the user know this is a good deal! and name it pizza.py

0 0
Add a comment Improve this question Transcribed image text
Answer #1

//sample get cost () in the super class

Public int get cost ()

{

int totalToppingCost = 0;

if (hasJalapeno() )

totalToppoingCost += jalapenoCost ;

if (hasCapsicum ())

totalToppingCost += capsicumCost;

//similar for other topping

return totalToppingCost ;

}

Add a comment
Know the answer?
Add Answer to:
Write a graphics program to calculate the cost per square inch of a circular pizza and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a graphics python program!!!!!!! to calculate the cost per square inch of a circular pizza...

    Write a graphics python program!!!!!!! to calculate the cost per square inch of a circular pizza and use graphics .py libaray!!!!! . Accept as input the diameter (in inches) and pizza price. Print the cost per square inch. If the cost per square inch is more than $.10 print a message that informing the user that this pizza is too expensive. Otherwise let the user know this is a good deal! and name it pizza.py.....This is a PYTHON language!!!!!!!!!!

  • Given the radius, in inches, and price of a pizza, write a program to find the...

    Given the radius, in inches, and price of a pizza, write a program to find the price of the pizza per square inch. Use float data type and format to 2 decimal places. You must have a $ sign for the price per square inch. Use math.pi to get the value if PI.   To do this use: import math PI = math.pi And then use PI to calculate area of pizza. Name your file ws3part1.py. Read the style guidelines before...

  • (The file should have your program and the console input/output of your program) 3.18: Pizza Pi...

    (The file should have your program and the console input/output of your program) 3.18: Pizza Pi Joe’s Pizza Palace needs a program to calculate the number of slices a pizza of any size can be divided into. The program should perform the following steps: Ask the user for the diameter of the pizza in inches. Calculate the number of slices that may be taken from a pizza of that size. Display a message telling the number of slices. To calculate...

  • Murphy Pizza Palace needs an application to calculate the number of slices of a pizzaof any...

    Murphy Pizza Palace needs an application to calculate the number of slices of a pizzaof any size can be divided into. The application should do the following: Allow the user to enter the diameter of the pizza, in inches. Calculate the number of slices that can be cut from a pizza that size. Display a message that indicates the number of slices. To calculate the number of slices that can be cut from the pizza, you must know the following...

  • In C++ ab 8 DESCRIPTION: Complete all four problems. 1. Write a program that will accept...

    In C++ ab 8 DESCRIPTION: Complete all four problems. 1. Write a program that will accept two numbers from the user. The program should then evaluate the following equation, using the data input: 2-3X2 - 4Y?. Assume the second number input is Y. Now the program should test Z to see if Z is a negative number or a positive number (assume zero is included as a positive number). The program should output the values of X, Y, and Z...

  • I need to write a paint job estimator program in python. I have most of it...

    I need to write a paint job estimator program in python. I have most of it down but i keep getting errors and I dont know how to fix it or what im doing worng specs: A painting company has determined that for every 350 square feet of wall space, one gallon of paint and six hours of labor are required. The company charges $62.25 per hour for labor. Write a program call paintjobestimator.py that asks the user to enter...

  • .Need code for my java class !! Write a simple java program that uses loops. You...

    .Need code for my java class !! Write a simple java program that uses loops. You may use ‘WHILE’ or ‘FOR’ or ‘DO-WHILE’ – you decide. The program should use a loop to compute the semester average for up to 5 students. In the loop the user will ask for a student name and their 3 test scores and add them up and divide the total by 3 giving the semester average. You will print out the student name and...

  • Write a C++ program that uses: .selection constructs (if, if else, and switch) .multiway branches .looping...

    Write a C++ program that uses: .selection constructs (if, if else, and switch) .multiway branches .looping constructs (do and while loops) .Boolean expressions, bool and char types. 1. Develop a program that calculates charges for an Internet provider. The cost is determined by the amount of data used and the consumer plan. Package B (basic) is the most affordable if you plan on using < 20GB (20,000MB), however, if you consume more than 20GB (20,000MB) you are charged for each...

  • In C++ Write a program that will calculate the cost of a phone call as follows:...

    In C++ Write a program that will calculate the cost of a phone call as follows: The first 10 minutes are charged at a flat rate of $0.99 for the entire 10 minutes (Not 99 cents a minute - but 99 cents for the first 10 minutes total). Every minute after the initial 10 minutes will be charged at $0.10 per minute. Input the number of minutes talked as an integer. Using an IF/ELSE structure, check for an entry of...

  • ifelse2 Ward References Mailings Review ew Subtitle Title TNO ::E . 12 . .|TI Emphasis Heading...

    ifelse2 Ward References Mailings Review ew Subtitle Title TNO ::E . 12 . .|TI Emphasis Heading i LNormal! Strong 18-y.A-l าร Styles Paragraph Unit Form Selection Exercises #2 Standards Focus: input/output,restrictive input, formatted output, logic, design, Boolean and logical operators, String class method usage 1. Our program will convert a weight expressed in pounds into kilograms a. Our input is the weight in pounds b. Our output is the weight in kilograms c. We also know that Kilograms Pounds /2.2...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT