An abstract model of an elliptic curve is designed as a Java-based application. In this abstract model we implement two distinct elliptic curve types: the Weierstraß curve and the twisted Edwards curve. This model will be used in the algorithm for elliptic curve construction with complex multiplication, in short the CM-method. We implement the elliptic curve primality proving algorithm (ECPP) developed by Atkin/Morain as an application of the CM-method. Instead of using pseudocode, the algorithms are represented explicitly as source code simultaneously with the underlying theory. Finally, we analyze a probable acceleration of the Atkin-Morain s ECPP algorithm by replacing the Weierstraß curve by the twisted Edwards curve.