Hi guys. Need help with my first assignment this quarter. Don't know where to start. Any help is appreciated! Must read the files from a txt. Might just be stressing it but this seems very difficult. Thanks again
Write a program that computes a product of first degree polynomials
with integer coefficients.For easy parsing, the polynomials are given in
the file binomials.txt as follows
3x + 5
-8x - 9
2x + 3
There is no space between the coefficient and the variable x. The output
in this case should be.
-48x^3 - 206x^2 - 291 x + 135
You may use any data structure that you want; arrays, ArrayList<E>,
etc.
3 Replies - 721 Views - Last Post: 09 October 2016 - 05:31 PM
#1
Write a program that computes a product of first degree polynomials
Posted 09 October 2016 - 04:46 PM
Replies To: Write a program that computes a product of first degree polynomials
#2
Re: Write a program that computes a product of first degree polynomials
Posted 09 October 2016 - 05:04 PM
My suggestions:
Make a list of the steps needed to solve the problem
Work on the steps one at a time.
Compile often - fix all errors before writing more code.
If you have problems and need help, post your code (wrapped in code tags)
and describe the problems. Post the full text of any error messages.
Make a list of the steps needed to solve the problem
Work on the steps one at a time.
Compile often - fix all errors before writing more code.
If you have problems and need help, post your code (wrapped in code tags)
and describe the problems. Post the full text of any error messages.
This post has been edited by NormR: 09 October 2016 - 05:05 PM
#3
Re: Write a program that computes a product of first degree polynomials
Posted 09 October 2016 - 05:23 PM
Currently, I don't see an attempt to do anything.
Make an attempt to read the file and to parse the lines.
Make an attempt to read the file and to parse the lines.
#4
Re: Write a program that computes a product of first degree polynomials
Posted 09 October 2016 - 05:31 PM
Yes, thats what i was thinking on starting with. I'll start with that approach.
Page 1 of 1

New Topic/Question
Reply


MultiQuote




|