Description: A d-order polynomial has the following form:
cdxd+ cd-1xd-1+ cd-2xd-2 ...+ c0
Which, cd ≠ 0, index are non-negative. In each one of the polynomial cixi.
Design template a C++ class Polynomial <T>, T given coefficient type, the request can be realized and computing polynomial representation. Polynomial class should include the private variable degree, and other variables needed. Requires the polynomial representation of the linear form of tables, such as (c0, c1, c2, ..., cd) represents the coefficient table. And to design and operate the following member functions:
(a) Polynomial (), to create the zero-order polynomial, the constructor
(b) Degree (), return to the order of the polynomial degree
(c) Input (), the input polynomial, exponential in the ascending order of the index and enter each one factor. For example, enter: 0 c0 1 c1 2 c2 ... d cd. Overloaded >> complete the entry.
(d) Output (), output of the polynomial, and input the same format. Overloaded <<
To Search:
File list (Check if you may need any files):
DOC
...\week03.docx
...\week03.pdf
...\理论课作业 P127.doc
EXE
...\week03.exe
SRC
...\week03.cpp
...\week03.h