Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 ) ConferencesDemo 2 ) My code is running fine, but I cannot get grade yet. This are my ERRORS: Reason: Unable to run ConferencesDemo.cs

1) ConferencesDemo
2) My code is running fine, but I cannot get grade yet. This are my ERRORS:
Reason: Unable to run ConferencesDemo.cs
Unhandled Exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: s
Please assist me.
using System;
using static System.Console;
using System.Globalization;
using System.Collections.Generic;
class Conference : IComparable
{
public string Group { get; set; }
public string Date { get; set; }
public int Attendees { get; set; }// least to greatest attendees
public int CompareTo(Conference other)
{
return Attendees.CompareTo(other.Attendees);
}
}
// NAME Conference starts on DATE and has ATTENDEES attendees
class ConferencesDemo // Conference
{
static void Main()// static
{
List conferences = new List();
for (int i =0; i 5; i++)//5 times
{
Conference conference = new Conference();
Write("Group: ");
conference.Group =ReadLine();
Write("Date: ");
conference.Date = ReadLine();
Write("Attendees: ");
conference.Attendees = int.Parse(ReadLine());
conferences.Add(conference);
}
conferences.Sort();
ReadLine();
foreach (var conference in conferences)
{
WriteLine($"{conference.Group} Conference starts on {conference.Date} and has {conference.Attendees} attendees");
}
}
}
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions