mirror of
https://bitbucket.org/Mattrixwv/projecteulercpp.git
synced 2025-12-06 17:13:59 -05:00
Changed exception to Unsolved to fit with naming convention
This commit is contained in:
@@ -83,7 +83,7 @@ void Problem9::reset(){
|
||||
std::string Problem9::getString() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
std::stringstream results;
|
||||
if(found){
|
||||
@@ -101,7 +101,7 @@ std::string Problem9::getString() const{
|
||||
int Problem9::getSideA() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
return a;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ int Problem9::getSideA() const{
|
||||
int Problem9::getSideB() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
return b;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ int Problem9::getSideB() const{
|
||||
int Problem9::getSideC() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
return (int)c;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ int Problem9::getSideC() const{
|
||||
int Problem9::getProduct() const{
|
||||
//If the problem hasn't been solved throw an exception
|
||||
if(!solved){
|
||||
throw unsolved();
|
||||
throw Unsolved();
|
||||
}
|
||||
return a * b * (int)c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user