



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Lab; Class: OBJECT ORIENTED DATA STRUCTURE; Subject: Computer Science; University: Wentworth Institute of Technology; Term: Unknown 1989;
Typology: Lab Reports
1 / 5
This page cannot be seen from the preview
Don't miss anything!




p. 164 #
p. 164 # p. 207 #
p. 208 #12, #14ac
p. 389 5a p. 464 1 In this lab you will create a polynomial class. The book suggests using a linked list to hold the terms. You may find it easier to use a vector. That's how I did it. If v is the vector, v[i] holds the coefficient of the term for xi. Your program should allow the user to enter the polynomial by typing it in using "^" for powers. You should get the entire line containing the user input, and construct a polynomial from it. To do this, I built a constructor for Polynomial, which takes a string as parameter. It eliminates spaces from the string, and then parses it into tokens representing terms, using the "+", "-" and end-of-string as delimiters. It then parses the tokens, picking out the coefficient and power.
p. 465 20 Extra Credit (2 points) Modify the Polynomial class from Lab 10, so that the terms are stored in descending order (by exponent) in linked lists of nodes.
p. 450 20 (Write a complete LinkedList class template) p. 464 9 (Write a driver to test your LinkedList class)