---+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 <b>Factoring</b> * 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.<br> Example 1 <pre> What number do you wish to have factored? <b><font color="blue">120</font></b> The prime factorization of 120 is: 2 2 2 3 5 What number do you wish to have factored? <b><font color="blue">13</font></b> </pre> Example 2 <pre> The prime factorization of 13 is: 13 </pre> You can also run a solution for this program if you want. See classroom instructions for more details. ---++Lab Hints * Hint 1: [[%ATTACHURL%/FactoringFlowChart.pdf][a flowchart that you can use]] * Hint 2: See class examples for priming reads * Hint 3: [[CSC121F2026Lab03Hint03][When to quit]] * Hint 4: [[CSC121F2026Lab03Hint04][When to update]] ---++ 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 <b>expected output</b> <font color="red">CANNOT</font> 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. 1. Allow the user to type in 2 numbers and print out the prime factors that are shared by both 1. Call this program <b>Factoring2</b> add it to the zip folder that contains the original solution. 1. Add a section to the software development report entitled <b>Extra Credit</b> and explain the logic of your improvement and 2 sets of testing data
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
vsdx
FactoringFlowChart.vsdx
r1
manage
38.6 K
2026-06-04 - 17:39
CathyBareiss
This topic: CenterForComputing
>
WebHome
>
Syllabi
>
CSC121SylF2026
>
CSC121F2026Lab03
Topic revision: r1 - 2026-06-04 - CathyBareiss
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback