Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In my CSC class we are doing an if statement lab where we have to code in JAVA. The third problem is: You should always

In my CSC class we are doing an if statement lab where we have to code in JAVA.

The third problem is:

You should always answer your cell phone if your mother is calling. You should also answer your phone if it is between 8:00 am and 10:00pm but not in class (10am-12pm). Prompt the user to for the time of day in military time (0 2400) and whether or not it is your mother. Display a statement as to whether you should answer the phone or not.

WHAT IS THE CODE IN JAVA?

image text in transcribed

3. You should always answer your cell phone if your mother is calling. You should also answer your phone if it is between 8:00 am and 10:00pm but not in class (10am-12pm). Prompt the user to for the time of day in military time (0 2400) and whether or not it is your mother. Display a statement as to whether you should answer the phone or not SAMPLE INPUT: 900 n Answer the phone! SAMPLE INPUT: 600 y Answer the phone! SAMPLE INPUT: 1100 n DO NOT answer the phone! TEST DATA: make up more cases to thoroughly test your code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions