C# Language Integrated Query
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.
11 years ago
13
Purchase the answer to view it

- asignment_completed_tom.rar
- Assignment 2
- A-Plus Writer only - LASA 1: The Costs of Production
- If sales is the variable you are trying to explain and you have 2 independent
- WP_4
- HRM 531 Final Exam - 2015
- DB project Manager
- Part A. SPSS Assignment In this exercise, you are playing the role of a researcher that is testing new medication designed to improve cholesterol levels
- Marketing & Business Essay. (MUST HAVE KNOWLEDGE OF THE 4 P's)
- Marketing Discussion Question
- database design