📄 polynomialtype.h
字号:
#ifndef H_polynomial
#define H_polynomial
#include <iostream>
#include "arrayListType.h"
using namespace std;
class polynomialType: public arrayListType<double>
{
friend ostream& operator<<(ostream&, const polynomialType&);
//overload stream insertion operator
friend istream& operator>>(istream&, polynomialType&);
//overload stream extraction operator
public:
polynomialType operator+(const polynomialType&);
//overload the operator +
polynomialType operator-(const polynomialType&);
//overload the operator -
polynomialType operator*(const polynomialType&);
//overload the operator *
double operator() (double x);
//overload the operator () to evaluate the
//polynomial at a given point
//Postcondition: The value of the plynomial at x
// is calculated and returned
polynomialType(int size = 100);
//constructor
int min(int x, int y);
//Function to return the smaller of x and y
int max(int x, int y);
//Function to return the larger of x and y
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -