PolynomialD0 defines a degree 0 polynomial.


public class PolynomialD0 extends Object

Default constructor

Postcondition: myA == 0.0.


public PolynomialD0(double aValue)

Construct from double

Receive: double aValue.

Postcondition: myA == aValue.


public PolynomialD0(String polyString)

Construct from String

Receive: StringBuffer polyString.

Precondition: polyString is of the form "a", where a is a numeric value.

Postcondition: myA == a && a has been removed from polyString.


public double getA()

A-attribute accessor

Return: myA.


public void setA(double newA)

A-attribute mutator

Receive: double newA.

Postcondition: myA == newA.


public String toString()

String converter (output)

Return: the String equivalent to myA.


Back to the package documentation index

Back to the Introduction

Copyright 2000 by Prentice Hall. All rights reserved.