mirror of
https://bitbucket.org/Mattrixwv/projecteulerjava.git
synced 2025-12-06 17:13:58 -05:00
Update test coverage
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
//ProjectEulerJava/src/main/java/mattrixwv/ProjectEuler/Problems/Problem9.java
|
||||
//Matthew Ellison
|
||||
// Created: 03-02-19
|
||||
//Modified: 08-20-22
|
||||
//Modified: 06-27-23
|
||||
//There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc.
|
||||
//Unless otherwise listed all non-standard includes are my own creation and available from https://bibucket.org/Mattrixwv/JavaClasses
|
||||
/*
|
||||
Copyright (C) 2022 Matthew Ellison
|
||||
Copyright (C) 2023 Matthew Ellison
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -29,17 +29,17 @@ import com.mattrixwv.project_euler.exceptions.Unsolved;
|
||||
public class Problem9 extends Problem{
|
||||
//Variables
|
||||
//Static variables
|
||||
private static final int GOAL_SUM = 1000; //The number that we want the sum of a, b, and c to equal
|
||||
protected int GOAL_SUM = 1000; //The number that we want the sum of a, b, and c to equal
|
||||
//Instance variables
|
||||
private int a; //The size of the first side
|
||||
private int b; //The size of the second side
|
||||
private double c; //The size of the hyp
|
||||
private boolean found; //A flag to determine if we have found the solution yet
|
||||
protected int a; //The size of the first side
|
||||
protected int b; //The size of the second side
|
||||
protected double c; //The size of the hyp
|
||||
protected boolean found; //A flag to determine if we have found the solution yet
|
||||
|
||||
//Functions
|
||||
//Constructor
|
||||
public Problem9(){
|
||||
super(String.format("There exists exactly one Pythagorean triplet for which a + b + c = %d. Find the product abc.", GOAL_SUM));
|
||||
super(String.format("There exists exactly one Pythagorean triplet for which a + b + c = %d. Find the product abc.", 1000));
|
||||
a = 1;
|
||||
b = 0;
|
||||
c = 0;
|
||||
|
||||
Reference in New Issue
Block a user