Question: C# 1.a Assume that 2 variables userScore and computerScore have already been declared and initialized . Write a statement that calls a method named DisplayScores

C#

1.a Assume that 2 variables userScore and computerScore have already been declared and initialized. Write a statement that calls a method named DisplayScores to display the userScore and computerScore on the screen. The method takes two integer parameters. It displays the scores on the screen but does not return a value.

1.b Assume that 2 integer variables die1 and die2 have been declared. Write a statement that calls amethod named Roll2Dice. The method takes two integer parameters. Because it generates 2 values, the method does not directly return a value, but returns the values indirectly through the use of output parameters.

1.c Write the header of the method definition for a method named DisplayScores. The method takes two integer parameters, player1Score and player2Score. It displays the scores on the screen but does not return a value.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!