Given the above class declaration, which of the following constructors is correct?
A. CompGenerate<float> gen = new CompGenerate<float>();
B. CompGenerate gen = new CompGenerate(10.125, 2005);
C. CompGenerate<double> gen = new CompGenerate<double>(10.125, 2005);
D. CompGenerate<double, float> gen = new CompGenerate<double, float>(20.125, 10.525);
Answer:C
Given the above class declaration, which of the following constructors is correct?
A. CompGenerate<float> gen = new CompGenerate<float>(); B. CompGenerate gen = new CompGenerate(10.125, 2005); C. CompGenerate<double> gen = new CompGenerate<double>(10.125, 2005); D. CompGenerate<double, float> gen = new CompGenerate<double, float>(20.125, 10.525);
Explanation: The following constructor is correct: CompGenerate<double> gen = new CompGenerate<double>(10.125,