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:40
Pthreads programming: create and terminate a thread write a c++ program that creates a thread. the main will display a message “hello world from the main”. the main will create a thread that will display a message “hello world from the thread” and then terminates with a call to pthread_exit()
Answers: 3
question
Computers and Technology, 23.06.2019 06:00
How can a user delete a drawing object
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which best describes the role or restriction enzymes in the analysis of edna a. to break dna into fragments that vary in size so they can be sorted and analyzed b. to amplify small amounts of dna and generate large amounts of dna for analysis c. to purify samples of dna obtained from the environment so they can be analyzed d. to sort different sizes of dna fragments into a banding pattern that can be analyzed
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Asecurity policy is a a. set of guidlines b. set of transmission protocols c. written document d. set of rules based on standards and guidelines
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, 05.07.2019 04:30
question
Mathematics, 05.07.2019 04:30
Questions on the website: 13722367