-
Notifications
You must be signed in to change notification settings - Fork 776
[WIP] "Not enough comments" #607 patch #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
20 changes: 18 additions & 2 deletions
20
...n/java/com/seriouscompany/business/java/fizzbuzz/packagenamingpackage/impl/Constants.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,39 @@ | ||
// Constants.java | ||
// Constants | ||
|
||
// add this specific class (Constants) to the package named com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl | ||
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl; | ||
|
||
/** | ||
* Constants | ||
*/ | ||
public class Constants { | ||
|
||
// a public, static constant property of the class Constants defined on line 10 of type string called AN_ATTEMPT_WAS_MADE_TO_DIVIDE_BY_ZERO which contains the text "An attempt was made to divide by zero." | ||
public static final String AN_ATTEMPT_WAS_MADE_TO_DIVIDE_BY_ZERO = "An attempt was made to divide by zero."; | ||
// a public, static constant property of the class Constants defined on line 10 of type string called BUZZ which contains the text "Buzz" | ||
public static final String BUZZ = "Buzz"; | ||
// a public, static constant property of the class Constants defined on line 10 of type string called COM_SERIOUSCOMPANY_BUSINESS_JAVA_FIZZBUZZ_PACKAGENAMINGPACKAGE_IMPL_PRINTERS_INTEGER_INTEGER_PRINTER_PRINT which contains the text "com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.printers.IntegerIntegerPrinter.print()" | ||
public static final String COM_SERIOUSCOMPANY_BUSINESS_JAVA_FIZZBUZZ_PACKAGENAMINGPACKAGE_IMPL_PRINTERS_INTEGER_INTEGER_PRINTER_PRINT = "com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl.printers.IntegerIntegerPrinter.print()"; | ||
// a public, static constant property of the class Constants defined on line 10 of type string called FIZZ which contains the text "Fizz" | ||
public static final String FIZZ = "Fizz"; | ||
// a public, static constant property of the class Constants defined on line 10 of type string called LINE_SEPARATOR which contains the text "line.separator" | ||
public static final String LINE_SEPARATOR = "line.separator"; | ||
// a public, static constant property of the class Constants defined on line 10 of type string called LOOP_COMPONENT_FACTORY which contains the text "loopComponentFactory" | ||
public static final String LOOP_COMPONENT_FACTORY = "loopComponentFactory"; | ||
// a public, static constant property of the class Constants defined on line 10 of type string called SPRING_XML which contains the text "spring.xml" | ||
public static final String SPRING_XML = "spring.xml"; | ||
// a public, static constant property of the class Constants defined on line 10 of type string called STANDARD_FIZZ_BUZZ which contains the text "standardFizzBuzz" | ||
public static final String STANDARD_FIZZ_BUZZ = "standardFizzBuzz"; | ||
// a public, static constant property of the class Constants defined on line 10 of type string called THE_INTEGERS_COULD_NOT_BE_COMPARED which contains the text "The integers could not be compared." | ||
public static final String THE_INTEGERS_COULD_NOT_BE_COMPARED = "The integers could not be compared."; | ||
// a public, static constant property of the class Constants defined on line 10 of type int called DEFAULT_FIZZ_BUZZ_UPPER_LIMIT_PARAMETER_VALUE which contains the number 100 | ||
public static final int DEFAULT_FIZZ_BUZZ_UPPER_LIMIT_PARAMETER_VALUE = 100; | ||
// a public, static constant property of the class Constants defined on line 10 of type int called INTEGER_DIVIDE_ZERO_VALUE which contains the number 0 | ||
public static final int INTEGER_DIVIDE_ZERO_VALUE = 0; | ||
// a public, static constant property of the class Constants defined on line 10 of type int called INTEGER_ORIGIN_ZERO_VALUE which contains the number 0 | ||
public static final int INTEGER_ORIGIN_ZERO_VALUE = 0; | ||
// a public, static constant property of the class Constants defined on line 10 of type int called LOOP_INC_VALUE which contains the number 1 | ||
public static final int LOOP_INC_VALUE = 1; | ||
// a public, static constant property of the class Constants defined on line 10 of type int called LOOP_INIT_VALUE which contains the number 1 | ||
public static final int LOOP_INIT_VALUE = 1; | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 16 additions & 2 deletions
18
...com/seriouscompany/business/java/fizzbuzz/packagenamingpackage/impl/StandardFizzBuzz.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,50 @@ | ||
// StandardFizzBuzz.java | ||
// Standard FizzBuzz | ||
|
||
// add this specific class (StandardFizzBuzz) to the package named com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl | ||
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.impl; | ||
|
||
// import package org.springframework.beans.factory.annotation.Autowired | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
// import package org.springframework.stereotype.Service | ||
import org.springframework.stereotype.Service; | ||
|
||
// import package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.FizzBuzz | ||
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.FizzBuzz; | ||
// import package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.factories.FizzBuzzSolutionStrategyFactory | ||
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.factories.FizzBuzzSolutionStrategyFactory; | ||
// import package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.strategies.FizzBuzzSolutionStrategy | ||
import com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.strategies.FizzBuzzSolutionStrategy; | ||
|
||
/** | ||
* Standard FizzBuzz | ||
*/ | ||
@Service | ||
public class StandardFizzBuzz implements FizzBuzz { | ||
|
||
// create a private contstant called _fizzBuzzSolutionStrategyFactory of type FizzBuzzSolutionStrategyFactory imported from com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.factories.FizzBuzzSolutionStrategyFactory on line 15 | ||
private final FizzBuzzSolutionStrategyFactory _fizzBuzzSolutionStrategyFactory; | ||
|
||
/** | ||
* the constructor for the class StandardFizzBuzz declared on line 23 | ||
* @param _fizzBuzzSolutionStrategyFactory | ||
*/ | ||
@Autowired | ||
public StandardFizzBuzz(final FizzBuzzSolutionStrategyFactory _fizzBuzzSolutionStrategyFactory) { | ||
// call the constructor of the class StandardFizzBuzz declared on line 13 | ||
super(); | ||
// set the value of the constant _fizzBuzzSolutionStrategyFactory, a property on the current object declared on line 25, to the value of _fizzBuzzSolutionStrategyFactory, the parameter to the constructor of StandardFizzBuzz declared on line 23, declared on line 32 | ||
this._fizzBuzzSolutionStrategyFactory = _fizzBuzzSolutionStrategyFactory; | ||
} | ||
|
||
/** | ||
* the method fizzBuzz on the class StandardFizzBuzz declared on line 23 | ||
* @param nFizzBuzzUpperLimit | ||
*/ | ||
public void fizzBuzz(final int nFizzBuzzUpperLimit) { | ||
// a constant called mySolutionStrategy of type FizzBuzzSolutionStrategy imported from com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces.strategies.FizzBuzzSolutionStrategy on line 17, which is set to the return value of the method createFizzBuzzSolutionStrategy on the property _fizzBuzzSolutionStrategy of this object declared on line 25 | ||
final FizzBuzzSolutionStrategy mySolutionStrategy = | ||
this._fizzBuzzSolutionStrategyFactory.createFizzBuzzSolutionStrategy(); | ||
// run the method runSolution on the object mySolutionStrategy declared on lines 45-46 of type FizzBuzzSolutionStrategy and pass in the parameter to this function called nFizzBuzzUpperLimit of type int | ||
mySolutionStrategy.runSolution(nFizzBuzzUpperLimit); | ||
} | ||
|
||
} |
7 changes: 5 additions & 2 deletions
7
...a/com/seriouscompany/business/java/fizzbuzz/packagenamingpackage/interfaces/FizzBuzz.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
// FizzBuzz.java | ||
// FizzBuzz | ||
|
||
// add this specific interface (FizzBuzz) to the package named com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces | ||
package com.seriouscompany.business.java.fizzbuzz.packagenamingpackage.interfaces; | ||
|
||
/** | ||
* FizzBuzz | ||
*/ | ||
public interface FizzBuzz { | ||
|
||
/** | ||
* the signature for the constructor for the class FizzBuzz declared on line 10 | ||
* @param nFizzBuzzUpperLimit | ||
*/ | ||
void fizzBuzz(int nFizzBuzzUpperLimit); | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo, should read "constant"