Modify the infix evaluation program

Assignment Help Data Structure & Algorithms
Reference no: EM13843533

Assignment 2
• Modify the infix evaluaDon program so it processes assignment statements where the expressions can contain variables. A variable will be a string of 1 to 6 alphabeDc characters.

• The values of variables must be stored in a symbol table that is stored in a binary file. The symbol table should be stored as a sorted (based on the variable) sequence. To find the value of variable the program must search the symbol table using a binary search. I will review binary search in class and give an example using an ArrayList

Assignment 2

• All accesses (looking up the current value, giving a variable a new value, etc) to the symbol table must use the binary file. That is you cannot just read in the contents of the file into memory (e.g. into an ArrayList) and then access this informaDon from the ArrayList.

• UniniDalized variables are assumed to have the value 0.

Assignment 2

• The program expects two command line arguments. The first argument is the name of a text file that contains one assignment statement per line. The second command line argument is the name of the binary file that will be used to store the symbol table

• As in assignment one the tokens in the assignment statements will be separated by whitespace.

• You can assume the input is syntacDcally correct

Assignment 2

• AUer all the lines in the input file have been evaluated the program should print the contents of symbol table.


Attachment:- a2.pdf

Reference no: EM13843533

Questions Cloud

The ethical implications of insider trading : Write a 3–5 page essay about the ethical implications of insider trading. Financial statements and information are very important to investors. If some of this information is used or shared before it is released to the public
Analysis of real-world situation : The purpose of the Final Project is to apply the concepts and techniques of the module to the analysis of real-world situations or problems.
Terms depreciation and accumulated depreciation : What is meant by the terms depreciation and accumulated depreciation? In which financial statement does each of these items appear? What is accrual accounting and how does it influence financial statement presentation?
Find the firm''s debt ratio : Given the following information for the Duke Tire Company, find the firm's debt ratio (i.e., total liabilities / total assets): ROE (N/E) = 0.33 (expressed as a decimal) Total asset turnover ratio (S/A) = 3.5
Modify the infix evaluation program : Modify the infix evaluation program
Briefly explain how the "january effect" anomaly : Briefly explain how the "January effect" anomaly contradicts the efficient market hypothesis or theory.
Discuss the importance of every financial advisor : Discuss the importance of every financial advisor creating an investment policy statement for each client.
What is a pre-startup safety review : What is a Pre-Startup Safety Review (PSSR)? Why are Pre-Startup Safety Reviews so important and neededon new projects? What do safety reviews address?
Describe what is meant by the security market line : Describe what is meant by the security market line being the graphic representation of the capital asset pricing model.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Set the three elements of integer array counts to 0

Write statements that perform the following one-dimensional-array operations: Set the three elements of integer array counts to 0

  Use the string input by the user as an argument to open file

One of these must use preorder traversal, one must use inorder traversal, and one must use postorder traversal. You must decide which to use for each method, but use comments to document the type of traversal used.

  Choose a combination of meaningful data structures

Describe a mechanism to access the telephone customer records by telephone #. Assume that we have a huge data in hand, say a million records or so.

  Determine schedule that obtains maximum amount of profit

Assume you have one machine and a set of n jobs a1, a2, ..., an to process on that machine. Determine the schedule that obtains the maximum amount of profit. Compute the running time of your algorithm?

  Question 1nbsplist and describe the four steps in polyas

question 1nbsplist and describe the four steps in polyas how to solve it listquestion 2nbsplist the three phases of the

  How many passes through the data will be made

How many passes through the data will be made by the selection sort for N data items and How many numbers are placed in order on each pass through the data (each iteration of the inner loop) for the selection sort?

  Algorithm to decide flavor of ice cream

A group of ten people need to decide which one flavor of ice cream they will all order, out of three options. The algorithm can question and re-question the participants, and present the answers to the participants.

  Separate inventory database

A 20-year old corporation, SewWorld, comprised of 6-locations in three states, sells sewing machines, sewing related software, and accessories. Each store sells between 3-5 different brands of sewing equipments.

  Create divide and conquer algorithm to solve problem

Create a divide and conquer algorithm to solve problem. The time complexity of your algorithm must be O(nlgn) or better.

  Maekawa''s algorithm

Maekawa's Algorithm is used to achieve mutual exclusion for 13 sites. Suppose the sites are labeled 1, 2, ..., 13. Find the request sets R1, R2, ... , R13. Suppose sites 1, 6, 12 want to enter a critical section ( CS ) and they have sent requests in ..

  Write a program that implements the linked list

Write a program that implements the linked list Include the Node struct, the typedef NodePtr statement, and the head_insert() function Then write a main() that does these steps: creates a head for the list.

  Part-1greatest common divisor show a recursive

part-1greatest common divisor show a recursive implementation of euclids algorithm for finding the greatest common

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd