Question
Big Bite is offering a promotion as follows: If the customer orders $20 or more worth of food, there is a 20% discount
Big Bite is offering a promotion as follows:
• If the customer orders $20 or more worth of food, there is a 20% discount • If the customer orders between $10 and $20 worth of food, there is a 15% discount. • If the customer orders up to $10 of food, there is a 10% discount.
Declare two variables of type double called originalPrice and discountedPrice. Ask the user to enter the original price of the item. Then, compute the discounted price according to the rules above and tell the user what the discounted price is.
Sample Program Run What is the original cost of the food? $14.95 The discounted price is: $12.77
java a program that prints out a student's letter grade based on their percentage in the class. Use the following scale.
Percentage Letter grade 90 or above A 80 - 89 B 70 - 79 C 60 - 69 D Below 60 F
2) java a Fortune Cookie program that gives the user as many random fortunes as they want (choosing from at least three fortunes). Structure your code as follows:
• Ask the user if they would like a fortune.
o If they do not, tell them 'goodbye'.
o If they do, give them a random fortune. (HINT: start by generating a random number, where each number corresponds to a different fortune.)
Sample Program Run #1 Would you like a fortune? (Y/N): Y A dubious friend may be an enemy in camouflage.
Sample Program Run #2 Would you like a fortune? (Y/N): N Goodbye!
Step by Step Solution
3.43 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
1 Java program that implements both the Big Bite promotion calculation and the students letter grade ...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