Question: Login to the class Linux server.Once you login to the remote server complete the following tasks.Create a program in Java that does the following:Part 1

Login to the class Linux server.Once you login to the remote server complete the following tasks.Create a program in Java that does the following:Part 1Create 4 variables with each one being a different data type.Ask the user to input a value corresponding to that data type.Compare the user's input with another value using a conditional statement and display the result. 2 examples below.if x >1 say integer variable is greater than 1if c !='a' say character variable does not equal the letter a.Part 2Prompt the user to enter a number between 1-5 inclusive.If the user enters a number outside of this range, make them re-enter the number.Depending on the number the user chooses, tell them they won a prize using a "for" loop.Each number must have a different prize and your prizes must be different from the example in class.The "for" loop will run based on the number they input. If the user input 3, the loop will run three times displaying prize number 3 each time.//sample outputEnter a number between 1-5 inclusive.6You have entered an incorrect number.Enter a number between 1-5 inclusive.4You have won the white rabbit!You have won the white rabbit!You have won the white rabbit!You have won the white rabbit!

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 Programming Questions!