CS 200 > Assignment 2 > Due: Week 3 (start of class)
Problem:
I love pizza! Determine the number of square inches of pizza I will get from 2 - 7” pizzas and then from a 14” pizza,
letting me know the outcome of your computations.
Then, determine how many more square inches of pizza I will get if I order 1 - 14” pizza, instead of 1 - 7” pizza, again,
letting me know the outcome of your computations.
Also, if I order the 14” pizza, beside myself, I will have to share it equally with 5 friends. Exactly how much pizza will I get
to eat?
Note: Make sure your displayed outcomes are user-friendly.
Assignment Specifications:
Create a flowchart to solve this problem (flowchart must be submitted prior to coding).
Code the problem using the jGrasp IDE, making sure to include comments & template as illustrated.
Submit your source code (.java file)
Submit your output (saved in a notepad .txt file)
Turn in your assignment by the end of class tonight for full credit.
(see syllabus for assignment grading details)
class Pizza
}
public static void main(String args[ ])
}
//declare all needed variables first
//complete necessary computation processes
//display user friendly outcomes to solve the problem
System.out.println();
//system.out.println() is to display output to the screen
/*data placed between quotes is called a string literal, + concatenates , to display
variable values - do not use quotes*/
{
{
Hints:
What is more accurate an int, float, or double?
+ concatenates string literals & variable values to create detailed output.
There are two features of the Math class that will come in handy for this assignment.
How do you determine the area/square inches of a circle