just c# code only no any other languages Design a class named BaseballGame that
ID: 3838996 • Letter: J
Question
just c# code only no any other languages
Design a class named BaseballGame that has fields for two team names and
a final score for each team. Include methods to set and get the values for
each data field. Create the class diagram and write the pseudocode that
defines the class.
b. Design an application that declares three BaseballGame objects and sets and
displays their values.
c. Design an application that declares an array of 12 BaseballGame objects.
Prompt the user for data for each object, and display all the values. Then pass
each object to a method that displays the name of the winning team or “Tie” if
the score is a tie.
Explanation / Answer
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Security.Cryptography; namespace NEXTCSharp { class BaseballGame { public int[] guess, answer; const int Length = 3; public BaseballGame() { guess = new int[Length]; answer = new int[Length]; genrateAns(answer); } private void genrateAns(int[] answer) { List queue = new List(); for (int i = 1; iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.