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 Explorer. 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 following:
- Windows Users: View > Solution Explorer
- Mac Users: Select .NET: Open Solution in the command palette.
Review the walkthroughs from Chapter 1 if you need help navigating the interface.
- 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 right-hand corner of the window. Alternatively, select Run > Start Debugging from the upper bar.
- 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.
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 .