Em Andamento

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

Ver mais: use tree data structure, use data structure programming, types tree structures, types tree data structure, types tree data structures, types data structures, types data structure, two types data structures, tree types data structure, tree structure programming, tree program data structure, tree data structure types, tree data structures, tree data structure example, programming techniques, programming simplified, programming lua, programming expression, oriented programming, object oriented programming example, node programming, node data structure, kinds data structure, functional programming example, expression programming

Acerca do Empregador:
( 0 comentários ) Chicago, United States

ID do Projeto: #6775461

Premiar a:


because i too was a lecture and have handled this type of projects so many times. and i was also acquainted with c from my graduation level. i can deliver it with 100% articulacy.i was doing lectureship in sambalpur Mais

$20 USD em 1 dia
(0 Avaliações)