Writea Classthathas Anumber Forattributetheconstructorgeneratesarandomnumberforthe Attribu Q37020992

in java
Writea Classthathas anumber forattribute.Theconstructorgeneratesarandomnumberforthe attribute. Theclass has proper methods anWritea 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

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.