Write program which accepts a space-delimited set of symbols

Assignment Help JAVA Programming
Reference no: EM131275213

PROGRAMMING ASSIGNMENT

FUNCTIONAL PROGRAMMING

INFIX EXPRESSION CALCULATOR

PRELIMINARY NOTES

You have your choice of programming languages for this assignment:

• Scheme (or Clojure)
• Ocaml (or F#)
• Java 8 (utilizing the "Functional Programming" features of the language
• Scala

RULES

(NOTE: Since a choice of languages is given, the "rules" have to remain flexible, hence the use of where applicable in several of the rules below.)

• Must use "High Order Functions" where applicable.
• The only permitted "looping constructs" are:

o Recursion
o Streams, Maps, Folds
o In some pure functional languages, these would be your only options

• Must use "strong" and proper datatypes where applicable

o For example each kind of operator would be its own type.

- (E.g. Addition and Subtraction would both be instances of an "Additive" type, but Multiplication and Division would be instances of a "Multiplicative type")

- In other words, each "precedence level" should be represented by its own type.

• Should use floating-point input and evaluation.

PROGRAM DESCRIPTION

1. Write a program which accepts a space-delimited set of symbols representing an infix arithmetic expression as described below.

a. The user should be prompted for the input (to be entered via keyboard)

2. Output:

a. The numeric evaluation of the expression
b. A string representing the arithmetic expression as an S-Expression

i. Hint: Easily generated from a simple pre-order tree traversal
ii. Note that any parentheses in the original input should not appear in the output (ie. Duplicating parentheses).

Reference no: EM131275213

Questions Cloud

What do you believe are good aspects about the method : What do you believe are good aspects about this method and what do you think are issues with this method? Be careful not to share any of your own personal passwords.
How are caucasian-americans influenced by race in society : How are Caucasian-Americans influenced by race in society today - What can we do to improve race relations in America and What are the factors contributing to the state of race relations in today's society?
Differentiate one step from two step area sampling : Differentiate one-step from two-step area sampling and indicate when each one is preferred. - What is meant by a skewed population? Describe a skewed population distribution variable and provide an example.
Describe the common treatments for the disorders : Describe each addiction including potential genetic and environmental factors leading to the addiction. Describe the common symptoms, especially those that impact the person both physically and psychologically. Describe the common treatments for t..
Write program which accepts a space-delimited set of symbols : Write a program which accepts a space-delimited set of symbols representing an infix arithmetic expression as described below. The user should be prompted for the input (to be entered via keyboard)
Define quantitative research and qualitative research : Define quantitative research. Define qualitative research. List the differences between these two research methods. What is pluralistic research?
Describe two formats of online focus groups : Indicate why covert observation would be appropriate for a study on how parents discipline their children when dining out. - Describe a traditional focus group.
Should the members of a focus group be similar or dissimilar : How are focus group participants recruited, and what is a common problem associated with this recruitment?- Should the members of a focus group be similar or dissimilar? Why?
Write an sql statement to delete the nantucket record : Write an SQL statement to delete the Nantucket record. Write the SQL necessary to recreate the ocean table in the same way it was create for question 1 but add the constraint that PercentOfSurface must be Between 0 and 100.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a java program to calculate the bmi

In this assignment you are required to create a java program to calculate the BMI. Enter the weight and height of person and let the program automatically calculate the BMI.

  Java program asks the user to input the number of gallons

Write a java program asks the user to input the number of gallons of gas in the tank and the price of gas per gallon

  Explain how the loop displaying the menu

Explain how the loop displaying the menu is exited, what value does menuSel have when the program finishes? Describe what happens next when menuSel gets this value.

  Write the definition of a void method

Write the definition of a void method that takes as input two parameters of type int, say sum and testScore. The method updates the value of sum by adding the value of testScore. The new value of sum is sent back to the caller statement

  Write a java method that repeatedly selects

Write a Java method that repeatedly selects and removes a random entry from an array until the array holds no more entries.

  Explain java inventory program

The file attached isn't quite what it needs to be. According to my teacher - "I need only one new feature. I don't want to include the restocking fee and item fee in the constructor.

  Uml exercise automated teller machine atmnbspbrief

uml exercise automated teller machine atmnbspbrief statement of purposean atm is an electronic device designed for

  Simulate a simple multiuser computer system

Prepare a java program to simulate a simple multiuser computer system

  What does the class hierarchy of the applet class look like

My applet runs fine with appletviewer but not in the browser, what can be the problem? What does the class hierarchy of the Applet class look like?

  Implement the lexical and syntactic analysis

Implement the lexical and syntactic analysis of Minifun programming language.

  Write a dim statement that declares a myfriend variable

Write a Dim statement that declares a MyFriend variable named school. Write an assignment statement that  assigns the value in the txtFirst control to the strFirst member

  Write the code with comment and output resultinterface and

write the code with comment and output resultinterface and polymorphismimplement a class quiz that implements the

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