MYPROGRAMMINGLAB WITH PEARSON ETEXT
MYPROGRAMMINGLAB WITH PEARSON ETEXT
8th Edition
ISBN: 9780134225340
Author: Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 18, Problem 18.11E
Program Plan Intro

Program plan:

  • Define class Polynomial. Inside this class,
    • Include a private data members size of type int and coefs array of type double.
    • Include a default constructor to initialize size to 1 and coefs to 0.
    • Include a parametrized constructor to initialize size and coefsarray to user defined values.
    • Overload arithmetic operators for this class using through friend function.
    • Overload input output operators for this class.
    • Overload relational operator for this class.
  • Define a main function. Inside main function,
    • Define four objects p1, p2, p3 and p4 of Polynomial class.
    • Define an array a and a4 of type double holding coefficients.
    • Use coefficients in array ato initialize polynomial p1 and p2 and array a4 to initialize polynomial p4.
    • Then apply all the overloaded operators on these four objects.

Program Description: The following program will create a Polynomial class to represent the polynomials and include functions for operations on these polynomial like base data types.

Blurred answer
Students have asked these similar questions
PLEASE SOLVE STEP BY STEP WITHOUT ARTIFICIAL INTELLIGENCE OR CHATGPT I don't understand why you use chatgpt, if I wanted to I would do it myself, I need to learn from you, not from being a d amn robot. SOLVE  STEP BY STEP I WANT THE DIAGRAM PERFECTLY IN SIMULINK
I need to develop and run a program that prompts the user to enter a positive integer n, and then calculate the value of n factorial n! = multiplication of all integers between 1 and n, and print the value n! on the screen. This is for C*.
I need to develop and run a C* program to sum up integers from 1 to 100, and print out the sum value on the screen. Can someone help please?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning