Cześć

Musze wykonać prosty kalkulator w formie formularza w WEB SERVICES
2 aktywne wiersze tekstu w które wpisuje się po jednej liczbie i następnie się sumują/mnożą, etc
Ma to działać jako klient-serwer

Wiem jak to zrobić z tym podziałem na klient serwer, ale w ogóle nie wiem jak napisać klase z tym kalkulatorem.
Znalazłem podobny kod, ale pisany jest on w C#

 <%@ WebService Language="C#" Class="CalcService" %>

using System;
using System.Web.Services;

[WebService (Name="Calculator Web Service",
Description="Performs simple math over the Web")]
class CalcService
{
[WebMethod (Description="Computes the sum of two integers")]
public int Add (int a, int b)
{
return a + b;
}

[WebMethod
(Description="Computes the difference between two integers")]
public int Subtract (int a, int b)
{
return a - b;
}
}

Czy mógłby ktoś mi pomóc i przekształcić to?

Pozdrawiam