Programming Problem 2
This is programming problem two for C# .NET. This exercise focuses on the contents of chapters 1-4 in the Sharp and Jagger book. Basic focus is on solving a simple problem using primitives and branch type statments (If then). You are more then welcome to use any concepts from programming to solve the problem but this is only an option. Be sure and document your code.
Key Components
Console Messages (writeline)
Console Input (readline)
Basic Primitives (floats, chars, strings)
Simple Branches (ifs)
Compiling and Debugging
|
The Currency Convertor
Basic Problem
You need to build a solution to convert foreign currencies into US Dollars so that users can figure out how much something costs when they are travelling. This program is a prototype for a PDA plug in that will be sold to users of a certain cell phone later. Initially, a console program is needed as a proof of concept. You should write a simple program that allows for single input to determine input currency (1 == Yen, 2 == Euros, 3 == Yuan). Once the input is received from the user for the type, have them input the amount and then convert it into dollars (you can look up the rates of exchange for the day on the web). Later, the problem will need to be enabled to look up these amounts automatically but for now just put in a fixed amount. Output the result to the console.
Advanced Problem
If you are bored, try this. First, write the program as a windows application instead of a simple console app. Then try and figure out how you can use the web, to retreive the exchange rates (you can set this up on Bel.rwu.edu (request an account from Dr. White or Dr. Yuan) ). Enable this app so that it could be migrated to a web enabled cell phone.
|
Links
World Currency Convertor in Java Script (use view source) |