internal static int CalcNumberOfCharts(NewsPaper newsPaper)
        {
            int sum = 0;

            for (int i = 0; i < newsPaper.GetStories().Length; i++)
            {
                sum = sum + newsPaper.GetStories()[i].GetTitle().Length +
                      newsPaper.GetStories()[i].GetBody().Length +
                      newsPaper.GetStories()[i].GetVS().Length;
            }
            return(sum);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            GossipTeam   GT = new GossipTeam();
            HealthTeam   HT = new HealthTeam();
            PoliticsTeam PT = new PoliticsTeam();

            GT.CreateStory();
            HT.CreateStory();
            PT.CreateStory();

            NewsPaper NP = new NewsPaper(stories, 11.0f);
        }
Exemplo n.º 3
0
 public void SellNewsPaper(NewsPaper newsPaper)
 {
     _moneyEarned = (int)(_moneyEarned + newsPaper._price);
 }