Answered step by step
Verified Expert Solution
Link Copied!

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!

image text in transcribed

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

1. Explain why evaluation is important.

Answered: 1 week ago