60 503
Assignments Done
98,1%
Successfully Done
In April 2018

Answer to Question #41645 in C# for Soosan

Question #41645
Create a base class to hold information about sporting teams on campus. It should not be possible to instantiate the class. Include common characteristics such as primary coach and type of sport. Define a minimum of one virtualmethod.
Expert's answer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace sporting_teams
{
class Program
{
  static void Main(string[] args)
  {
  }
}
abstract class BaseSportTeam
{
  string _sportType = "";
  string _coach = "";
  int _playerNumber = 1;
  
  public string SportType { get { return _sportType; } }
  public string Coach { get { return Coach; } }
  public int Players { get { return _playerNumber; } }
  public BaseSportTeam(string sportType, string coach, int playerNumber = 1)
  {
_sportType = sportType;
_coach = coach;
_playerNumber = playerNumber;
  }
  public virtual void StartSeason()
  {
//Here should be implementation
  }
  public virtual void PlayGame()
  {
//Here should be implementation
  }
  public override string ToString()
  {
return String.Format("Sport type: {0}\nCoach: {1}\n{2} players in game", _sportType, _coach, _playerNumber);
  }
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions