|Perfect Number of Pages to Order||5-10 Pages|
CMSC 430 Programming Discussion Essay Assignment
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 literals
Every arithmetic operator: + – * / rem **
Every relational operator: = /= > >= < <=
Every logical operator: and or not
An if statement
A case statement
A reduce statement
Multiple variable declarations
Multiple parameter declarations
In 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.
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;
if age >= 65 then
2.0 * 100 / age * 100 ** 2;
1.25 * 100 / age * 100 ** 2;
commuteRanking: integer is
case commuteTime is
when 1 => 3 – commuteTime;
when 2 => 2 – commuteTime;
when 3 => 1 – commuteTime;
others => 0 – commuteTime;
satisfactionRanking: real is
if not isNotFun and isMeaningful and hasLotsOfWorkFriends then
salaryRanking: real is
(0.2 * salary);
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);
if booleanFun then
(salaryRanking / 1000 + ageRanking / 10000 + commuteRanking * 10 + satisfactionRanking ) / 10;
GET THIS PROJECT NOW BY CLICKING ON THIS LINK TO PLACE THE ORDER
Tired of getting an average grade in all your school assignments, projects, essays, and homework? Try us today for all your academic schoolwork needs. We are among the most trusted and recognized professional writing services in the market.
We provide unique, original and plagiarism-free high quality academic, homework, assignments and essay submissions for all our clients. At our company, we capitalize on producing A+ Grades for all our clients and also ensure that you have smooth academic progress in all your school term and semesters.
High-quality academic submissions, A 100% plagiarism-free submission, Meet even the most urgent deadlines, Provide our services to you at the most competitive rates in the market, Give you free revisions until you meet your desired grades and Provide you with 24/7 customer support service via calls or live chats.