in javaWritea Classthathas anumber forattribute.Theconstructorgeneratesarandomnumberforthe attribute. Theclass has proper methods anda methodto compareagiven (parameter)numberwith the attribute. Then write a program that creates a object of that class and asks the user to guesswhat the numberfor the attribute of the class is. If the user’s guess is higher than the random number, the programshould display Too high, try again” If the user’s guess is lower than the random number, the program should display “Too low, try again” This should be repeated until the user guesses the random number Keep
OR
OR