CMSC 430 University of Maryland Programming Discussion


Provide a program in the target language(cygwin)of our compiler/interpreter that incorporates all elements of the language. It must include all of the following:Integer, Real and Boolean literalsEvery arithmetic operator: + – * / rem **Every relational operator: = /= > >= < <=Every logical operator: and or notAn if statementA case statementA reduce statementMultiple variable declarationsMultiple parameter declarationsIn addition, your program should be written in a such a way that it test the associativity and precedence of all operators. It should also include nested statements.Also provide several sets of input (values for the parameters) to the program, enough so that every line of code within the program is executed at least once. For each input supplied, provide the corresponding output.This is the professors example. As you can see it compiles successfully and will need an input as a test case for the test compiler. Please use the test compiler and the files in the zip attached to do this. This is the target language that the question is asking for. Please do an original answer and don’t take from another website. Please do it from scratch. Thank you so much for the help. Example:function main age: integer, salary: real, isMeaningful: boolean, commuteTime: integer, isNotFun: boolean, hasLotsOfWorkFriends: boolean returns real; ageRanking: real is if age <= 35 and age /= 0 and age > 18 and age < 100 then 0.5 * 100 / age * 100 ** 2; else if age >= 65 then 2.0 * 100 / age * 100 ** 2; else 1.25 * 100 / age * 100 ** 2; endif; endif; commuteRanking: integer is case commuteTime is when 1 => 3 – commuteTime; when 2 => 2 – commuteTime; when 3 => 1 – commuteTime; others => 0 – commuteTime; endcase; satisfactionRanking: real is if not isNotFun and isMeaningful and hasLotsOfWorkFriends then 100; else 0; endif; salaryRanking: real is reduce + salary; (0.2 * salary); 12000; endreduce; booleanFun: boolean is isMeaningful and ( 1 <= 2 or 2 >= 3 or not 5 > 2 * 1 rem 1 + 4 ** 4 – 2 / 2 or 3 /= 4 and not 4 < 3 or 5 = 1 * 2 + 3 - 5 / 5 rem 2 ** 4); begin if booleanFun then (salaryRanking / 1000 + ageRanking / 10000 + commuteRanking * 10 + satisfactionRanking ) / 10; else 0; endif;end; 1 attachmentsSlide 1 of 1attachment_1attachment_1 Explanation & Answer: 1 Page Tags: programming Interpreter target language User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Reviews, comments, and love from our customers and community:

Article Writing

Keep doing what you do, I am really impressed by the work done.



PowerPoint Presentation

I am speechless…WoW! Thank you so much!

Stacy V.

Part-time student

Dissertation & Thesis

This was a very well-written paper. Great work fast.

M.H.H. Tony


Annotated Bibliography

I love working with this company. You always go above and beyond and exceed my expectations every time.

Francisca N.


Book Report / Review

I received my order wayyyyyyy sooner than I expected. Couldn’t ask for more.

Mary J.


Essay (Any Type)

On time, perfect paper

Prof. Kate (Ph.D)


Case Study

Awesome! Great papers, and early!

Kaylin Green


Proofreading & Editing

Thank you Dr. Rebecca for editing my essays! She completed my task literally in 3 hours. For sure will work with her again, she is great and follows all instructions

Rebecca L.


Critical Thinking / Review

Extremely thorough summary, understanding and examples found for social science readings, with edits made as needed and on time. Transparent

Arnold W.




Joshua W.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>