Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hello Can someone solve this for me I am kind of confused on how to solve this No Coding language I want Theoretical Explanation please!
Hello
Can someone solve this for me I am kind of confused on how to solve this
No Coding language I want Theoretical Explanation please!
Software Modeling!
(a) Define a function called Triangle Surface in RSL that takes a right-angled triangle as a single argument and calculates and returns a positive integer number that is the area of the triangle. (b) Explain in plain English how this function works. A right-angled triangle is a triangle with one 90 degrees angle. The area of a right-angled triangle is equal to AB/2 where A and B are sides of the triangle that form the 90 degrees angle. Hint 1: Define a type that can model a triangle. Hint 2: Conditions on the output of the function should be encoded in its postcondition. Hint 2: Conditions on the input of the function should be encoded in its precondition. To check if a triangle is right angled you can find a side C of the triangle such that C2 = A + B2 Submission instructions 1. Provide your answer in the provided textbox. 2. Mark your answers with (a)-(b) (a) Define a function called Triangle Surface in RSL that takes a right-angled triangle as a single argument and calculates and returns a positive integer number that is the area of the triangle. (b) Explain in plain English how this function works. A right-angled triangle is a triangle with one 90 degrees angle. The area of a right-angled triangle is equal to AB/2 where A and B are sides of the triangle that form the 90 degrees angle. Hint 1: Define a type that can model a triangle. Hint 2: Conditions on the output of the function should be encoded in its postcondition. Hint 2: Conditions on the input of the function should be encoded in its precondition. To check if a triangle is right angled you can find a side C of the triangle such that C2 = A + B2 Submission instructions 1. Provide your answer in the provided textbox. 2. Mark your answers with (a)-(b)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started