Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Homework 2
About This Assignment
This assignment asks you to complete programming tasks using the Go programming
language.
To complete the assignment (i) download hw2-handout.zip from Canvas, (ii) modify
the .go files in the hw2-handout directory as per the instructions in this document,
and (iii) zip the hw2-handout directory into hw2-handout.zip and upload this zip
file to Canvas by the due date.
Do not change the file names, create new files, or change the directory structure in
hw2-handout.
This assignment has to be worked on individually.
Run the command go version to verify that you have the correct version installed:
$ go version
go version go1.11.4 <other output>
Begin working on the homework early.
Apart from the description in this document, look at the unit tests provided to understand
the requirements for the code you have to write.
Post questions on piazza if you require any further clarifications. Use private posts if
your question contains part of the solution to the homework.
1
1 triangle (5 points)
Modify the unit tests in the TestGetTriangleType function
in hw2-handout/triangle/triangle test.go.
One unit test has already been written for you.
The goal is to write enough unit tests to get 100% code coverage for the code in
hw2-handout/triangle/triangle.go.
From the hw2-handout/triangle directory, run the go test -cover command to see
the current code coverage.