This project is adapted from the programming project 8 of Chapter 2 of the book titled "Data Structures & Other Objects Using Java", 3rd edition, by Michael Main.

A one-variable quadratic expression is an arithmetic expression of the form *ax2+bx +c, *where a, b, and c are some fixed numbers (called coefficients) and *x *is a variable that can take on different values.

1. ** Specify, design and implement **a class named

Also write the following *methods *to perform these indicated operations:

public static Quadratic sum(Quadratic q1, Quadratic q2)

// Post-condition: The return value is the quadratic expression obtained by adding // q1 and q2. For example, the c coefficient of the return value is the sum of q1’s c

// coefficient and q2’s c coefficient.

public static Quadratic scale(double r, Quadratic q2)

// Post-condition: The return value is the quadratic expression obtained by

// multiplying each of q’s coefficients by the number r.

public boolean equals(Object q)

*// Post-condition: returns true if and only if q refers to a *Quadratic *object and its *

*// state is the same as this *Quaratic *object. *

public Object clone()

*// Post-condition: returns a separate copy of this *Quadratic *object. *

public String toString()

// Post-condition: returns a string representation of this Quadratic object.

* 2. Implement *a separate class named

Enjoy Programming!

Please submit

1. Analysis: test data;

2. Design:

ï‚§ **Class diagrams showing representation of data; **

ï‚§ **A class invariant for each class; **

ï‚§ **Pre/Post conditions for required operations; **

ï‚§ **Algorithms for required operations. Algorithms can be described in English, flow diagrams, or sequence diagrams; **

3. Code;

4. Screen snapshots of test runs

Subject | Computer |

Due By (Pacific Time) | 07/10/2015 12:00 am |

Tutor | Rating |
---|---|

pallavi Chat Now! |
out of 1971 reviews More.. |

amosmm Chat Now! |
out of 766 reviews More.. |

PhyzKyd Chat Now! |
out of 1164 reviews More.. |

rajdeep77 Chat Now! |
out of 721 reviews More.. |

sctys Chat Now! |
out of 1600 reviews More.. |

sharadgreen Chat Now! |
out of 770 reviews More.. |

topnotcher Chat Now! |
out of 766 reviews More.. |

XXXIAO Chat Now! |
out of 680 reviews More.. |