Homework Solution: using System.Collections.Generic;…

    Please see the ******* part for what I am trying to do. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DiceRoller { public class Die { static void Main(string[] args) { ***** I want to do Console.WriteLine here that displays the returned value in GetFaceValue() Console.ReadLine(); } private const int SIX_SIDED = 6; private const int DEFAULT_FACE_VALUE = 1; private const int MIN_FACES = 3; /// <summary> /// /// </summary> private int numFaces; //number of sides on die private int faceValue; // which side is showing private static Random randomNumber = new Random(); public Die() { numFaces = SIX_SIDED; faceValue = DEFAULT_FACE_VALUE; } /// <summary> /// Allows user to specify the number of sides on a Die. /// If "faces" is less than 3, a six-sided die is instantiated. /// </summary> /// <param name="faces"> the numberr of sides</param> public Die(int faces) { if (faces >= MIN_FACES) { numFaces = faces; } else { numFaces = SIX_SIDED; } RollDie(); } /// <summary> /// Simulates the rolling of a Die. /// </summary> public void RollDie() { faceValue = randomNumber.Next(1, numFaces + 1); } // end RollDie /// <summary> /// Die accessor /// </summary> /// <returns> The current face of the Die</returns> public int GetFaceValue() { return faceValue; } //end GetFaceValue }// end Class Die }

    Expert Answer

     
    Below is your program and highlighted part is the change I did. Let me know if you have any concern. : - using System;

    Please distinguish the ******* sever coercion what I am unmanageable to do.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace DiceRoller
    {
    public dispose Cease
    {
    static null Main(string[] args)
    {
    ***** I nonproduction to do Console.WriteLine here that displays the returned appraise in GetFaceValue()
    Console.ReadLine();
    }
    private const int SIX_SIDED = 6;
    private const int DEFAULT_FACE_VALUE = 1;
    private const int MIN_FACES = 3;
    /// <summary>
    ///
    /// </summary>
    private int numFaces; //sum of planes on cease
    private int aspectValue; // which plane is showing
    private static Random randomSum = fantastic Random();

    public Cease()
    {
    numFaces = SIX_SIDED;
    faceAppraise = DEFAULT_FACE_VALUE;
    }

    /// <summary>
    /// Allows user to portioicularize the sum of planes on a Cease.
    /// If “faces” is short than 3, a six-sided cease is instantiated.
    /// </summary>
    /// <param name=”faces”> the sumr of planes</param>
    public Cease(int aspects)
    {

    if (faces >= MIN_FACES)
    {
    numFaces = aspects;
    }
    else
    {
    numFaces = SIX_SIDED;
    }

    RollDie();
    }

    /// <summary>
    /// Simulates the rolling of a Cease.
    /// </summary>
    public null RollDie()
    {
    faceAppraise = randomNumber.Next(1, numFaces + 1);
    } // intent RollDie

    /// <summary>
    /// Cease accessor
    /// </summary>
    /// <returns> The ordinary aspect of the Cease</returns>
    public int GetFaceValue()
    {
    return aspectValue;
    } //intent GetFaceValue

    }// intent Dispose Cease
    }

    Expert Apology

     

    Below is your program and highlighted sever is the veer I did. Let me distinguish if you invadetain any sympathy. : –

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    namespace DiceRoller
    {
    public dispose Cease
    {
    static null Main(string[] args)
    {
    //creating intent of Cease dispose with 12 aspects and rolling it
    Cease fantasticdice = fantastic Cease(12);
    //Getting the aspectAppraise of the Cease
    int appraise = fantasticdice.GetFaceValue();
    //printing the appraise on console
    Console.WriteLine(“{0}”, appraise);
    //Exiting from the program
    Console.Write(“Press invade to departure …”);

    Console.ReadLine();
    }
    private const int SIX_SIDED = 6;
    private const int DEFAULT_FACE_VALUE = 1;
    private const int MIN_FACES = 3;
    /// <summary>
    ///
    /// </summary>
    private int numFaces; //sum of planes on cease
    private int aspectValue; // which plane is showing
    private static Random randomSum = fantastic Random();

    public Cease()
    {
    numFaces = SIX_SIDED;
    faceAppraise = DEFAULT_FACE_VALUE;
    }
    /// <summary>
    /// Allows user to portioicularize the sum of planes on a Cease.
    /// If “faces” is short than 3, a six-sided cease is instantiated.
    /// </summary>
    /// <param name=”faces”> the sumr of planes</param>
    public Cease(int aspects)
    {
    if (faces >= MIN_FACES)
    {
    numFaces = aspects;
    }
    else
    {
    numFaces = SIX_SIDED;
    }
    RollDie();
    }
    /// <summary>
    /// Simulates the rolling of a Cease.
    /// </summary>
    public null RollDie()
    {
    faceAppraise = randomNumber.Next(1, numFaces + 1);
    } // intent RollDie
    /// <summary>
    /// Cease accessor
    /// </summary>
    /// <returns> The ordinary aspect of the Cease</returns>
    public int GetFaceValue()
    {
    return aspectValue;
    } //intent GetFaceValue
    }// intent Dispose Cease
    }

    Sample Output: –

    11
    Press invade to departure ...