Exercises
Before you get started, make sure you have forked and cloned the starter code
repository for the exercises.
We will be focusing on the project named Classes
.
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!Test your new
Student
object with print statements. Are you able to get and set each field?In the
Classes
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
.