Question: Using C# Window Form Set up a WCF application that contains the Service Library, the Host, and a client The library is to manage data

Using C# Window Form Set up a WCF application that contains the Service Library, the Host, and a client

The library is to manage data source provide as a List of students

public class Student

{

public string First { get; set; }

public string Last { get; set; }

public int ID { get; set; }

public List Scores;

}

static List students = new List

{

new Student {First="Svetlana", Last="Omelchenko", ID=111, Scores= new List {97, 92, 81, 60}},

new Student {First="Claire", Last="O'Donnell", ID=112, Scores= new List {75, 84, 91, 39}},

new Student {First="Sven", Last="Mortensen", ID=113, Scores= new List {88, 94, 65, 91}},

new Student {First="Cesar", Last="Garcia", ID=114, Scores= new List {97, 89, 85, 82}},

new Student {First="Debra", Last="Garcia", ID=115, Scores= new List {35, 72, 91, 70}},

new Student {First="Fadi", Last="Fakhouri", ID=116, Scores= new List {99, 86, 90, 94}},

new Student {First="Hanying", Last="Feng", ID=117, Scores= new List {93, 92, 80, 87}},

new Student {First="Hugo", Last="Garcia", ID=118, Scores= new List {92, 90, 83, 78}},

new Student {First="Lance", Last="Tucker", ID=119, Scores= new List {68, 79, 88, 92}},

new Student {First="Terry", Last="Adams", ID=120, Scores= new List {99, 82, 81, 79}},

new Student {First="Eugene", Last="Zabokritski", ID=121, Scores= new List {96, 85, 91, 60}},

new Student {First="Michael", Last="Tucker", ID=122, Scores= new List {94, 92, 91, 91} }

};

The Contract should contain operations to:

1. Return a student object by id

2. Add a new student to the data source. The service library should not allow two students with the same id

3. Add a grade to a student by id

4. Return the list (as an array) of all students whose grade average is below the overall average. Where the overall average is the average of all the student averages (suggest to add the methods GetAverage and AddGrade in the Student class)

The Host should use configuration (use either Console or Windows)

The Client should query the service 1. Get a Student and display all the student info including the grades 2. Add new Student, have at least 3 grades added to this student 3. Add a grade to a student providing it id 4. Request a list of all students whose grade average is below the overall average

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!