Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Submissions This assignment requires you to submit three Java source code files with these exact names: TwoMethodsA 0 3 . java GreatestAndLeast.java RandomsInFile.java General Requirements
Submissions
This assignment requires you to submit three Java source code files with these exact names:
TwoMethodsAjava
GreatestAndLeast.java
RandomsInFile.java
General Requirements
All files you are turning in must be signed. Please add your name to the source code in comments.
Add comments to the source code you are writing:
Use Descriptive variable names. Otherwise, Describe the purpose of every variable
Explain the algorithm you are using for solution
Any methods except for main must have a Java Doc comment.
Uncommented work loses up to points.
Turn in only the source code all files with java extension. Make sure the source code files named correctly.
Two Methods getLargestDigit method
Write a method that takes an integer number either positive or negative and finds and returns the largest digit in that number.
Requirements:
Do not use arrays in your solution.
Do not convert integer into a string in order to extract digits. Use operator instead.
Start coding with TwoMethodsAzip Download TwoMethodsAzip
Make sure to write method code according to the specifications and test them using unit tests provided in TwoMethodsAzip Download TwoMethodsAzip
Do not add any imports to the project all packages needed for solution are already imported.
Do not alter any of the tests. If your code is not passing a test, find and fix errors in your method implementation rather than changing the test code.
No partial credit will be given for a method that fails even one test.
Two Methods fractionSum method
Write a method that calculates and returns sum of fractions nn where value n is passed as parameter and defines the length of the pattern and the sum. The method returns if the value of n is less than
Examples:
fractionSum
fractionSum
fractionSum
fractionSum
fractionSum
Start coding with TwoMethodsAzip Download TwoMethodsAzip
Make sure to write method code according to the specifications and test them using unit tests provided in TwoMethodsAzip Download TwoMethodsAzip
Do not add any imports to the project all packages needed for solution are already imported.
Do not alter any of the tests. If your code is not passing a test, find and fix errors in your method implementation rather than changing the test code.
No partial credit will be given for a method that fails even one test.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started