Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Topics

Recent Status Updates

View All Updates

- - - - -

C# programming exchange rate


  • Please log in to reply
5 replies to this topic

#1 Noobieless


    CC Lurker

  • Just Joined
  • Pip
  • 4 posts

Posted 21 March 2011 - 06:35 AM


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:

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
  • 0

#2 WingedPanther73


    A spammer's worst nightmare

  • Moderator
  • 17757 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

Posted 21 March 2011 - 02:26 PM

What do you have so far?
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/

#3 Noobieless


    CC Lurker

  • Just Joined
  • Pip
  • 4 posts

Posted 21 March 2011 - 02:46 PM

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
  • 0

#4 Noobieless


    CC Lurker

  • Just Joined
  • Pip
  • 4 posts

Posted 21 March 2011 - 11:25 PM

Can anyone help me? please
  • 0

#5 cdg10620


    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 344 posts
  • Programming Language:C#, JavaScript, PL/SQL, Transact-SQL, VBScript, Others

Posted 22 March 2011 - 10:01 AM

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.
  • 0
Software Developer

#6 Splitz


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 24 March 2011 - 12:09 PM

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)
  • 0

Also tagged with one or more of these keywords: combobox

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download