WCF using c# visual studio inquiring for rest client

Paper details
Create a string manipulation service that exposes the following methods:
Method Signature Description
List ConvertToArray(string str) Takes a sentence and returns each word in an List structure
String ConvertToUpperCase(string str) Takes a string and returns the same string converted to uppercase characters
Int LengthOfString(string str) Takes a string and returns the number of characters in the string
List WordLengths(string str) Takes a string and returns a custom class (structure below) containing each word in the string and the number of characters in the word.

Example:
Input ? This is a sample
Output ?
This, 4
is, 2
a, 1
sample, 6

class CustomClass
{
string word {get; set;}
int length {get; set;}
}

The service must expose the following endpoint bindings:
? BasicHttpBinding
? WSHttpBinding
? NetTcpBinding

Part 2:
? Create a client (consumer) of the service created in part 1.
? The client must have the ability to call each of the 4 methods exposed by the service (ConvertToArray, ConvertToUpperCase, LengthOfString and WordLengths).
? The type of application the client application is built from is up to you (e.g. console, windows, WPF ?).
? The client application must have the ability to allow the user to choose which of the four service methods to call and what parameters are passed to the service.
? The client application must present the data returned from the service in some fashion.
? Clear instructions on how to use the client application must be provided with the submission in the form of a readme.txt
? The endpoint with which the client communicates with the service must be one of the 3 endpoints described in part 1.
assignment 2
Marking Scheme:

Using the service created in Assignment 1 implement the following:
? Enable tracing
? ServiceFaults if the user has entered invalid data:
o Invalid data could be:
? A single character
o The fault must return a structure with:
? A string description of the error
? An error code integer (the number used for the code is up to you)
o The client application must capture the fault and display an appropriate message to the user.
? The service must make use of throttling.
? The service must make use of quotas.
Section 2:
? Recreate the client and server from assignment 2 in a REST based implementation.
? The client must have the ability to call each of the 4 methods exposed by the service (ConvertToArray, ConvertToUpperCase, LengthOfString and WordLengths).
? The type of application the client application is built from is up to you (e.g. console, windows, WPF ?).
? The client application must have the ability to allow the user to choose which of the four service methods to call and what parameters are passed to the service.
? The client application must present the data returned from the service in some fashion.

MY CODE :using visual studio c#::::::::
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Client.StringOpServiceReference1;
using System.ServiceModel;

namespace Client
{
class Program
{
static void Main(string[] args)
{
Service1Client client = new Service1Client();

Console.WriteLine(“1. Get the words”);
Console.WriteLine(“2. Convert to Upper”);
Console.WriteLine(“3. Length of String”);
Console.WriteLine(“4. Word Length”);
Console.Write(“Please select your option: “);
string ch = Console.ReadLine();

switch(ch)
{
case “1”:
GetTheWords(client);
break;
case “2”:
ConvertToUpper(client);
break;
case “3”:
GetTheWords(client);
break;
case “4”:
GetWordLengths(client);
break;
default:
break;
}

Console.ReadLine();
}

private static void ConvertToUpper(Service1Client client)
{
Console.Write(“Please enter a string: “);
string input = Console.ReadLine();
try
{
string result = client.ConverToUper(input);

Console.WriteLine(result);
}
catch (FaultException e)
{
Console.WriteLine($”Error {e.Detail.Code}: {e.Detail.Description}.”);
}
}

private static void GetTheWords(Service1Client client)
{
Console.Write(“Please enter a string: “);
string input = Console.ReadLine();
try
{
string[] result = client.ConvertToArray(input);

Console.WriteLine(“List of words:”);
foreach (string res in result)
Console.WriteLine(res);
}
catch (FaultException e)
{
Console.WriteLine($”Error {e.Detail.Code}: {e.Detail.Description}.”);
}
}

private static void GetWordLengths(Service1Client client)
{
string input = string.Empty;
Console.Write(“Please enter a string: “);
input = Console.ReadLine();
try
{
CustomClass[] result = client.WordLengths(input);

foreach (CustomClass c in result)
Console.WriteLine($”{c.word}, {c.length}”);
}
catch (FaultException e)
{
Console.WriteLine($”Error {e.Detail.Code}: {e.Detail.Description}.”);
}
}
}
}

IService:
namespace StringServicesOps
{
// NOTE: You can use the “Rename” command on the “Refactor” menu to change the interface name “IService1” in both code and config file together.
[ServiceContract]
public interface IService1
{
[OperationContract]
[FaultContract(typeof(CustomError))]
List ConvertToArray(string str);
[OperationContract]
[FaultContract(typeof(CustomError))]
string ConverToUper(string str);
[OperationContract]
[FaultContract(typeof(CustomError))]
int StringLength(string str);
[OperationContract]
[FaultContract(typeof(CustomError))]
List WordLengths(string str);
}

}

Services:
amespace StringServicesOps
{
// NOTE: You can use the “Rename” command on the “Refactor” menu to change the class name “Service1” in both code and config file together.
public class Service1 : IService1
{
public string ConverToUper(string str)
{
ThrowCustomError(str);
return str.ToUpper();
}

public List ConvertToArray(string str)
{
ThrowCustomError(str);
return str.Split().ToList();
}
public int StringLength(string str)
{
ThrowCustomError(str);
return str.Length;
}

public List WordLengths(string str)
{
ThrowCustomError(str);
List words = str.Split().ToList();
List custom = new List();

foreach (string w in words)
custom.Add(new CustomClass() { word = w, length = w.Length });

return custom;
}

private static void ThrowCustomError(string str)
{
if (string.IsNullOrEmpty(str))
//throw new FaultException(“String should not be empty.”, new FaultCode(“String should not be empty.”));
throw new FaultException(
new CustomError()
{
Code = 102,
Description = “String should not be empty”
});
}
}
}

CustomError
namespace StringServicesOps
{
public class CustomError
{
public string Description { get; set; }
public int Code { get; set; }
}
}

namespace StringServicesOps
{
public class CustomClass
{
public string word { get; set; }
public int length { get; set; }
}

find the cost of your paper