Modified Piece.java to fix any warnings and make value final.
This commit is contained in:
parent
3375357755
commit
7ade1782d7
8
.idea/inspectionProfiles/Project_Default.xml
Normal file
8
.idea/inspectionProfiles/Project_Default.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ADDITIONAL_TAGS" value="postcondition,precondition" />
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
@ -9,7 +9,7 @@ package Assignments.A1.models;
|
|||||||
public class Piece {
|
public class Piece {
|
||||||
|
|
||||||
private int loc;
|
private int loc;
|
||||||
private int value;
|
private final int value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new piece with a specified location and value.
|
* Creates a new piece with a specified location and value.
|
||||||
@ -17,8 +17,9 @@ public class Piece {
|
|||||||
* @precondition loc >= 0 & newLoc <= 8
|
* @precondition loc >= 0 & newLoc <= 8
|
||||||
* & value >= 1 & value <= 8
|
* & value >= 1 & value <= 8
|
||||||
* @postcondition the piece is created.
|
* @postcondition the piece is created.
|
||||||
* @param loc
|
*
|
||||||
* @param value
|
* @param loc the location of the piece.
|
||||||
|
* @param value the value of the piece. (FINAL)
|
||||||
*/
|
*/
|
||||||
public Piece(int loc, int value) {
|
public Piece(int loc, int value) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user