Author: Alex Sover
This project was created in Java because I wanted an OO language for the prime number generator. This function can be computationally intense and using the singleton design pattern could prevent it from being created a multitude of times. Also, it was helpful in separating the secret from the code body.
Demo Code for Code Exercise
Coding Exercise: You are given a Secret which encapsulates a function that accepts a single integer parameter and returns an integer. In Java or a language of your choice, write an application that determines if Secret is an additive function secret(x+y) = secret(x) + secret(y) for all prime numbers less than N where N is a given integer.
Assume you are going to ship this code. Use your judgment to determine what you need to include. Document any assumptions or choices you make in your implementation. Also, include an explanation of your choice of language.
Please share your solution and any associated code or documentation as a public Github repository.