CSC/BIF 245 Objects and Data Abstraction Assignment 5

$40.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (10 votes)

Question 1 (10 points). Implement a stack using linked list. Use a stack to solve the problem of evaluating a fully parenthesized expression that we have seen in class.

A fully parenthesized expression is an arithmetic expression where each operator is surrounded by two operands and two parentheses. For example, the following are fully parenthesized expressions:   ( ( 9 + 7 ) * 6 ), ( ( 5 – 3 ) + ( 9 – 8 ) ), ( ( ( 9 + 8 ) – ( 9 * 70 ) ) – ( 17 + 2 ) ). You may assume that all numbers are positive integers,  that the expression contains the following operators only: +, -, *, /, % and that all numbers, operators and parentheses are surrounded with space. Your code should work with all possible integers.

Question 2 (10 points) HTML is a simple language that is used for simple web pages. It relies on tags to format the pages. Assume that the only tags possible are: <b>, </b>, <i>, </i>, <h1>, </h2>, <html>, </html>. Tags format the text that is between them and should properly match. For example, text that appears between <b> and </b> will be displayed in bold. Text between <i> and </i> will be displayed in italics. Every document must start with <html> and end with </html>. Write a program that reads a text file containing HTML code and checks if the code is properly tagged.

Question 3 (10 points) Implement a queue using arrays.

What to submit

Use Blackboard to submit all your .java and .class files as well as any input files that might be required by your code. Make sure to write your name, student id and date of last modification on top of each .java file.

Plagiarism and Cheating Policy

Cheating is a serious offense. If a student is found to have copied part or all of the assignment, he or she will receive a zero on the assignment.  During exams, if a student is caught cheating, he or she will receive a zero on the exam. This might result in the student getting an F on the course.  NO EXCUSES WILL BE ACCEPTED.  The same applies to the person providing others with material. The same applies to plagiarism (presenting someone else’s work as being one’s own work).

Deadline Policy

The deadline for this assignment is firm. No extension will be allowed.

Important Reminder

You cannot do well on the exams unless you do the assignment YOURSELF! Do not Google the solution, do not try to find it in books. This will not help you! It is your decision in the end, your responsibility.