Write a server for a client the client sends loan informatio
Write a server for a client. the client sends loan information (annual interest rate, number of years, and loan ammount) to the server. the server computes monthhly paymen and total payment, and sends them back to the client. name the client exercise31_01client and the server exercise31_01server
Solution
#include <iostream>
#include <cstdlib>
#include <string>
#include \"String.h\"
using namespace std;
int main (int argc, char **argv)
{
//Testing Default constructor, length, and print
String one;
cout << \"The length of String one is: \" << one.length() << endl;
cout << \"The value of String one is: \";
one.print();
//Testing Alternate constructor, length, and print
char test[256] = \"Hello world\";
String two(test);
cout << \"The length of String two is: \" << two.length() << endl;
cout << \"The value of String two is: \";
two.print();
//Testing the overloaded [] operator. This replaces your at() function.
cout << \"The first letter is: \" << two[0] << endl;
return 0;
}
