| META TOPICPARENT |
name="CSC121SylF2026" |
Repetition Lab: Factoring: Fall 2026
Learning Objective(s)
- Learn about event controlled loops (and use a priming read)
- Statement coverage for testing
- Enhance overall programming skills
Overview of the Program
Write a program to print the prime factorization of a number
Specifics
- The program is to be called Factoring
- The prime factors should be displayed in increasing order
- A priming read must be used
Sample dialogue
Below is a sample dialogue. The prompts may vary but the input given by the user is to be the same format. Your output can vary somewhat as long as the required data is nicely displayed.
Example 1
What number do you wish to have factored? 120
The prime factorization of 120 is:
2 2 2 3 5
What number do you wish to have factored? 13
Example 2
The prime factorization of 13 is:
13
You can also run a solution for this program if you want. See classroom instructions for more details.
Lab Hints
Submission
- Create a software development report
- For the system design, you may use my flowchart if it is the design of your program. Otherwise, you need to make your own.
- For testing report,
- make sure your tests ensure that each statement is executed at least one.
- your expected output CANNOT be pasted from the dialogue of a running. Only the actual output may be pasted
- It should contain two different inputs that are "errors"
- For the improvement section, specify how many points were lost from the last lab that you should not lose points for on this lab because you corrected the problem
- create a pdf document from your software development report
- create an empty zip folder
- place only Factoring.java and your pdf document into it
- submit the zip folder on canvas
Optional improvements
Optional improvements should ONLY be worked on once the program is completing working. In addition, the work is to be done on your own with little if any help for lab assistants or the instructor.
- Allow the user to type in 2 numbers and print out the prime factors that are shared by both
- Call this program Factoring2 add it to the zip folder that contains the original solution.
- Add a section to the software development report entitled Extra Credit and explain the logic of your improvement and 2 sets of testing data
| META FILEATTACHMENT |
attachment="FactoringFlowChart.vsdx" attr="" comment="" date="1780594757" name="FactoringFlowChart.vsdx" path="FactoringFlowChart.vsdx" size="39574" user="CathyBareiss" version="1" |
| META FILEATTACHMENT |
attachment="FactoringFlowChart.pdf" attr="h" comment="" date="1780594920" name="FactoringFlowChart.pdf" path="FactoringFlowChart.pdf" size="210958" user="CathyBareiss" version="1" |
|