(Solved):How would I use arrays instead to get the same output as shown below? List of courses: IT 145 IT 200 IT 201 IT 270 IT 315 IT 328 IT 330 SOURCE CODE namespace ConsoleApplication1 { class Program { s… View Answer…

 

Question

How would I use arrays instead to get the same output as shown below?

List of courses:

IT 145

IT 200

IT 201

IT 270

IT 315

IT 328

IT 330

SOURCE CODE

namespace ConsoleApplication1

{

class Program

{

static void Main(string args)

{

Course course1 = new Course(“IT 145”);

Course course2 = new Course(“IT 200”);

Course course3 = new Course(“IT 201”);

Course course4 = new Course(“IT 270”);

Course course5 = new Course(“IT 315”);

Course course6 = new Course(“IT 328”);

Course course7 = new Course(“IT 330”);

Console.WriteLine(“Wilson Kayla”);

Console.WriteLine(“List of courses:”);

Console.WriteLine(course1.getName());

Console.WriteLine(course2.getName());

Console.WriteLine(course3.getName());

Console.WriteLine(course4.getName());

Console.WriteLine(course5.getName());

Console.WriteLine(course6.getName());

Console.WriteLine(course7.getName());

Console.ReadLine();

}

}

class Course

{

private string name

Scroll to top