Program Languages

1. Of the languages we studied in class(c – imperative language, c++ – object oriented language, scheme – functional language, prolog – logical language) , which would you prefer for the following? Why?

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

a. A system to provide engineers with a set of mathematical tools that they can combine to solve complex problems

b. A control program for an external device connected through a serial port.

 

c. A program that can play a game of checkers against a human, using a board displayed on a screen and using a keyboard (or mouse) to move pieces.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

2. How does operator overloading affect ease of reading or writing code? Explain

3. The following is a grammar for arithmetic expressions. E stands for expression, T for 

term and F for factor, “num” is number. Is it context free? Use it to derive the 

expression 2*(3+4)

         

E ::= E + T | T

T ::= T * F | F

F ::= num | ( E )

4. A loop that goes on forever (for example, while( x ) { x=some-function }, such that the function always sets x true) can be an annoying and hard to debug runtime error. Could we build a feature into a language that prevented such infinite loops? Should we do this?

5. What are “side effects”? Give an example of a function with side effects (state the language in which your example happens). Why do functional languages try to avoid side effects as much as possible?

6. The first versions of BASIC (Dartmouth Basic) had loops, if statements and goto’s, 

but no way to define or call functions or procedures – so recursive procedures could not 

be written. Was Dartmouth Basic Turing complete (that is, was it as powerful as a Turing 

Machine?) Why or why not? 

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.

Order your essay today and save 30% with the discount code ESSAYHELP