exam1 - EECE 230 Final Exam Section 5 ELEG 025 - 4 Lab...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Open Book: 2 Hours January, 13 2003 Name: _________________________ ID: __________________________ Solve Three out of the Following Four Problems 1. Develop a class Polynomial which should contain as member variables an array of coefficients. The value of an array element would represent the coefficient and the index would represent the corresponding exponent. For example, to represent term 3 x 2 in a polynomial the value 3 would enter at index 2 of the array. Consider that the highest polynomial order is 20. Develop constructors for the class and a utility function that will evaluate the value of a polynomial of x for a given x . Test the class using simple first and second order polynomials. Provide the following overloaded operator capabilities: a) Overload the addition operator ( + ) to add two polynomials b) Overload the subtraction operator ( ) to subtract two polynomials c) Overload the assignment operator ( = ) to assign one polynomial to another d) Overload the multiplication operator ( * ) to multiply two polynomials. e) Overload the insertion (<<) operator to print the form of a polynomial, for example as: 3x2 – 2x + 1 2. Write a program that inputs a numeric check amount and write the word equivalent of it.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/26/2010 for the course EECE 230 taught by Professor Samikaraki during the Fall '07 term at American University of Beirut.

Page1 / 2

exam1 - EECE 230 Final Exam Section 5 ELEG 025 - 4 Lab...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online