Computers and Technology

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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 19:30, alangonsales6232
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
image
Computers and Technology, 24.06.2019 05:30, lolololol21
Cómo pongo un tomo de llamada sin pagar?
Answers: 1
image
Computers and Technology, 24.06.2019 20:20, isaiahromero15
Write python code that prompts the user to enter his or her favorite color and assigns the user’s input to a variable named color.
Answers: 1
image
Computers and Technology, 24.06.2019 21:50, TamB01
Maddie is traveling to india and would like to document her trip for friends and family to access online. what tool would be best? app blog listserver web page
Answers: 1
Do you know the correct answer?
Given the pseudocode below: Class Animal Private String _name Public Module setName(String name) Set...

Questions in other subjects: