diff --git a/src/awt/Draw.java b/src/awt/Draw.java index cbdd353..9ec5a84 100644 --- a/src/awt/Draw.java +++ b/src/awt/Draw.java @@ -11,6 +11,9 @@ import physics.Nyquist; import stdlib.Color; import stdlib.StdDraw; +/** + * @author Daniel Weschke + */ public class Draw extends StdDraw{ static Thread plot; static JLabel infoLabel; diff --git a/src/exception/ComplexException.java b/src/exception/ComplexException.java index ed5d196..caee47e 100644 --- a/src/exception/ComplexException.java +++ b/src/exception/ComplexException.java @@ -1,5 +1,8 @@ package exception; +/** + * @author Daniel Weschke + */ public class ComplexException extends Exception { /** diff --git a/src/exception/IllegalDimensionException.java b/src/exception/IllegalDimensionException.java index b2bf932..34bd17a 100644 --- a/src/exception/IllegalDimensionException.java +++ b/src/exception/IllegalDimensionException.java @@ -1,5 +1,8 @@ package exception; +/** + * @author Daniel Weschke + */ public class IllegalDimensionException extends Exception { /** diff --git a/src/exception/IllegalSetupException.java b/src/exception/IllegalSetupException.java index f623058..9f051c6 100644 --- a/src/exception/IllegalSetupException.java +++ b/src/exception/IllegalSetupException.java @@ -1,5 +1,8 @@ package exception; +/** + * @author Daniel Weschke + */ public class IllegalSetupException extends Exception { /** diff --git a/src/exception/NoSquareException.java b/src/exception/NoSquareException.java index 4a2b645..9087e84 100644 --- a/src/exception/NoSquareException.java +++ b/src/exception/NoSquareException.java @@ -1,5 +1,8 @@ package exception; +/** + * @author Daniel Weschke + */ public class NoSquareException extends Exception { private static final long serialVersionUID = -4049443845429534140L; diff --git a/src/exception/SingularException.java b/src/exception/SingularException.java index 41c8074..5f473e5 100644 --- a/src/exception/SingularException.java +++ b/src/exception/SingularException.java @@ -1,5 +1,8 @@ package exception; +/** + * @author Daniel Weschke + */ public class SingularException extends Exception { private static final long serialVersionUID = -5121014712549208662L; diff --git a/src/exception/package-info.java b/src/exception/package-info.java index 1b5888a..029e490 100644 --- a/src/exception/package-info.java +++ b/src/exception/package-info.java @@ -1,6 +1,5 @@ /** * Exceptions - * * @author Daniel Weschke */ package exception; \ No newline at end of file diff --git a/src/math/equation/Polynomial.java b/src/math/equation/Polynomial.java index 60f0835..f0020c2 100644 --- a/src/math/equation/Polynomial.java +++ b/src/math/equation/Polynomial.java @@ -14,9 +14,7 @@ import exception.NoSquareException; import exception.SingularException; /** - * * @author Daniel Weschke - * */ public class Polynomial{ protected String symbolic = "x"; diff --git a/src/math/equation/PolynomialComplex.java b/src/math/equation/PolynomialComplex.java index efbb3e0..c6ba15e 100644 --- a/src/math/equation/PolynomialComplex.java +++ b/src/math/equation/PolynomialComplex.java @@ -2,7 +2,9 @@ package math.equation; import math.number.NumberComplex; - +/** + * @author Daniel Weschke + */ public class PolynomialComplex { private Polynomial re; private Polynomial im; diff --git a/src/math/equation/RationalPolynomial.java b/src/math/equation/RationalPolynomial.java index 635f8e1..a5d54af 100644 --- a/src/math/equation/RationalPolynomial.java +++ b/src/math/equation/RationalPolynomial.java @@ -1,6 +1,8 @@ package math.equation; - +/** + * @author Daniel Weschke + */ public class RationalPolynomial { public Polynomial a; public Polynomial b; diff --git a/src/math/equation/RationalPolynomialComplex.java b/src/math/equation/RationalPolynomialComplex.java index 4c89ba3..a55a3f6 100644 --- a/src/math/equation/RationalPolynomialComplex.java +++ b/src/math/equation/RationalPolynomialComplex.java @@ -3,10 +3,8 @@ package math.equation; import math.number.NumberComplex; /** - * quotient - * a(x) + b(x)i / c(x) + d(x)i - * @author Daniel - * + * quotient ( a(x) + b(x)i ) / ( c(x) + d(x)i ) + * @author Daniel Weschke */ public class RationalPolynomialComplex { diff --git a/src/math/geometry/Point.java b/src/math/geometry/Point.java index 6dc2094..07e3a69 100644 --- a/src/math/geometry/Point.java +++ b/src/math/geometry/Point.java @@ -4,6 +4,9 @@ import java.text.DecimalFormat; import math.matrix.Vector; +/** + * @author Daniel Weschke + */ public class Point { protected double[] point; protected int n; diff --git a/src/math/geometry/PointPolar.java b/src/math/geometry/PointPolar.java index bbd40dd..b576f2c 100644 --- a/src/math/geometry/PointPolar.java +++ b/src/math/geometry/PointPolar.java @@ -1,5 +1,8 @@ package math.geometry; +/** + * @author Daniel Weschke + */ public class PointPolar { double r; double theta; diff --git a/src/math/geometry/PointPolar2D.java b/src/math/geometry/PointPolar2D.java index 1d6be48..a15af86 100644 --- a/src/math/geometry/PointPolar2D.java +++ b/src/math/geometry/PointPolar2D.java @@ -1,13 +1,9 @@ package math.geometry; -/************************************************************************* - * Compilation: javac PointPolar.java - * Execution: java PointPolar - * +/** * Implementation of 2D point using polar coordinates. - * - *************************************************************************/ - + * @author Daniel Weschke + */ public final class PointPolar2D { private final double r; private final double theta; @@ -38,8 +34,6 @@ public final class PointPolar2D { public String toString() { return "(" + x() + ", " + y() + ")"; } - - // test client public static void main(String[] args) { PointPolar2D p = new PointPolar2D(); diff --git a/src/math/matrix/CholeskyDecomposition.java b/src/math/matrix/CholeskyDecomposition.java index 367e911..c6e0f0c 100644 --- a/src/math/matrix/CholeskyDecomposition.java +++ b/src/math/matrix/CholeskyDecomposition.java @@ -2,16 +2,17 @@ package math.matrix; import java.io.Serializable; - /** Cholesky Decomposition. -
- For a symmetric, positive definite matrix A, the Cholesky decomposition - is an lower triangular matrix L so that A = L*L'. -
- If the matrix is not symmetric or positive definite, the constructor - returns a partial decomposition and sets an internal flag that may - be queried by the isSPD() method. - */ - +/** + * Cholesky Decomposition. + *
+ * For a symmetric, positive definite matrix A, the Cholesky decomposition + * is an lower triangular matrix L so that A = L*L'. + *
+ * If the matrix is not symmetric or positive definite, the constructor
+ * returns a partial decomposition and sets an internal flag that may
+ * be queried by the isSPD() method.
+ * @author Daniel Weschke
+ */
public class CholeskyDecomposition implements Serializable {
/* ------------------------
diff --git a/src/math/matrix/Diagonal.java b/src/math/matrix/Diagonal.java
index 68fc447..8e47fab 100644
--- a/src/math/matrix/Diagonal.java
+++ b/src/math/matrix/Diagonal.java
@@ -2,6 +2,11 @@ package math.matrix;
import exception.IllegalDimensionException;
+/**
+ * Diagonal matrix object dij∈ℝ, i≠j=0
+ * with m rows and n columns
+ * @author Daniel Weschke
+ */
public class Diagonal extends Matrix{
/**
diff --git a/src/math/matrix/Diagonal2D.java b/src/math/matrix/Diagonal2D.java
index 2f3c55c..9ad7266 100644
--- a/src/math/matrix/Diagonal2D.java
+++ b/src/math/matrix/Diagonal2D.java
@@ -1,7 +1,10 @@
package math.matrix;
-
-
+/**
+ * 2D diagonal matrix object dij∈ℝ, i≠j=0
+ * with 2 rows and 2 columns
+ * @author Daniel Weschke
+ */
public class Diagonal2D extends Matrix2D {
/**
@@ -9,14 +12,10 @@ public class Diagonal2D extends Matrix2D {
*/
private static final long serialVersionUID = 553077525134866149L;
- public Diagonal2D(int n){
- this(n,n);
- }
-
- public Diagonal2D(int m, int n){
- this.m = m;
- this.n = n;
- data = new double[m>n?m:n];
+ public Diagonal2D(){
+ m = 2;
+ n = 2;
+ data = new double[2];
}
/**
@@ -27,7 +26,7 @@ public class Diagonal2D extends Matrix2D {
*/
public static Diagonal2D identity(int n){
int i;
- Diagonal2D c = new Diagonal2D(n);
+ Diagonal2D c = new Diagonal2D();
for(i=0; i
- If A is not symmetric, then the eigenvalue matrix D is block diagonal
- with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues,
- lambda + i*mu, in 2-by-2 blocks, [lambda, mu; -mu, lambda]. The
- columns of V represent the eigenvectors in the sense that A*V = V*D,
- i.e. A.times(V) equals V.times(D). The matrix V may be badly
- conditioned, or even singular, so the validity of the equation
- A = V*D*inverse(V) depends upon V.cond().
-**/
-
+/**
+ * Eigenvalues and eigenvectors of a real matrix.
+ *
+ * If A is symmetric, then A = V*D*V' where the eigenvalue matrix D is
+ * diagonal and the eigenvector matrix V is orthogonal.
+ * I.e. A = V.times(D.times(V.transpose())) and
+ * V.times(V.transpose()) equals the identity matrix.
+ *
+ * If A is not symmetric, then the eigenvalue matrix D is block diagonal
+ * with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues,
+ * lambda + i*mu, in 2-by-2 blocks, [lambda, mu; -mu, lambda]. The
+ * columns of V represent the eigenvectors in the sense that A*V = V*D,
+ * i.e. A.times(V) equals V.times(D). The matrix V may be badly
+ * conditioned, or even singular, so the validity of the equation
+ * A = V*D*inverse(V) depends upon V.cond().
+ * @author Daniel Weschke
+ */
public class EigenvalueDecomposition implements Serializable {
/**
diff --git a/src/math/matrix/LUDecomposition.java b/src/math/matrix/LUDecomposition.java
index bf277ec..a9fe2a2 100644
--- a/src/math/matrix/LUDecomposition.java
+++ b/src/math/matrix/LUDecomposition.java
@@ -14,6 +14,7 @@ import java.io.Serializable;
* singular, so the constructor will never fail. The primary use of the
* LU decomposition is in the solution of square systems of simultaneous
* linear equations. This will fail if isNonsingular() returns false.
+ * @author Daniel Weschke
*/
public class LUDecomposition implements Serializable {
diff --git a/src/math/matrix/Matrix.java b/src/math/matrix/Matrix.java
index e45cd53..69b14c1 100644
--- a/src/math/matrix/Matrix.java
+++ b/src/math/matrix/Matrix.java
@@ -20,7 +20,7 @@ import exception.NoSquareException;
import exception.SingularException;
/**
- * Matrix object M∈ℝ
+ * Matrix object mij∈ℝ
* with m rows and n columns
* @author Daniel Weschke
* @version 01 November 2013
diff --git a/src/math/matrix/Matrix2D.java b/src/math/matrix/Matrix2D.java
index 6590c09..e11e811 100644
--- a/src/math/matrix/Matrix2D.java
+++ b/src/math/matrix/Matrix2D.java
@@ -9,9 +9,9 @@ import exception.NoSquareException;
import exception.SingularException;
/**
- * Matrix 2xn, m is always 2
- * @author Daniel
- *
+ * 2D matrix object mij∈ℝ
+ * with 2 rows and n columns
+ * @author Daniel Weschke
*/
public class Matrix2D extends Matrix{
diff --git a/src/math/matrix/Matrix3D.java b/src/math/matrix/Matrix3D.java
index 2b02f95..b37ca49 100644
--- a/src/math/matrix/Matrix3D.java
+++ b/src/math/matrix/Matrix3D.java
@@ -6,7 +6,11 @@ import exception.ComplexException;
import exception.IllegalDimensionException;
import exception.NoSquareException;
-
+/**
+ * 3D matrix object mij∈ℝ
+ * with 3 rows and n columns
+ * @author Daniel Weschke
+ */
public class Matrix3D extends Matrix{
/**
* UID
diff --git a/src/math/matrix/QRDecomposition.java b/src/math/matrix/QRDecomposition.java
index 4efa362..31af58b 100644
--- a/src/math/matrix/QRDecomposition.java
+++ b/src/math/matrix/QRDecomposition.java
@@ -15,6 +15,7 @@ import math.Maths;
* QR decomposition is in the least squares solution of nonsquare systems
* of simultaneous linear equations. This will fail if isFullRank()
* returns false.
+ * @author Daniel Weschke
*/
public class QRDecomposition implements Serializable {
diff --git a/src/math/matrix/SingularValueDecomposition.java b/src/math/matrix/SingularValueDecomposition.java
index acbd992..c75a4e0 100644
--- a/src/math/matrix/SingularValueDecomposition.java
+++ b/src/math/matrix/SingularValueDecomposition.java
@@ -16,6 +16,7 @@ import math.Maths;
* The singular value decompostion always exists, so the constructor will
* never fail. The matrix condition number and the effective numerical
* rank can be computed from this decomposition.
+ * @author Daniel Weschke
*/
public class SingularValueDecomposition implements Serializable {
diff --git a/src/math/matrix/TensorII.java b/src/math/matrix/TensorII.java
index 5fe3a6e..0dfc30a 100644
--- a/src/math/matrix/TensorII.java
+++ b/src/math/matrix/TensorII.java
@@ -1,5 +1,9 @@
package math.matrix;
+/**
+ * Second-order tensor (3x3 matrix).
+ * @author Daniel Weschke
+ */
public class TensorII extends Matrix3D {
/**
diff --git a/src/math/matrix/TensorII2D.java b/src/math/matrix/TensorII2D.java
index 63b3cbd..feb061e 100644
--- a/src/math/matrix/TensorII2D.java
+++ b/src/math/matrix/TensorII2D.java
@@ -4,9 +4,8 @@ import math.Maths;
import exception.IllegalDimensionException;
/**
- * Tensor 2x2
- * @author Daniel
- *
+ * Second-order tensor (2x2 matrix).
+ * @author Daniel Weschke
*/
public class TensorII2D extends Matrix2D {
diff --git a/src/math/matrix/Vector.java b/src/math/matrix/Vector.java
index 5d56c17..8b228af 100644
--- a/src/math/matrix/Vector.java
+++ b/src/math/matrix/Vector.java
@@ -11,7 +11,7 @@ import thisandthat.WObject;
import exception.IllegalDimensionException;
/**
- * Vector of real numbers, v∈ℝ.
+ * Vector of real numbers, vi∈ℝ.
* @author Daniel Weschke
*/
public class Vector extends WObject implements Cloneable, Serializable{
diff --git a/src/math/matrix/Vector2D.java b/src/math/matrix/Vector2D.java
index 7b22d9f..ad3b60a 100644
--- a/src/math/matrix/Vector2D.java
+++ b/src/math/matrix/Vector2D.java
@@ -2,6 +2,10 @@ package math.matrix;
import exception.IllegalDimensionException;
+/**
+ * 2D vector of real numbers, vi∈ℝ.
+ * @author Daniel Weschke
+ */
public class Vector2D extends Vector{
/**
diff --git a/src/math/matrix/Vector3D.java b/src/math/matrix/Vector3D.java
index 49a1257..e57a60a 100644
--- a/src/math/matrix/Vector3D.java
+++ b/src/math/matrix/Vector3D.java
@@ -2,6 +2,10 @@ package math.matrix;
import exception.IllegalDimensionException;
+/**
+ * 3D vector of real numbers, vi∈ℝ.
+ * @author Daniel Weschke
+ */
public class Vector3D extends Vector{
/**
diff --git a/src/math/matrix/VectorComplex.java b/src/math/matrix/VectorComplex.java
index 41c1666..c71834a 100644
--- a/src/math/matrix/VectorComplex.java
+++ b/src/math/matrix/VectorComplex.java
@@ -5,8 +5,7 @@ import thisandthat.WObject;
/**
* Complex vector vi∈ℂ
- * @author Daniel
- *
+ * @author Daniel Weschke
*/
public class VectorComplex extends WObject{
/**
diff --git a/src/math/number/Number.java b/src/math/number/Number.java
index cbd31af..a80f40f 100644
--- a/src/math/number/Number.java
+++ b/src/math/number/Number.java
@@ -2,6 +2,9 @@ package math.number;
import thisandthat.WObject;
+/**
+ * @author Daniel Weschke
+ */
public class Number extends WObject {
public static void main(String[] args) {
diff --git a/src/math/number/NumberComplex.java b/src/math/number/NumberComplex.java
index c757b5a..d9c3d38 100644
--- a/src/math/number/NumberComplex.java
+++ b/src/math/number/NumberComplex.java
@@ -2,7 +2,6 @@ package math.number;
import math.Maths;
-
/**
* Data type for complex number ∈ℂ which defines complex arithmetic and
* mathematical functions.
diff --git a/src/math/statistics/Probability.java b/src/math/statistics/Probability.java
index ac726db..81aba23 100644
--- a/src/math/statistics/Probability.java
+++ b/src/math/statistics/Probability.java
@@ -2,7 +2,9 @@ package math.statistics;
import math.Maths;
-
+/**
+ * @author Daniel Weschke
+ */
public class Probability {
/**
diff --git a/src/physics/Nyquist.java b/src/physics/Nyquist.java
index 65b42c8..04e22ce 100644
--- a/src/physics/Nyquist.java
+++ b/src/physics/Nyquist.java
@@ -14,6 +14,9 @@ import math.matrix.Vector;
import stdlib.StdDraw;
import awt.Draw;
+/**
+ * @author Daniel Weschke
+ */
public class Nyquist{
Draw nyquist = new Draw();
static JTextField tf = new JTextField();
diff --git a/src/stdlib/Color.java b/src/stdlib/Color.java
index edeff24..2d92b93 100644
--- a/src/stdlib/Color.java
+++ b/src/stdlib/Color.java
@@ -1,6 +1,8 @@
package stdlib;
-
+/**
+ * @author Daniel Weschke
+ */
public class Color extends java.awt.Color{
/**
diff --git a/src/stdlib/StdArrayIO.java b/src/stdlib/StdArrayIO.java
index 7fa4f1e..1a3aa36 100644
--- a/src/stdlib/StdArrayIO.java
+++ b/src/stdlib/StdArrayIO.java
@@ -1,62 +1,50 @@
package stdlib;
-/*************************************************************************
- * Compilation: javac StdArrayIO.java
- * Execution: java StdArrayIO < input.txt
- *
- * A library for reading in 1D and 2D arrays of integers, doubles,
- * and booleans from standard input and printing them out to
- * standard output.
- *
- * % more tinyDouble1D.txt
- * 4
- * .000 .246 .222 -.032
- *
- * % more tinyDouble2D.txt
- * 4 3
- * .000 .270 .000
- * .246 .224 -.036
- * .222 .176 .0893
- * -.032 .739 .270
- *
- * % more tinyBoolean2D.txt
- * 4 3
- * 1 1 0
- * 0 0 0
- * 0 1 1
- * 1 1 1
- *
- * % cat tinyDouble1D.txt tinyDouble2D.txt tinyBoolean2D.txt | java StdArrayIO
- * 4
- * 0.00000 0.24600 0.22200 -0.03200
- *
- * 4 3
- * 0.00000 0.27000 0.00000
- * 0.24600 0.22400 -0.03600
- * 0.22200 0.17600 0.08930
- * 0.03200 0.73900 0.27000
- *
- * 4 3
- * 1 1 0
- * 0 0 0
- * 0 1 1
- * 1 1 1
- *
- *************************************************************************/
-
-
/**
- * Standard array IO. This class provides methods for reading
- * in 1D and 2D arrays from standard input and printing out to
- * standard output.
- *
- * For additional documentation, see
- * Section 2.2 of
- * Introduction to Programming in Java: An Interdisciplinary Approach
- * by Robert Sedgewick and Kevin Wayne.
+ * Standard array IO. This class provides methods for reading
+ * in 1D and 2D arrays of integers, doubles, and booleans from standard
+ * input and printing out to standard output.
+ *
+ * For additional documentation, see
+ * Section 2.2 of
+ * Introduction to Programming in Java: An Interdisciplinary Approach
+ * by Robert Sedgewick and Kevin Wayne.
*
- * @author Robert Sedgewick
- * @author Kevin Wayne
+ * % more tinyDouble1D.txt
+ * 4
+ * .000 .246 .222 -.032
+ *
+ * % more tinyDouble2D.txt
+ * 4 3
+ * .000 .270 .000
+ * .246 .224 -.036
+ * .222 .176 .0893
+ * -.032 .739 .270
+ *
+ * % more tinyBoolean2D.txt
+ * 4 3
+ * 1 1 0
+ * 0 0 0
+ * 0 1 1
+ * 1 1 1
+ *
+ * % cat tinyDouble1D.txt tinyDouble2D.txt tinyBoolean2D.txt | java StdArrayIO
+ * 4
+ * 0.00000 0.24600 0.22200 -0.03200
+ *
+ * 4 3
+ * 0.00000 0.27000 0.00000
+ * 0.24600 0.22400 -0.03600
+ * 0.22200 0.17600 0.08930
+ * 0.03200 0.73900 0.27000
+ *
+ * 4 3
+ * 1 1 0
+ * 0 0 0
+ * 0 1 1
+ * 1 1 1
+ *
+ * @author Daniel Weschke
*/
public class StdArrayIO {
diff --git a/src/stdlib/StdDraw.java b/src/stdlib/StdDraw.java
index 7ec3501..dd29b0d 100644
--- a/src/stdlib/StdDraw.java
+++ b/src/stdlib/StdDraw.java
@@ -1,28 +1,5 @@
package stdlib;
-/*************************************************************************
- * Compilation: javac StdDraw.java
- * Execution: java StdDraw
- *
- * Standard drawing library. This class provides a basic capability for
- * creating drawings with your programs. It uses a simple graphics model that
- * allows you to create drawings consisting of points, lines, and curves
- * in a window on your computer and to save the drawings to a file.
- *
- * Todo
- * ----
- * - Add support for gradient fill, etc.
- *
- * Remarks
- * -------
- * - don't use AffineTransform for rescaling since it inverts
- * images and strings
- * - careful using setFont in inner loop within an animation -
- * it can cause flicker
- *
- *************************************************************************/
-
-
import java.awt.BasicStroke;
import java.awt.FileDialog;
import java.awt.Font;
@@ -63,13 +40,24 @@ import javax.swing.JMenuItem;
import javax.swing.KeyStroke;
/**
- * Standard draw. This class provides a basic capability for
- * creating drawings with your programs. It uses a simple graphics model that
- * allows you to create drawings consisting of points, lines, and curves
- * in a window on your computer and to save the drawings to a file.
- *
- * For additional documentation, see Section 1.5 of
- * Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
+ * Standard draw. This class provides a basic capability for
+ * creating drawings with your programs. It uses a simple graphics model that
+ * allows you to create drawings consisting of points, lines, and curves
+ * in a window on your computer and to save the drawings to a file.
+ *
+ * For additional documentation, see Section 1.5 of
+ * Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
+ * Todo
+ * ----
+ * - Add support for gradient fill, etc.
+ *
+ * Remarks
+ * -------
+ * - don't use AffineTransform for rescaling since it inverts
+ * images and strings
+ * - careful using setFont in inner loop within an animation -
+ * it can cause flicker
+ * @author Daniel Weschke
*/
public class StdDraw implements ActionListener, MouseListener, MouseMotionListener, KeyListener {
diff --git a/src/stdlib/StdIn.java b/src/stdlib/StdIn.java
index baa6026..98ecfaa 100644
--- a/src/stdlib/StdIn.java
+++ b/src/stdlib/StdIn.java
@@ -1,29 +1,22 @@
package stdlib;
-/*************************************************************************
- * Compilation: javac StdIn.java
- * Execution: java StdIn
- *
- * Reads in data of various types from standard input.
- *
- *************************************************************************/
-
import java.io.BufferedInputStream;
import java.util.Locale;
import java.util.Scanner;
/**
- * Standard input. This class provides methods for reading strings
- * and numbers from standard input.
- *
- * The Locale used is: language = English, country = US. This is consistent
- * with the formatting conventions with Java floating-point literals,
- * command-line arguments (via Double.parseDouble())
- * and standard output (via System.out.print()). It ensures that
- * standard input works with the input files used in the textbook.
- *
- * For additional documentation, see Section 1.5 of
- * Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
+ * Standard input. This class provides methods for reading strings
+ * and numbers from standard input.
+ *
+ * The Locale used is: language = English, country = US. This is consistent
+ * with the formatting conventions with Java floating-point literals,
+ * command-line arguments (via Double.parseDouble())
+ * and standard output (via System.out.print()). It ensures that
+ * standard input works with the input files used in the textbook.
+ *
+ * For additional documentation, see Section 1.5 of
+ * Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
+ * @author Daniel Weschke
*/
public final class StdIn {
diff --git a/src/stdlib/StdOut.java b/src/stdlib/StdOut.java
index aa611b8..6ea75a9 100644
--- a/src/stdlib/StdOut.java
+++ b/src/stdlib/StdOut.java
@@ -1,24 +1,19 @@
package stdlib;
-/*************************************************************************
- * Compilation: javac StdOut.java
- * Execution: java StdOut
- *
- * Writes data of various types to standard output.
- *
- *************************************************************************/
-
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.util.Locale;
/**
- * Standard output. This class provides methods for writing strings
- * and numbers to standard output.
- *
- * For additional documentation, see Section 1.5 of
- * Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
+ * Standard output. This class provides methods for writing strings
+ * and numbers to standard output.
+ *
+ * For additional documentation, see
+ * Section 1.5 of
+ * Introduction to Programming in Java: An Interdisciplinary Approach
+ * by Robert Sedgewick and Kevin Wayne.
+ * @author Daniel Weschke
*/
public final class StdOut {
diff --git a/src/string/WString.java b/src/string/WString.java
index b3ae4a4..855cac7 100644
--- a/src/string/WString.java
+++ b/src/string/WString.java
@@ -4,6 +4,9 @@ import java.util.Arrays;
import thisandthat.WObject;
+/**
+ * @author Daniel Weschke
+ */
public class WString extends WObject{
String str;
diff --git a/src/thisandthat/WObject.java b/src/thisandthat/WObject.java
index 9c33173..20b4b3f 100644
--- a/src/thisandthat/WObject.java
+++ b/src/thisandthat/WObject.java
@@ -1,5 +1,8 @@
package thisandthat;
+/**
+ * @author Daniel Weschke
+ */
public class WObject {
private static boolean supressErrorMessage = false;
private String name;