This has to be done in visual studio, c# windows form application (.net fromework). Question: The application should be able to do the following : • Create a class called Person which contains 4 private fields : Name(string), Surname (string), Course(string), CRNumber(int). • The class must contain 4 public properties which will be used to get and set the values of the private fields. • The class must contain a default constructer. The class must also contain an overloaded constructer which should be able to set the values of each of the private fields. • The class must contain a static ViewInfo method which will be used to display information of a queue of person objects back to the user neatly grouped underneath each other as displayed above. • Once a user clicks on the “Add Person” button then the information in the respective textboxes should be used to create a Person object (using the properties or the overloaded constructor) and add it to a queue which is of type Person. The textblock should then be cleared of any text it contains. A call should then be made to the ViewInfo method to display all of the information of all of the Person objects into the textblock. The queue should not be recreated each time a user clicks on the button thus it should be able to hold more than just one person object. (Tip make use of a string variable in the method). Output should look like the image.
This has to be done in visual studio, c# windows form application (.net fromework).
Question:
The application should be able to do the following :
• Create a class called Person which contains 4 private fields : Name(string), Surname (string),
Course(string), CRNumber(int).
• The class must contain 4 public properties which will be used to get and set the values of the private fields.
• The class must contain a default constructer. The class must also contain an overloaded constructer which should be able to set the values of each of the private fields.
• The class must contain a static ViewInfo method which will be used to display information of a queue of person objects back to the user neatly grouped underneath each other as displayed above.
• Once a user clicks on the “Add Person” button then the information in the respective textboxes should be used to create a Person object (using the properties or the overloaded constructor) and add it to a queue which is of type Person. The textblock should then be cleared of any text it contains. A call should then be made to the ViewInfo method to display all of the information of all of the Person objects into the textblock. The queue should not be recreated each time a user clicks on the button thus it should be able to hold more than just one person object. (Tip make use of a string variable in the method).
Output should look like the image.
Step by step
Solved in 4 steps with 5 images