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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
What are some websites that you can read manga (ex: manga rock)
Answers: 1
question
Computers and Technology, 24.06.2019 23:30
True or false when a host gets an ip address from a dhcp server it is said to be configured manually
Answers: 1
question
Computers and Technology, 25.06.2019 10:50
Which of the following is true of heuristics? a)heuristics always lead to correct solutions of a problem. b)heuristics represent commonly used approaches to the solution of a problem.c) heuristics are a slower way to solve problems than are other strategies. d)heuristics are used by computers but not by humans as problem-solving tools.
Answers: 3
You know the right answer?
Given the following pseudocode: Class Coordinate
Private Real _x
Private Real _y
<...
Questions
question
Mathematics, 18.03.2021 18:10
question
Mathematics, 18.03.2021 18:10
Questions on the website: 13722367