r/learnjava • • May 15 '19

How do I hit the requirements for this assignment for this prime number program?

Program: Create a program that finds all the prime numbers up to 500.

other requirements: https://pastebin.com/QT8AZNB5

Now, I did the program in the simplest (probably not the best) way I could, ignoring the specific requirements so i could understand the logic of it, and here's what I ended up with: https://pastebin.com/Kk1C8xa7

This program was simple enough that I could do it all in main, yet I'm supposed to incorporate modules, multiple files, classes, and a printable interface. How do I do that for a program that works just fine being entirely in Main? I mean the only class I can think of is pretty much to copy and paste the program, slap it into a class, and call the class methods in Main, but that seems so unnecessary. Also don't get how an interface could be beneficial here.

Any help?

0 Upvotes

0 comments sorted by