Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please read the instructions on How to Prepare and Submit Assignments. This assignment will give you an opportunity to practice your work with C +
Please read the instructions on How to Prepare and Submit Assignments. This assignment will give you an opportunity to practice your work with C classes. It is designed to make sure that everyone is starting from a level where they can move forward successfully into CS This assignment does not require any C skillsknowledge not covered in CS and CS If your memories are rusty, however, or if you transferred CS credits from some other college, or if you cruised through the final third of CS on the strength of strong grades in the first this is a good opportunity for review before we move on to new material. Instructions Read the problem description below. Get the files for this assignment. Compile the program as is to familiarize yourself with it You will receive error messages. Read them. They are hints as to what is missing from the current code. Your focus in this assignment will on the implementation of the Polynomial class in files polynomial.h and polynomial.cpp This class stores the set of coefficients that define a polynomial egxx Although the immediate use of Polynomial is in support of this polyfactor program, we anticipate the possibility that Polynomial may be reused in other future projects, so we want to make sure that it is designed and implemented to facilitate that reuse. You must not change the private data members in polynomial.hYou may, if you wish, add additional private function members if doing so would aid you in completing the implementation. You may need to change some of the public functions in polynomial.h but keep in mind that the Polynomial class must continue to compile with the other code in this program. Your code will be evaluated both on its ability to function correctly within the polyfactor application the systems tests and on its ability to pass the various unit tests provided. You are not limited to using my system tests. Its always a good ide ato run the program on data of your own choosing as well. In the test report, Tests with names beginning with sm are systems tests, including checks for memory leaks and other memory errors. Other tests with names beginning with s are systems tests, ignoring memory leaks. Tests with names beginning with um are unit tests, including checks for memory leaks and other memory errors. Other tests with names beginning with u are unit tests, ignoring memory leaks. Submit your assignment by committing your changes and pushing them to GitHub. After the assignment due date has passed, your most recent push will be graded by the instructor. Assignment management Actions Get the starting code for this project and register your GitHub repository. View your current grade report.. A request for a preliminary grade report will be automatically filed each time you push changes to your repository. It may be several minutes before grading begins, depending on how many requests are in front of yours. Grading itself can take anywhere from a few seconds to many minutes. On rare occasions the request from GitHub to our servers may fail. Also, your web browser may have cached the old report and be showing that to you. If more than an hour has passed since you last pushed changes, and your grade report has not updated, you should: Clear your browsers cache files only, not cookies or history and then try to view the grade report again. If that does not work, request preliminary grading of your most recent push. View the solution. Files that you may change: polynomial.h polynomial.cpp Problem Description Computer software can be as adept at manipulating formulas as it is at evaluating them. This assignment centers on a program that generates manipulates polynomials. In particular, it deals with the problem of factoring a polynomial into smaller polynomials that can be multiplied together to yield the original. You almost certainly spent a lot of time learning to do this when you learned algebra and you probably did not enjoy it very much The Application Program The program, polyfactor, reads a polynomial from the command line and makes a list of all linear factors factors of the form axb where a and b are integers The input is given as a list of integers representing the coefficients of each term, starting from the highest degree term and then down to the constant term. For example, you could try to factor the polynomial xxx like this: polyfactor You should see the output: Attempting to factor: xxx factor: x factor: x factor: x because xxxxxx Or you might try to factor x and see: polyfactor Attempting to factor: x factor: x could not factor: x x because xxxx The program cannot do all possible factorizations, however:
Please read the instructions on How to Prepare and Submit Assignments.
This assignment will give you an opportunity to practice your work with C classes. It is designed to make sure that everyone is starting from a level where they can move forward successfully into CS
This assignment does not require any C skillsknowledge not covered in CS and CS If your memories are rusty, however, or if you transferred CS credits from some other college, or if you cruised through the final third of CS on the strength of strong grades in the first this is a good opportunity for review before we move on to new material.
Instructions
Read the problem description below.
Get the files for this assignment. Compile the program as is to familiarize yourself with it You will receive error messages. Read them. They are hints as to what is missing from the current code.
Your focus in this assignment will on the implementation of the Polynomial class in files polynomial.h and polynomial.cpp This class stores the set of coefficients that define a polynomial egxx
Although the immediate use of Polynomial is in support of this polyfactor program, we anticipate the possibility that Polynomial may be reused in other future projects, so we want to make sure that it is designed and implemented to facilitate that reuse.
You must not change the private data members in polynomial.hYou may, if you wish, add additional private function members if doing so would aid you in completing the implementation.
You may need to change some of the public functions in polynomial.h but keep in mind that the Polynomial class must continue to compile with the other code in this program.
Your code will be evaluated both on its ability to function correctly within the polyfactor application the systems tests and on its ability to pass the various unit tests provided.
You are not limited to using my system tests. Its always a good ide ato run the program on data of your own choosing as well.
In the test report,
Tests with names beginning with sm are systems tests, including checks for memory leaks and other memory errors.
Other tests with names beginning with s are systems tests, ignoring memory leaks.
Tests with names beginning with um are unit tests, including checks for memory leaks and other memory errors.
Other tests with names beginning with u are unit tests, ignoring memory leaks.
Submit your assignment by committing your changes and pushing them to GitHub. After the assignment due date has passed, your most recent push will be graded by the instructor.
Assignment management
Actions
Get the starting code for this project and register your GitHub repository.
View your current grade report..
A request for a preliminary grade report will be automatically filed each time you push changes to your repository.
It may be several minutes before grading begins, depending on how many requests are in front of yours. Grading itself can take anywhere from a few seconds to many minutes.
On rare occasions the request from GitHub to our servers may fail. Also, your web browser may have cached the old report and be showing that to you.
If more than an hour has passed since you last pushed changes, and your grade report has not updated, you should:
Clear your browsers cache files only, not cookies or history and then try to view the grade report again.
If that does not work, request preliminary grading of your most recent push.
View the solution.
Files that you may change:
polynomial.h
polynomial.cpp
Problem Description
Computer software can be as adept at manipulating formulas as it is at evaluating them.
This assignment centers on a program that generates manipulates polynomials. In particular, it deals with the problem of factoring a polynomial into smaller polynomials that can be multiplied together to yield the original. You almost certainly spent a lot of time learning to do this when you learned algebra and you probably did not enjoy it very much
The Application Program
The program, polyfactor, reads a polynomial from the command line and makes a list of all linear factors factors of the form axb
where a
and b
are integers The input is given as a list of integers representing the coefficients of each term, starting from the highest degree term and then down to the constant term.
For example, you could try to factor the polynomial xxx
like this:
polyfactor
You should see the output:
Attempting to factor: xxx
factor: x
factor: x
factor: x
because
xxxxxx
Or you might try to factor x
and see:
polyfactor
Attempting to factor: x
factor: x
could not factor: x x
because
xxxx
The program cannot do all possible factorizations, however:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started