Answer to Question #57120 in Java | JSP | JSF for Eleni

Question #57120
Hello! Exercise: Write a class called RandomGeneratorImproved that expands RandomGenerator, which is able to generate random numbers coming from the sets of: a. first numbers, b. powers of 2(not negative int), c. Fibonacci numbers and d. square numbers. Create 2 new methods that are similar to "nextInt" method like (public int nextPrime(int n)) and public int nextPrime(int low, int high)). If there is no prime number in that range, it should show a message saying that and return -1. In the same way you should do all the methods for a., b., c., d. Write a program to test it where the user asks for what kind of random number he wants and within what range (low, high) and the result of it is a RANDOM number. Do not use ARRAYS or any method that saves the numbers in lists. Thank you in advance!
1
Expert's answer
2016-01-19T08:28:41-0500
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-57120.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS