Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is the polynomial.cpp CSci 1113: Introduction to C/C++ Programming for Scientists and Engineers Spring 2018 Homework 10 Due Date: Friday, April 27, 2018 at

image text in transcribedimage text in transcribed

Here is the polynomial.cpp

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribed

CSci 1113: Introduction to C/C++ Programming for Scientists and Engineers Spring 2018 Homework 10 Due Date: Friday, April 27, 2018 at 6:00pm. Instructions: This is an individual homework assignment. There are two problems worth 10 points each. Solve each problem below by yourself (unlike the labs, where you can work collaboratively), and submit each solution as a separate C++ source code file. Here are a few more important details You submit the correct file(s) through Canvas by the due deadline You should follow the example input and output formats given in each problem description. (match the input and output format exactly) . Problem A: Polynomial multiplication (10 points) Start with the polynomial.cpp file provided. This is a basic outline of the class, which reads the in the polynomial from the keyboard. You must overload the multiplication operator to multiply polynomials together (i.e., FOIL arbitrary dimension polynomials'). Also overload for cout and make sure you follow exactly the formatting shown below The program provided has no memory leaks, and your submission should not leak memory as well In other words, if you create dynamic memory you also need to delete it somewhere in the code [Hint: What is the relationship to the index and the power of "X"?) Example 1 (user input is underlined) What are the coefficients of first polynomial (lowest power first)? 1 2 3 What are the coefficients of second polynomial (lowest power first)? 4 5 6 (4) (13)x1 (28)x*2 + (27) x*3(18) x*4 Example 2 (user input is underlined) What are the coefficients of first polynomial (lowest power first)? 1 -2 1 What are the coefficients of second polynomial (lowest power first)? (-1) (2)x1(1)x*2 1 https://en.wikipedia.org/wiki/FOIL_method CSci 1113: Introduction to C/C++ Programming for Scientists and Engineers Spring 2018 Homework 10 Due Date: Friday, April 27, 2018 at 6:00pm. Instructions: This is an individual homework assignment. There are two problems worth 10 points each. Solve each problem below by yourself (unlike the labs, where you can work collaboratively), and submit each solution as a separate C++ source code file. Here are a few more important details You submit the correct file(s) through Canvas by the due deadline You should follow the example input and output formats given in each problem description. (match the input and output format exactly) . Problem A: Polynomial multiplication (10 points) Start with the polynomial.cpp file provided. This is a basic outline of the class, which reads the in the polynomial from the keyboard. You must overload the multiplication operator to multiply polynomials together (i.e., FOIL arbitrary dimension polynomials'). Also overload for cout and make sure you follow exactly the formatting shown below The program provided has no memory leaks, and your submission should not leak memory as well In other words, if you create dynamic memory you also need to delete it somewhere in the code [Hint: What is the relationship to the index and the power of "X"?) Example 1 (user input is underlined) What are the coefficients of first polynomial (lowest power first)? 1 2 3 What are the coefficients of second polynomial (lowest power first)? 4 5 6 (4) (13)x1 (28)x*2 + (27) x*3(18) x*4 Example 2 (user input is underlined) What are the coefficients of first polynomial (lowest power first)? 1 -2 1 What are the coefficients of second polynomial (lowest power first)? (-1) (2)x1(1)x*2 1 https://en.wikipedia.org/wiki/FOIL_method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

ISBN: 0132742926, 978-0132742924

More Books

Students also viewed these Databases questions