Question
Please help me writing the code from this pseudocode. #Class Material # Private String _type # Public Module Material(String type) # _type = type #
Please help me writing the code from this pseudocode.
#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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started