Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Okay, I\'m going to re-ask this, looking for MORE help. I mean, explicit help. T

ID: 3655786 • Letter: O

Question

Okay, I'm going to re-ask this, looking for MORE help. I mean, explicit help. This is homework, and I feel a little like a loser but I have no clue how to go about setting up the functions or solving the methods. This seems a little advanced for my skill level, which is newb noob nube.... i am really really new at this, but it is assigned so I need to find a way to understand it and turn it in. I'm really stuck. If someone can SHOW me the code, write the code, whatever you call it for the first parts, I can do the rest. If you don't want to post it here, it can be emailed to me at gigantic.turkey at gmail.com. I was able to find a lot of similar solutions to this very problem on the internet, but they are way more complicated and I do not understand all of the discussion nor codes. I need someone to give me the code for the following: 1.Write a declaration for a Polynomial class whose data members are an integer for a degree and an array for the list of coefficients and with basic operations on input and output. (I have to declare a polynomial class, with coefficients in an array and integer degree. No biggie, except that I already don't know how to make the coefficient match with its integer. How do I write that?) 2.Now implement the input operation for the class you just created. (is that just cin >> and whatever I am trying to store? I don't know what this means). 3.Now use an output operation to display the polynomial in the usual mathematical format with x^n displayed as x^n (I have to display it as displayed as x^n. Is that just some "words" between prints to get that effect or is there a secret method I don't know about that does this automatically? Again, I would need to see that.) 4. Next add an evaluate operation to your class that allows the user to enter a value for x and that calculates the value of the polynomial for that value (To me this says the user will enter a value for x, and my code must calculate the value mathematical format of the polynomial for that value. It later asks me to perform addition, which confuses me because I would have used addition for THIS part. I really don't understand what it is asking). When compiled, I need to be able to do + - * / for the polynomial. I think I can do it, but I am not 100% positive. I'd like to see the code. It asks for this later in the problem, but it asks for it in the beginning too, so I am baffled. But if someone can just give me what I am asking for, the code to this first 4 sections, I will do the rest. If you help me get the structure and methods, I am sure I can resolve the functions and class data members myself. I think. ANY help is appreciated. Please please please show me how to get started. I am sorry to beg, but I am low in time (due tonight) and I am really behind the 8-ball. Earlier someone sent me to a webpage to read on it, and I did. So, I sort of understand what I am looking for, but I have no clue how to write it. Thank you for your help.

Explanation / Answer

//part of program //the coefficient can be 'match' with degrees by saying the index of the array is the //degree it corresponds to //you are right about cin using 'words' //didnt overload any of the operations besides >> (istream &in, Polynomial &p); //friend Polynomial operator+(const Polynomial &a, const Polynomial &b); // friend Polynomial operator-(const Polynomial &a, const Polynomial &b); }; Polynomial::Polynomial(){ degree=3; coefficients=new int[4]; } Polynomial::Polynomial(int deg){ degree=deg; coefficients=new int[deg+1]; } Polynomial::~Polynomial(){ delete[] coefficients; } void Polynomial::setCoefficients(){ cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote