Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download: https://solutionzip.com/downloads/perfectnumber-2/
- Modify the previous Chapter 4 assignment to define and call a method entitled perfectNumber.
- The method should:
- • take in one int as an argument
- • return a boolean – true if the number is a perfect number, false if the number is not a perfect number
- • be documented with proper javadoc notation
- The main method of the program should call the perfectNumber method to determine if the number entered by the user if a perfect number.
- This application should still have all the functions defined in the Chapter 4 assignment (prompting the user until the user wants to stop playing and only allowing positive integers for numbers).
- Remember to:
- • put your name, COP 2800, Chapter 5 Assignment, and date in a comment block at the top of your file
- • comment your code
- • format your code so it is readable (proper indentation, white space, blank lines, etc.).
- Submit your .java file here when you have completed the assignment. Late assignments will not be accepted without an approved excuse.
- Download: https://solutionzip.com/downloads/perfectnumber-2/
Add Comment
Please, Sign In to add comment