Question
Review Dictionary Class in Chapter 19, page 597, 598. https://msdn.microsoft.com/en-us/library/xfhwa508(v=vs.110).aspx In C# 1. Create a class Course. (20 points) - create a constructor with two
Review Dictionary
In C# 1. Create a class "Course". (20 points) - create a constructor with two string parameters "courseId" and "courseName". - create two string data members "CID" with property "ID"(set, get), and "CName" with property "Name"(set, get). 2. In "Program.cs", do followings: (20 points) - Create 4 "Course" objects, set constructor with the following values - "course1" with cousre id "CTS1851", course name "Internet Web Foundation" - "course2" with cousre id "CGS2820", course name "Web Programming" - "course3" with cousre id "CGS2821", course name "Advanced Web Programming" - "course4" with cousre id "COP2361", course name "C# Programming" - Create a "Dictorinary" object "courses" with "string"(course id) as key, "Course" as value, string(key)/Course(value) pair. (20 points) - call "Dictorinary" method "Add() to add each course id and course to "courses". (20 points) - use "foreach" to go through "Dictionary", display each course id (key) and course name ( value.Name). (20 points)
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