Question: CS 1 1 0 0 - Computer Science and Its Applications T 4 : Conditional Logic Use the DATE ( . . . ) function
CS Computer Science and Its Applications
T: Conditional Logic
Use the DATE function to add months to the previous audit date. You are not allowed to use the EDATE function.
Document your function NextAuditCSA using the design recipe linked in the syllabus prefix. Improve your function NextAuditCSA by making it modular. We want to separate the concern of the business rule from the concern of how to apply it to the data. Define a function NextAuditCSA which takes the business rule as a function argument.
NextAuditCSA has the arguments as shown in this LAMBDA:
LAMBDAlastaudit,companysize,auditresult,businessrule,LET
where businessrule is defined by the above LAMBDA. Make use of the LAMBDA helper function MAP to implement NextAuditCSA.
The modular function NextAuditCSA has the benefit that it is easy to change the business rule simply by giving another businessrule function as an actual argument.
Appendix
We use a systematic way to document our functions. For each function XYZ that you write, provide the following information adapted from the HtDP Function Recipe in worksheet XYZinfo.
Function name
State what kind of data the desired function consumes and produces.
Formulate a concise answer to the question what the function computes.
Work through examples that illustrate the function's purpose. Important: do this step before you implement your function.
Provide the function definition using a LAMBDA
formula for all cells horizontally, vertically
Full Marks
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
