plz use java to write this program Write a public class call EnterANumberBetwee5

plz use java to write this program
Write a public class call EnterANumberBetwee5And10 with a main method.
what it does:
1. prompt user for a number (see examples)
2. read from user
3. if the user didn’t enter a number go to step 1
4. if the user didn’t entered a number between 5 and 10 (inclusive) go to step 1
5. otherwise print: “you entered a valid number” followed by the
number (see examples)
Restrictions: do not use anything we haven’t covered in class.
HINT:
we wrote a similar programs in slides 29 and 30
of ch06.
Never use System.err.print. Always use System.out.print or println
because this is a loop that expects certain inputs if your program
doesn’t read the inputs described here you may get a “your program
took too long” error. That means the logic of your program is wrong.
Examples
% java EnterANumberBetween5And10
enter a number between 5 and 10 (inclusive): a
a is not a number
enter a number between 5 and 10 (inclusive): hello
hello is not a number
enter a number between 5 and 10 (inclusive): 4
you entered a bad number
enter a number between 5 and 10 (inclusive): 5.6
you entered a valid number: 5.6
% java EnterANumberBetween5And10
enter a number between 5 and 10 (inclusive): 9
you entered a valid number: 9.0
% java EnterANumberBetween5And10
enter a number between 5 and 10 (inclusive): 20
you entered a bad number
enter a number between 5 and 10 (inclusive): 7
you entered a valid number: 7.0
%

Posted in Uncategorized

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount