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, 22.06.2019 11:30
Andrina writes letters that are regularly sent to hundreds of her company’s customers. because of this, she would like for the mail merge command to be in her quick access toolbar, and she wants it to be the first button on the left. what should andrina do to place the mail merge button there?
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Budgets you to do all of the following expect a) send frivolously b) avoid over spending c) gain financial independence d) examine your priorities and goals
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
You know the right answer?
Given the pseudocode below: Class Animal Private String _name Public Module setName(String name) Set...
Questions
Questions on the website: 13722363