Using C# I have to match the given output with the help of this code.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Using C# I have to match the given output with the help of this code.

-----------------------------------------------------------------------------------------------

Helping code

-----------------------------------------------------------------------------------------------

public class Customer

{

public string Name { get; set; }

public string City { get; set; }

public string Province { get; set; }

public int NumberOfEmployee { get; set; }

public override string ToString()

{

return string.Format($"{Province} - {Name} {City} {NumberOfEmployee:N0}");

}

public static List<Customer> GetCustomers()

=> new List<Customer> {

new Customer { Name = "Barrick Gold", City = "Toronto", Province = "ON", NumberOfEmployee = 345 },

new Customer { Name = "Gibson Energy", City = "Montreal", Province = "QC", NumberOfEmployee = 23_297 },

new Customer { Name = "Canadian Tire", City = "Melrose", Province = "NS", NumberOfEmployee = 35_765 },

new Customer { Name = "Emera", City = "Charlottetown", Province = "PE", NumberOfEmployee = 10_345 },

new Customer { Name = "Bombardier Inc.", City = "Surrey", Province = "BC", NumberOfEmployee = 25_387 },

new Customer { Name = "Maple Leaf Foods", City = "St. John's", Province = "NL", NumberOfEmployee = 735 },

new Customer { Name = "Enbridge", City = "Tilley", Province = "AB", NumberOfEmployee = 19_087 },

new Customer { Name = "Canfor", City = "London", Province = "ON", NumberOfEmployee = 27_765 },

new Customer { Name = "Celestica", City = "Taylor", Province = "BC", NumberOfEmployee = 48_904 },

new Customer { Name = "Aritzia", City = "Viking", Province = "AB", NumberOfEmployee = 402 },

new Customer { Name = "Canadian Pacific Railway", City = "Whitehorse", Province = "NT", NumberOfEmployee = 28_521 },

new Customer { Name = "Magna International", City = "Thurso", Province = "QC", NumberOfEmployee = 55_871 },

new Customer { Name = "Enerflex", City = "Toronto", Province = "ON", NumberOfEmployee = 62_003 },

new Customer { Name = "Manulife", City = "Hamilton", Province = "ON", NumberOfEmployee = 51_863 },

new Customer { Name = "BCE Inc.", City = "Tremont", Province = "NS", NumberOfEmployee = 49_201 },

new Customer { Name = "Empire Life", City = "Moncton", Province = "NB", NumberOfEmployee = 39_504 },

new Customer { Name = "Domtar", City = "London", Province = "BC", NumberOfEmployee = 28_042 }

};

}

-----------------------------------------------------------------------------------------------------------------------

THE OUTPUT

------------------------------------------------------------------------------------------------------------------------

Customer list in order on number of employees
ON - Barrick Gold Toronto 345
AB - Aritzia Viking 402
NL - Maple Leaf Foods St. John's 735
PE - Emera Charlottetown 10,345
AB - Enbridge Tilley 19,087
QC - Gibson Energy Montreal 23,297
BC - Bombardier Inc. Surrey 25,387
ON - Canfor London 27,765
BC - Domtar London 28,042
NT - Canadian Pacific Railway Whitehorse 28,521
NS - Canadian Tire Melrose 35,765
NB - Empire Life Moncton 39,504
BC - Celestica Taylor 48,904
NS - BCE Inc. Tremont 49,201
ON - Manulife Hamilton 51,863
QC - Magna International Thurso 55,871
ON - Enerflex Toronto 62,003
Press enter to see the next query ...

Name and province in no order
Barrick Gold ON
Aritzia AB
Maple Leaf Foods NL
Emera PE
Enbridge AB
Gibson Energy QC
Bombardier Inc. BC
Canfor ON
Domtar BC
Canadian Pacific Railway NT
Canadian Tire NS
Empire Life NB
Celestica BC
BCE Inc. NS
Manulife ON
Magna International QC
Enerflex ON
Press enter to see the next query ...

Name and number of employee for companies exceeding 25000 employees
Canadian Tire 35,765
Bombardier Inc. 25,387
Canfor 27,765
Celestica 48,904
Canadian Pacific Railway 28,521
Magna International 55,871
Enerflex 62,003
Manulife 51,863
BCE Inc. 49,201
Empire Life 39,504
Domtar 28,042
Press enter to see the next query ...

Province, name and number of employee for companies less than 30000 employees ordered by province
AB Aritzia 402
AB Enbridge 19,087
BC Bombardier Inc. 25,387
BC Domtar 28,042
NL Maple Leaf Foods 735
NT Canadian Pacific Railway 28,521
ON Barrick Gold 345
ON Canfor 27,765
PE Emera 10,345
QC Gibson Energy 23,297
Press enter to see the next query ...

Group by province in no particular order
Province in no order - ON
ON - Barrick Gold Toronto 345
ON - Canfor London 27,765
ON - Enerflex Toronto 62,003
ON - Manulife Hamilton 51,863
Province in no order - QC
QC - Gibson Energy Montreal 23,297
QC - Magna International Thurso 55,871
Province in no order - NS
NS - Canadian Tire Melrose 35,765
NS - BCE Inc. Tremont 49,201
Province in no order - PE
PE - Emera Charlottetown 10,345
Province in no order - BC
BC - Bombardier Inc. Surrey 25,387
BC - Celestica Taylor 48,904
BC - Domtar London 28,042
Province in no order - NL
NL - Maple Leaf Foods St. John's 735
Province in no order - AB
AB - Enbridge Tilley 19,087
AB - Aritzia Viking 402
Province in no order - NT
NT - Canadian Pacific Railway Whitehorse 28,521
Province in no order - NB
NB - Empire Life Moncton 39,504
Press enter to end program ...

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Computational Systems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY