Question: Help with Java If statements in Java are related to if sentences in English. Convert each of these sentences into their Java equivalent. Remember to

Help with Java

If statements in Java are related to if sentences in English. Convert each of these sentences into their Java equivalent. Remember to declare any variables needed:

If there are more than 10 cookies on the tray, I will take one.

If the cookie tray has Oreos and there are more than 10 cookies on the tray, I will take an Oreo.

If the top is on sale for less than $25 or more than 50% discount and I have at least twice the cost of the top in my wallet, I will buy it.

I will go swimming is the weather is sunny and the temperature is over 85.

Help me set my alarm clock. I get up at 8 am most days, but on Thursday I must get up at 7 am and on Saturday and Sunday I get to sleep until 9 am.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!