subject

Given the pseudocode below: Class Animal Private String _name Public Module setName(String name) Set _name = name End Module Public Module vocalize() Display _name + " makes a noise." End Module End Class Class Dog Extends Animal Public Module vocalize() Display _name + " woofs." End Module End Class Class Cat Extends Animal Public Module vocalize() Display _name + " meows." End Module End Class Class Bird Extends Animal Public Module vocalize() Display _name + " chirps." End Module End Class Module main() Declare Animal pets[3] Declare Integer counter = 0 Set pets[0] = New Dog() Set pets[1] = New Cat() Set pets[2] = New Bird() Call pets[0].setName("Dorothy") Call pets[1].setName("Ginger") Call pets[2].setName("Ralph") While counter < 3 Call pets[counter].vocalize() counter = counter + 1 End While End Module What will be the output from calling the main module? Important! This time, write each output in its own box, instead of separating each output with a single space. You should have three separate outputs. 2. For the pseudocode below: Class Musician Private String _name Private Integer _rating Private String _song Public Module Musician(String name, Integer rating, String song) Set _name = name Set _rating = rating Set _song = song End Module Public Module display() Display name, rating, song End Module Public Function Boolean matches(String name) Return name == _name End Function End Class Module main(String name) Declare Musician musicians[4] Declare Integer counter = 0 Set musicians[0] = New Musician("John", 10, "Imagine") Set musicians[1] = New Musician("Paul", 9, "Listen to What the Man Said") Set musicians[2] = New Musician("George", 8, "Here Comes the Sun") Set musicians[3] = New Musician("Ringo", 7, "With a Little Help From My Friends") While counter < 4 If musicians[counter].matches(name) Then Call musicians[counter].display() End If counter = counter + 1 End While End Module What will be the output when main("George") is called? Separate each output with a single space. 3. Given the pseudocode below: Class Material Private String _type Public Module Material(String type) _type = type End Module Public Module display() Display _type End Module End Class Class Furniture Private Material _material Private String _type Public Module set_material(Material material) Set _material = material End Module Public Module display() Display _type Call _material. display() End Module End Class Class Chair Extends Furniture Public Module Chair() Set _type = "Chair" End Module End Class Module main() Declare Furniture furniture = New Chair() Call furniture. set_material(New Material("Wood")) Call furniture. display() End Module What will be the output when the main module is called? Separate each output with a single space. 4. When all tests in a test plan pass, you have proved that the software is bug-free. True or False

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:00
In the context of the box model, what is the difference between a margin and a padding? a. a padding lies outside a box border, while a margin lies inside it. b. a padding lies inside a box border, while a margin lies outside it. c. a padding can be adjusted independently, while a margin depends on the size of its box. d. a padding depends on the size of its box, while a margin can be adjusted independently.
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
question
Computers and Technology, 24.06.2019 11:00
Need fast im timed in a paragraph of 125 words, explain at least three ways that engineers explore possible solutions in their projects.
Answers: 2
You know the right answer?
Given the pseudocode below: Class Animal Private String _name Public Module setName(String name) Set...
Questions
question
Mathematics, 29.08.2019 05:00
Questions on the website: 13722363