40 pts.
 Create a menu-driven program that allows users to select one of five international currency types, input the amount of a foreign currency, and then co
Consolidate all the sections of the Currency Conversion development documentation: requirements, design, and testing.
ASKED: May 12, 2008  10:26 PM GMT
UPDATED: May 15, 2008  1:02:01 AM GMT
40 pts.

Answer Wiki:
Last Wiki Answer Submitted:  May 12, 2008  10:26 PM (GMT)  by  Tsmith7   40 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _




 

What level of development experiance do you have? This will be a determining factor both determining what language I would recommend you use and the level of detail in my or anyone elses answer.
Also what platform do you wish to use? Windows, Linux, Mac, Web, in a portal or a java platform like eclipse?

Thanks,

 430 pts.

 

Fundamental experience is what I have. I will be using windows.

 40 pts.

 

Programming with Algorithms and logic.

This is what I have so far, I am trying to see if I am on the right track.

/*include the library*/
#include <stdio.h>
/*define the five currencies used for the conversion*/
#define Currency1 0.58
#define Currency2 2.50
#define Currency3 3.69
#define Currency4 21.00
#define Currency5 1.75
/*function prototyping*/
void menu (int *);
float calculateConversion(int, float);
/*main function of the program*/
int main()
{
/*declare variables*/
float us;
float conversion;
int choice;
/*call user selection menu by reference*/
menu(&choice);
/*prompt user to enter amount of US to convert*/
printf(”Please enter an amount in US Dolalrs to convert: $”);
/*store user entry into memeory*/;
scanf(”%f”,us);
/*call conversion function by value*/
calculateConversion (choice, us);
/*print results of conversion*/
printf(”The amount of that currency in US Dollars is: $%.2f\n”, conversion);
/*display results*/
getchar();
/*terminate program*/
return 0;
}
/*function definition by reference*/
void menu(int *CHOICE)
{
/*local variables for menu()*/
int choice;
/*show options to user*/
printf(”Welcome to the currency conversion program\n”);
printf(”Press number 1 to 5 to select a currency to convert\n”);
printf(”Press [1] for Pounds\n”);
printf(”Press [2] for Deutchmarks\n”);
printf(”Press [3] for Francs\n”);
printf(”Press [4] for Pesetas\n”);
printf(”Press [5] for Canadian Dollars\n”);
/* store choice in memory*/
scanf(”%d”, &choice);
/*set value of referenced variable*/
*CHOICE = choice;
}
/*function definition by value*/
float calculateConversion(int CHOICE, float us)
{
/*local variable for conversion*/
float conversion;
/*switch to user the case selected by user in reference funtion*/
switch (CHOICE)
{
case 1:
conversion=Currency1*us;
break;
case 2:
conversion=Currency2*us;
break;
case 3:
conversion=Currency3*us;
break;
case 4:
conversion=Currency4*us;
break;
case 5:
conversion=Currency5*us;
break;
}
/*returns the new value to the main function*/
return conversion;
}

 40 pts.

 

Can someone let me know if I am on the right track?

 40 pts.