Jump to content

C# programming exchange rate

- - - - -

  • Please log in to reply
5 replies to this topic

#1
Noobieless

Noobieless

    Newbie

  • Members
  • Pip
  • 4 posts
Hello

I am stuck on a project i have to do with C#

I need to make an Exchange Rate program
With 3 countries
2 textbox, 1 button, and a comboBox

Basicly, a textbox to put in the amount u want converted, another textbox to give you the answer, a button to click to convert it and a comboBox to list the 3 countries

This is what the project says:

Quote

10 Application makes use of a class for the Exchange rate converter Call the class CExchange.
11 The Exchange rate should be set by default (todays change rate) but the user should have the option to enter his own exchange rate. If this is field does not get filled in it should use the default exchange rate amount to work out the calculation.
12 Application makes use of a class for the interest. Call the class CInterest.
13 There is constructors made for the classes
14 The class must contain members for StartAmmount, Interest and Period
15 The class must contain a public method CalculateInterest that Returns the EndAmmount
16 The class must contain a overloaded method for CalculateInterest that does not take a period parameter and only calculates the interest for one period.
17 Include descriptive comments throughout the application

Can anyone help me make this exchange rate program?

Thank you guys if u can help me out :D

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
What do you have so far?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Noobieless

Noobieless

    Newbie

  • Members
  • Pip
  • 4 posts
I keep trying different things, i just cant seem to put anything together, its actually quite frustrating :(

Ive only been doing C# for 1month now, so ofcourse u should know im noob at C# atm :P

If u could help me do the beginning part of this, i would be truely greatful

#4
Noobieless

Noobieless

    Newbie

  • Members
  • Pip
  • 4 posts
Can anyone help me? please

#5
cdg10620

cdg10620

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 389 posts
Best way to get help is to post what you've written so far and ask specific questions. Most people on the forum are not going to write the code for you. You need to prove that you have put forth some effort into finding the solution yourself. That's the best way to learn.
-CDG10620
Software Developer

#6
Splitz

Splitz

    Newbie

  • Members
  • Pip
  • 1 posts
Hi guys
Hey Noobieless, where you from, I got the same assignment two days ago.
I have different problems, Im stuck on classes and constructors, can someone please send some links or give advice on this.
I have my code but need to put it in the class mentioned above


private void button1_Click(object sender, RoutedEventArgs e)
{
double numb3 = double.Parse(currencyamount.Text);
double x = 0;
double answer2 = convert(numb3, x);
convcurrency.Text = answer2.ToString();
}
private double convert(double numb3, double x)
{
double result = 0;
if (radioButton1.IsChecked.HasValue && radioButton1.IsChecked.Value)
result = radiovalues(numb3, x);
else if (gbp.IsChecked.HasValue && gbp.IsChecked.Value)
result = gbpvalues(numb3, x);
else if (usd.IsChecked.HasValue && usd.IsChecked.Value)
result = usdvalues(numb3, x);
return result;
}
private double gbpvalues(double numb3, double x)
{
x = 0.09; //current exchange rate for GBP
return numb3 * x;
}
private double usdvalues(double numb3, double x)
{
x = 0.14; //current exchange rate for USD
return numb3 * x;
}
private double radiovalues(double numb3, double x)
{
x = double.Parse(convamount.Text);
return numb3 * x; //this is the user defined rate
}



Any help or advice would be appreciated. (O' and I have two months programming knowledge so dont dis my codes, it works)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users