Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Look for parameter variables in this program. Then find the argument that sends

ID: 3631927 • Letter: L

Question

Look for parameter variables in this program. Then find the argument that sends the variable.
Now list the statement in the program which contains the argument, and then list the matching parameter statement. Place your answers right below:

// main module
Module main()
// Local variables
Declare Real lengthA, widthA, areaA
Declare Real lengthB, widthB, areaB

// Get the dimensions of rectangle A.
Display "Enter the dimensions of Rectangle A."
Call getRectangle(lengthA, widthA)

// Get the dimensions of rectangle B.
Display "Enter the dimensions of Rectangle B."
Call getRectangle(lengthB, widthB)

// Calculate the rectangle areas.
Set areaA = lengthA * widthA
Set areaB = lengthB * widthB

// Compare the areas.
If areaA > areaB Then
Display "Rectangle A has the greater area."
Else
If areaB > areaA Then
Display "Rectangle B has the greater area."
Else
Display "Both rectangles have the same area."
End If
End If
End Module

// The getRectangle module gets a rectangle's length and width from
// the user and stores the input in the reference parameters length
// and width.

Module getRectangle(Real Ref length, Real Ref width)
Display "Length:"
Input length
Display "Width:"
Input width
End Module

Explanation / Answer

Read the comment line // main module Module main() // Local variables Declare Real lengthA, widthA, areaA //lengthA and widthA is parameter varialble Declare Real lengthB, widthB, areaB // lengthB and widthB is parameter variable // Get the dimensions of rectangle A. Display "Enter the dimensions of Rectangle A." Call getRectangle(lengthA, widthA) //contains arguments and send the value // Get the dimensions of rectangle B. Display "Enter the dimensions of Rectangle B." Call getRectangle(lengthB, widthB)//contains arguments and send the value // Calculate the rectangle areas. Set areaA = lengthA * widthA Set areaB = lengthB * widthB // Compare the areas. If areaA > areaB Then Display "Rectangle A has the greater area." Else If areaB > areaA Then Display "Rectangle B has the greater area." Else Display "Both rectangles have the same area." End If End If End Module // The getRectangle module gets a rectangle's length and width from // the user and stores the input in the reference parameters length // and width. Module getRectangle(Real Ref length, Real Ref width)//contains arguments Display "Length:" Input length Display "Width:" Input width End Module

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote