20231230_4_UNIT_TESTS_TSD_Perfection

docx

School

University Of Georgia *

*We aren’t endorsed by this school

Course

1102

Subject

Mechanical Engineering

Date

Apr 3, 2024

Type

docx

Pages

6

Uploaded by KidWasp4108

Report
COP-1000: Programming Logic Assignment 1-1 Document Version: 0.1 Version Date: Created By:
1. Document Version Control Version Date Author Rationale 0.1 First Draft
2. Technical Specifications Link to Code Files https://replit.com/@igee1/Perfection-1#main.c Psuedocode Function isPerfect(num): sum = 0 for i = 1 to num / 2: if num % i == 0: sum += i return (sum == num) Function displayResult(num): if isPerfect(num): Print "Perfect Number" else: Print "Not A Perfect Number" Function main(): // Unit Test #1 input1 = 496 Print "Unit Test #1: " displayResult(input1) // Unit Test #2 input2 = 68 Print "\nUnit Test #2: " displayResult(input2)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
// Unit Test #3 input3 = 5112 Print "\nUnit Test #3: " displayResult(input3) // Unit Test #4 input4 = 8128 Print "\nUnit Test #4: " displayResult(input4) Return 0 Screenshot of Unit Test #1 –
Screenshot of Unit Test #2 – Screenshot of Unit Test #3 –
Screenshot of Unit Test #4 –
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help