mirror of
https://bitbucket.org/Mattrixwv/projecteulerjava.git
synced 2025-12-06 17:13:58 -05:00
Minor fixes
This commit is contained in:
@@ -35,6 +35,7 @@ public abstract class Problem{
|
|||||||
//Constructor
|
//Constructor
|
||||||
public Problem(String description){
|
public Problem(String description){
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
solved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Gets
|
//Gets
|
||||||
@@ -45,7 +46,7 @@ public abstract class Problem{
|
|||||||
//Returns the result of solving the problem
|
//Returns the result of solving the problem
|
||||||
public abstract String getResult();
|
public abstract String getResult();
|
||||||
//Returns the time taken to run the problem as a string
|
//Returns the time taken to run the problem as a string
|
||||||
public String getTime() throws InvalidResult{
|
public String getTime() throws InvalidResult, Unsolved{
|
||||||
if(!solved){
|
if(!solved){
|
||||||
throw new Unsolved();
|
throw new Unsolved();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user