18.7. Exercises: Classes and ObjectsΒΆ
Before you get started, make sure you have forked and cloned the starter code.
Open up the file,
Student.cs
, and update the starter code to make use of auto-implemented properties.In
Program.cs
, instantiate theStudent
class using yourself as the student. For theNumberOfCredits
give yourself1
for this class and a GPA of4.0
because you are a C# superstar!In the
SchoolPractice
project, create a classCourse
with at least three fields. Before diving into Visual Studio, try using pen and paper to work through what these might be. At least one of your fields should be aList
orDictionary
, and you should use yourStudent
class.Using auto-implemented properties, in the
SchoolPractice
project, create a classTeacher
with four properties:FirstName
,LastName
,Subject
, andYearsTeaching
.