Task 1: Getting Started
Let’s set up the assignment on our computer and learn about its basic structure.
Find Assignment #0 in Canvas and click on the invitation link. After accepting the assignment on the Github Classroom page, go to your assignment repository on GitHub.
Follow the instructions to clone your repository and open it in Visual Studio.
When the solution opens, check out the contents of the Solution (Mac) or Solution Explorer (Windows). You will find two projects within the solution:
- The
HelloWorldAutoGraded
contains the code that you will work with for this assignment. - The
Hello.Tests
project contains auto-grading tests. You do not need to change any of the code in the testing project.
NoteIf you do not see the Solution Explorer, you can open it by selecting the View option in the toolbar.
- Windows Users: View > Solution Explorer
- Mac Users: View > Solution
Review the Visual Studio walkthroughs from chapter 1 if you need help navigating Visual Studio.
- The
Inside
HelloWorldAutoGraded
, open up theSayHelloClass.cs
class. This is where you will write any code for this assignment. Within this class, you will see the following:- The
SayHello()
method which is returning&&&
. SayHelloClass()
constructor which is empty. This will remain empty for this assignment.
- The
Now, turn your attention to Program.cs in the
HelloWorldAutograded
project. This class will print two strings to the console using theConsole.WriteLine()
method.- The first returns the string value of the
SayHello()
method from theSayHelloClass
. - The second returns the data type of the
SayHello()
method’s output.
- The first returns the string value of the
You are now ready to run the program. Do the following:
- Mac Users: Hit the Run button at the top left-hand corner of the window. Right-clicking on the
HelloWorldAutograded
project and selecting Run Project will also work. - Windows Users: Click on the solid green triangle next to the name of the
HelloWorldAutograded
project. You can also press F5 to run the project.
- Mac Users: Hit the Run button at the top left-hand corner of the window. Right-clicking on the
Visual Studio opens a pane and displays any program output when you run a program. Currently, the program output contains the following:
&&& System.String
You are ready to run the auto-grading tests.
You are now ready to move on to Task 2: Running the Auto-grading Tests .