Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

java Factoring of integers. Write a program that asks the user for an integer an

ID: 3577210 • Letter: J

Question

java

Factoring of integers. Write a program that asks the user for an integer and then prints out all its factors in increasing order. For example, when the user enters 150, the program should print

2
3
5
5

Use a class FactorGenerator with a constructor FactorGenerator(int numberToFactor) and methods nextFactor and hasMoreFactors. Supply a class FactorPrinter whose main method reads a user input, constructs a FactorGenerator object, and prints the factors.

Here is a sample program run:

Your main class should be called FactorPrinter.

Complete the following class in your solution:

Use the following class as your tester class:

http://go.code-check.org/codecheck/files?repo=bj4fp&problem=ch06/c06_exp_6_8

Explanation / Answer

Should be:

SSCCE

Result: