Question: Create class Course. Add two self-implemented properties CourseName and Instructor. Create a publicly accessible method DisplayInfo to display data stored in these two properties. Do
Create class Course. Add two self-implemented properties CourseName and Instructor. Create a publicly accessible method DisplayInfo to display data stored in these two properties. Do not write any constructors. We will use an object initializer to initialize the properties when a Course object is instantiated. Write a test program to test this class. Create two instances of Courses: csc153 and csc152. Use object initializers to initialize CourseName and Instructor when these two courses are created. For csc153, initialize CourseName to Intro C# and Instructor to Leung. For csc152, initialize CourseName to SAS and Instructor to Orazem. Also write statements to invoke the DisplayInfo method for both courses. Your should get the following output
Course: Intro C# Instructor: Leung
Course: SAS Instructor: Orazem
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
