2023 Requirements Create a C program that uses Language Integrated Query to query a collection for all elements that satisfy certain | Assignment Collections
Computer Science 2023 C# Language Integrated Query
2023 Requirements Create a C program that uses Language Integrated Query to query a collection for all elements that satisfy certain | Assignment Collections
Requirements: Create a C# program that uses Language Integrated Query to query a collection for all elements that satisfy certain criteria.
-
Create a class Student with four public properties:
-
StudentID of type string;
-
Age of type int;
-
GPA of type double;
-
Level of type char – with possible values of ‘f’, ‘s’, ‘j’, and ‘n’ corresponding to freshmen, sophomores, juniors, and seniors.
-
Make sure that class Student has properly defined constructor and that all four properties are auto-implemented.
-
Override the ToString() method to provide user friendly display of the values on all four Student class properties.
-
Inside the Main() method create an instance of the List<Student> collection to represent students in a class.
-
Populate this collection with at least 10 unique Student objects.
-
Using this collection, perform and display the results of the following LINQ based queries:
-
Retrieve all Student data;
-
Retrieve all Student data and order the results in ascending order by the StudentID property;
-
Retrieve all Student data and order the results in descending order by the GPA property and in ascending order by the Age property;
-
Retrieve Student data only for freshmen and seniors;
-
Retrieve only the Student data that represents the StudentID and Level properties.
II.
Inside the Main() method create another instance of the List<Student> collection to represent Students in another class. Populate this collection with at least 10 unique Student objects. Make sure that exactly five of those Student objects are the same as the Student objects in the List<Student> collection created according to the requirements 4 and 5 above. The remaining Student objects must be different between both collections. Using the join based LINQ query, process both collections to retrieve and display only Student objects with the same StudentID properties.
We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.