Final Exam for Beginner Course
Task 6
Please define a new public class named Survey. This class must have an automatic public property named Title which is a string. The Title property must be set through a public consturctor that accepts the title as a parameter.
A collection of Question instances named Questions must exist with a public getter and a private setter. This must be set to a new List<Question> instance from the constructor.
The Survey class must define a public method named AddQuestion that accepts a Question parameter and adds it to the list.
The Survey class must also have a GetScore method that loops through all the questions in the Question list. The foreachloop should be used. Each score from an answer must be added to a local integer variable named total. Once all the questions have been answered, the total must be returned from the method.