subject

Given the following pseudocode: Class Coordinate
Private Real _x
Private Real _y

Public Module set_x(Real value)
Set _x = value
End Module

Public Module set_y(Real value)
Set _y = value
End Module

Public Function get_x()
Return _x
End Module

Public Function get_y()
Return _y
End Module

Public Module add(Coordinate c)
Set _x = _x + c. get_x()
Set _y = _y + c. get_y()
End Module
End Class

Module main()
Declare Coordinate c1 = New Coordinate()
Declare Coordinate c2 = New Coordinate()

Call c1.set_x(1.0)
Call c1.set_y(2.0)
Call c2.set_x(3.0)
Call c2.set_y(4.0)

Display c1.get_x(), c1.get_y(), c2.get_x(), c2.get_y()

Call c1.add(c2)

Display c1.get_x(), c1.get_y(), c2.get_x(), c2.get_y()
End Module
What will be the output when the main() module is called? Separate each answer with a single space.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:00, ozzy55
Create a word problem that involves calculating the volume and surface area of a three-dimensional object. cube: surface area 6 s2 , volume s3
Answers: 3
image
Computers and Technology, 23.06.2019 00:30, amy20021
Write the html code to make a link out of the text “all about puppies”. it should link to a pdf called “puppies. pdf” inside the “documents” folder. the pdf should open in a new window.
Answers: 2
image
Computers and Technology, 23.06.2019 14:00, savannnab1890
Select the correct answer. andre was recently hired by an organization to check for system vulnerabilities. he is supposed to exploit these vulnerabilities and create a report on the extent of damage to which the system was susceptible. what position does andre hold in this organization? a. information security analyst b. information assurance manager c. penetration tester d. network security engineer e. chief information security officer
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, babysisjessica1
For the following example of making a peanut butter and jelly sandwich, identify which are inputs, processes, or outputs: bread scooping and spreading peanut butter plate scooping and spreading jelly finished sandwich putting two pieces of covered bread together dirty plate crumbs
Answers: 2
You know the right answer?
Given the following pseudocode: Class Coordinate
Private Real _x
Private Real _y
<...

Questions in other subjects:

Konu
Mathematics, 02.08.2019 21:00
Konu
Mathematics, 02.08.2019 21:00