The Test class below keeps an integer tally.

Arjuna
 (Not rated)
 (Not rated)
Chat

The Test class below keeps an integer tally. Its AddFive() method adds five to tally, and its Display() method displays the current value. The Main method includes a test program. Find and fix any errors.



public class Test {

private int tally;

public void Test(int start) {

tally = start;

}

public void AddFive() {

tally += 5;

}

public void Display() {

Console.WriteLine("The tally is {0}", tally);

}

public static Main() {

Test myTest = new Test(3);

myTest.AddFive();

Display();

}

}



Deliverables:

The deliverable is a Word document that includes:

1. Zip file of all of the VS project files so that it could be loaded and run in another VS

2. A copy of the source code

3. Screenshot of the output

4. Explanation of the work and how you arrived at your solution

    • 12 years ago
    Please give Good Rate if you like with my Answer - Use it as a GUIDE
    NOT RATED

    Purchase the answer to view it

    • solution.zip