A Simple Java Project

进行中 已发布的 Apr 20, 2012 货到付款
进行中 货到付款

This is a Intro to Java Project for a High School Class.

Write a class encapsulating the concept of a polynomial. A polynomial can be represented as an array of terms, each term containing a coefficient (float) and an exponent (integer). For example, the term 3x^5 has a coefficient of 3 and an exponent of 5. The polynomial 3x^5-4x^2+7 can be represented as an array of 3 terms.

The number of terms in a polynomial will not exceed 50. However, you should dynamically allocate memory for each polynomial. You may want to include a variable to keep track of how many terms there are in a particular polynomial.

1. Write appropriate constructors, accessor and mutator methods.

2. Write a member method called **GetPoly() **which will prompt and read in a polynomial from the user. This function should give clear instructions as to how the polynomial should be input. You will assume that each term of the polynomial will be written in descending order of the exponent.

For example, in order to read in 3x^5-4x^2+7:

*How Many Terms: **3

*** *Enter the Coefficient for Term 1: **3

*** *Enter the Exponent for Term 1: **5

*** *

* *Enter the Coefficient for Term 2: **4

*** *Enter the Exponent for Term 2: **2

***

*Enter the Coefficient of term 3: **7**

* *Enter the Exponent of term 3: *****

3. Write the toString method. Consider what happens when the coefficient is 1, when the coefficient is negative and when the exponent is 0.

[login to view URL] methods to do Addition, subtraction and multiplication of polynomials. (Remember, to multiply polynomials, you must distribute)

**Write a client class to test all the methods, Include specific INstructions on altering your main() for testing purposes.

**

**

**

Java 脚本安装 shell脚本 软件构架 视窗桌面

项目ID: #2733699

关于项目

3个方案 远程项目 活跃的Apr 20, 2012

有3名威客正在参与此工作的竞标,均价$29/小时

KiMdesign2011

See private message.

$25.5USD 在1天里
(8条评论)
3.0
dryinego

See private message.

$51USD 在1天里
(0条评论)
1.2
alojzyzawadowicz

See private message.

$10USD 在1天里
(0条评论)
0.0