3 Replies - 721 Views - Last Post: 09 October 2016 - 05:31 PM Rate Topic: -----

#1 gamino1996   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 09-October 16

Write a program that computes a product of first degree polynomials

Posted 09 October 2016 - 04:46 PM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: Write a program that computes a product of first degree polynomials

#2 NormR   User is offline

  • D.I.C Lover
  • member icon

Reputation: 870
  • View blog
  • Posts: 6,695
  • Joined: 25-December 13

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.

This post has been edited by NormR: 09 October 2016 - 05:05 PM

Was This Post Helpful? 1
  • +
  • -

#3 astonecipher   User is offline

  • Enterprise Software Architect
  • member icon

Reputation: 3215
  • View blog
  • Posts: 12,098
  • Joined: 03-December 12

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.
Was This Post Helpful? 1
  • +
  • -

#4 gamino1996   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 09-October 16

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1