Made concerts super class abstract

From CodePro:

Description

Abstract subclass of a concrete class

Explanation

The class PhysicsEntity is an abstract class even though it inherits from the concrete class Entity. This kind of inheritance relationship often indicates a problem in the design.

Recommendation

1. Make the subclass concrete by removing the "abstract" modifier.
Removed use of a platform specific line separator

New logger no longer necessitates use of the old println call.
Declaring variable outside of loop.
Replaced comparisons using == with an invocation of equals(). Also added TODO

From CodePro:

Description

Should not compare values using the equals (==) operator

Explanation

Comparing values by using the equality (==) operator is not always accurate.

Recommendation

1. Replace the comparison with an invocation of equals().
Made the overriden method synchronized.

From CodePro

Description

Non-synchronized method should not override a synchronized method

Explanation

The non-synchronized method pop overrides a synchronized method. That usually indicates thread-unsafe code.

Recommendation

1. Make the method synchronized.
Removed unnecessary type casts

From CodePro:

Description

Unnecessary type cast to int

Explanation

The type cast is unnecessary because the expression is already of type int.

Recommendation

1. Delete the unnecessary cast.
Cast integer to float for floating point division. Trying to prevent rounding error.

From CodePro:

Description

Integer division in a floating-point expression

Explanation

If the result of that division is going to be converted to a floating-point value, one of the integers should probably be cast to that same floating-point type in order to avoid the rounding error.

Recommendation

1. Cast one of the integers to a float. This will prevent round off error.
Added float/double equality checker.

From CodePro:

Summary
Floating-point values should not be compared using equals (==) or not equals (!=).

Description
This audit rule finds places where two floating-point values are compared using either the equals (==) or not equals (!=) operators. The problem is that floating-point values are not exact, and floating-point operations sometimes introduce rounding errors. This sometimes results in getting the wrong result from equality-based comparisons.

Example
Given two floating point variables:

	double oneThird = 1.0 / 3.0;
	double anotherThird = (2.0 / 3.0) - oneThird;

The following expression would be flagged as a violation:

	if (oneThird == anotherThird)