C# 6Write a program that creates a Calculation ClassUse the foll.pdf
Mpesa_C# (2)
1. /*
* Created by Infinite90nine.
* User: H4x3r
* Date: 2/20/2016
* Time: 12:12 PM
*/
using System;
namespace tutorial
{
class Program
{
public static void Main(string[] args)
{
Console.WriteLine("choose a number to proceed.n");
Console.WriteLine("1.Send
Moneyn2.Depositn3.Withdrawn4.ChangePin.n");
int menu;
menu=Convert.ToInt32(Console.ReadLine());
switch(menu){
case 1: Console.WriteLine("sending money
interface.");
Console.WriteLine("nenter agent number");
int agentnumber;
agentnumber=Convert.ToInt32(Console.ReadLine());
if(agentnumber>9999&&agentnumber<999999){
Console.WriteLine("nenter amount to send");
}
else{
Console.WriteLine("Error! agent number must
be five digits");
}
double amount;
amount=Convert.ToInt64(Console.ReadLine());
if(amount>5&&amount<100001){
Console.WriteLine("nenter phone
number.");
}
else{
Console.WriteLine("n Error!
amount must be greater than 5 and less than 100001");
}
Console.ReadKey(true);
double phonenumber;
phonenumber=Convert.ToDouble(Console.ReadLine());
if(phonenumber>111111111&&phonenumber<11111111111){
Console.WriteLine("enter pin.");
}
else{
Console.WriteLine("Error.");
}
Console.ReadKey(true);
int pin;
pin=Convert.ToInt32(Console.ReadLine());
2. if(pin>999&&pin<99999){
Console.WriteLine("nCongratulations! You
have successfully sent money.",phonenumber);
Console.WriteLine("powered by Suditech.");
}
else {
Console.WriteLine("nError! Pin must be 4
characters.");
}
Console.ReadKey(true);
break;
case 2: Console.WriteLine("deposit interface.");
Console.WriteLine("nenter agent number");
int agent_number;
agent_number=Convert.ToInt32(Console.ReadLine());
if(agent_number>9999&&agent_number<999999){
Console.WriteLine("nenter amount to
deposit");
}
else{
Console.WriteLine("Error! agent number must
be five digits");
}
double deposit_amount;
deposit_amount=Convert.ToInt64(Console.ReadLine());
if(deposit_amount>5&&deposit_amount<100001){
Console.WriteLine("nenter phone
number.");
}
else{
Console.WriteLine("n Error!
amount must be greater than 5 and less than 100001");
}
Console.ReadKey(true);
double mobilenumber;
mobilenumber=Convert.ToDouble(Console.ReadLine());
if(mobilenumber>111111111&&mobilenumber<11111111111){
Console.WriteLine("enter pin.");
}
else{
Console.WriteLine("Error.");
}
int secretkey;
secretkey=Convert.ToInt32(Console.ReadLine());
if(secretkey>999&&secretkey<99999){
Console.WriteLine("Processing...");
Console.WriteLine("Amount deposited!");
Console.WriteLine("Powered by Suditech.");
}
break;
case 3 : Console.WriteLine("withdrawal interface.");
break;
3. case 4 : Console.WriteLine("chane pin interface.");
break;
default : Console.WriteLine("inavlid choice.");
break;
}
// TODO: Implement Functionality Here
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}