Lua Assignment

I can send the files created by my professor later.

Here is the project description.

Complete the following programming tasks by the due date. The program you develop should use appropriate functional programming or object-oriented programming techniques in Lua. In general, your program can should expression tree structures and initialize them, but it should not change the values of the data structure once initialized.

1) Choose one of the three functional or two object-oriented implementations of the Lua Arithmetic Expression Tree skeleton program on the Lecture Notes page. Modify and extend it in the following ways:

a) Add the following new kinds of nodes: Sub, Prod, and Div for subtraction, multiplication, and division of numbers, respectively; Neg for negating a value, and Sin and Cos for the sine and cosine trigonometric functions, respectively.

b) Extend functions eval, derive, and valToString to support these new node types. (For differentiation, you may want to look up the formulas in a Calculus textbook to remind yourself of the more complex rules.)

c)Add a new operation simplify that takes an arithmetic expression tree (as extended in the previous tasks), simplifies it by "evaluating" all subexpressions involving only constants (not evaluating variables), and returns the new expression. For example, Add(Const(1),Const(3)) can be simplified to Const(4).

2) Design appropriate tests for your program and test the program thoroughly.

Habilidades: Programação C

Veja mais: use of tree data structure, use of data structure in programming, types of tree structures, types of tree in data structure, types of tree data structures, types of data structures in c, types of data structures, types of data structure, types data structures, types data structure, two types of data structures, tree types data structure, tree structure programming, tree program in data structure, tree of data structure, tree in data structures, tree in data structure, tree data structure types, tree data structures in c, tree data structures, tree data structure in c, tree data structure example, tree data structure c, programming techniques, programming simplified

Acerca do Empregador:
( 0 comentários ) India

ID do Projeto: #6786733

5 freelancers estão ofertando em média $95 para esse trabalho


I am very proficient in c, c++. I have 15 years c++ developing experience now, and I have worked for 5 years. My work is online game developing, and mainly focus on server side, the language is c++ under linux. I used Mais

$138 USD em 1 dia
(32 Comentários)

Hello Sir! Im very good in C/C++, also have expirience in Lua for cocos-2d. I can complete your task at this weekend. Thanks. have a nice day!

$35 USD in 5 dias
(0 Comentários)

Hello friend, I have more than 2 years of experience in embedded programming with expertise in C language with Linux environment. I and my friends, We are working together as team in multiple domains like "Embedded Mais

$60 USD in 10 dias
(0 Comentários)

A proposal has not yet been provided

$133 USD em 1 dia
(0 Comentários)

A proposal has not yet been provided

$111 USD em 1 dia
(0 Comentários)