Project #42012 - Data Structures in Java hwk

Written

For the written section of this assignment, you type up your answers and submit a computer document to us. You can submit MS Word doc files, pdf files, or txt files.

  1. Weiss, Exercise 3.1

  2. Weiss, Exercise 3.2

  3. Weiss, Exercise 3.8

  4. Weiss, Exercise 3.24

  5. Weiss, Exercise 4.5 (this is asking for a proof)

  6. Weiss, Exercise 4.9 (using a full deletion)

    Programming

    For the programming portion of the assignment please submit only your .java files. Your code should be well commented. In addition please include a detailed README.txt file that explains how to compile and run your code.

    1. Palindrome Detector: A palindrome is a phrase that reads the same forwards as it does backwards. For example, "a man, a plan, a canal, Panama." is a palindrome. Ignore white space and punctuation. Write a program that uses a stack to check for palindromes in each line of a text file. Try your program on the example text file palindromes.txt.

      Your program should output the palindromes that it finds in the document. For example:

      java FindPalindromes palindromes.txt
      "a man, a plan, a canal, Panama" is a palindrome.
      "Don't nod" is a palindrome.
      "Taco Cat!" is a palindrome.

      You must write your own MyStack class for this problem. Don.t use the built in Stack. Feel free to use either a LinkedList, ArrayList or an array to implement the Stack.

    2. Implementing and displaying expression trees:

      Your program will be a text-based Java application. Prompt the user to enter a postfix expression (made up of single digit numbers and the +, -, *, and / operators). When the user presses enter, the stack based method for constructing expression trees will be executed. Use your stack from the previous question. You should implement your own ExpressionTree class to store the expression. Once the tree has been built, have your program use the tree to output the equivalent prefix expression and infix expression (don't forget parenthesis for this one). Finally the program should evaluate the expression tree and print the result.

    3. Weiss, Exercise 4.16

Subject Computer
Due By (Pacific Time) 10/06/2014 07:00 pm
Report DMCA
TutorRating
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..
All Rights Reserved. Copyright by AceMyHW.com - Copyright Policy