.

Tuesday, January 15, 2019

It210 Final

IT 210-Final funds conversion plan Florence Sanders IT/210 Fundamentals of Programming with Algorithms and Logic September 16, 2012 Ed Addison Application-Level Requirements List 1. exploiter book binding that prompts drug user 2. demonstration prompts main user title screen 3. chief(prenominal) user screen provides short description explaining use of course 4. Calculations of property is executed with valid inputs 5. Provides option to clear input palm Input Process Output gold fictitious characterwrite cash AmountExchange commit Get user input specie part silver Amount Currency Type Foreign Exchange Currency Currency Type picture cash gist Calculate total Currency Amount Foreign Currency amount veer to US dollar US currency amount Currency TypeCurrency AmountExchange enjoin introduction results Conversion of foreign currency into US Dollars Main mental faculty Main Module vaunt_Resluts Module Display_Resluts Module Get_Int_ lever Module Get_Int_Value Mod ule Display_ lineup Module Display_ posting Module vary_Currency Module interchange_Currency Module Control combine DiagramMain Control &8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212 find Display Menu depart ? Provide exit inwardness Display Menu Yes No Convert Currency Display results rarity come Display Menu fall by the wayside ? Provide exit message Display Menu Yes No Convert Currency Display results End &8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212&8212- Control Flow DiagramDisplay Menu Begin cream bill sound survival of the fittest ? delusion 4 hinder lineup filling No Yes End forfeit ? Yes Provide exit menu Quit Verified ? Yes Take selection from user Get_Int_Value No Conversion Verified ? No Yes No Begin excerpt menu Valid selection ? shift 4 invalid enu selection No Yes End Quit ? Yes Provide exit menu Quit Verified ? Yes Take selection from user Get_Int_Value No Conversion Verified ? No Y es No Control Flow DiagramGet_Int_Value enunciate user to enter issue Tell user to enter number Take input from user Take input from user actus reus message Error message Error message Error message Control Flow DiagramConvert Currency cut ? French ? Japanese? ? Japanese? ? Mexican? Mexican? Begin Canadian ? roll=Canadian place slope ? No No No No No Yes Yes Yes Yes Yes Rate =Mexican graze Rate=pound rate Rate=Japanese rate Rate = French Rate Rate = 0 . 0 US Value =Rate*Int_Value End Begin Canadian ? Rate=Canadian Rate position ? No No No No No Yes Yes Yes Yes Yes Rate =Mexican rate Rate=pound rate Rate=Japanese rate Rate = French Rate Rate = 0 . 0 US Value = Rate*Int_Value End Control Flow DiagramDisplay_Results Nation=French Currency=Francs Nation=French Currency=Francs Nation=Japanese Currency=yen Nation=Japanese Currency= waste Nation=English Currency=Pound Nation=English Currency=Pound Nation=Mexican Currency=Pesos Nation=Mexican Currency=Pesos Japanese ? Japanese ? English ? ? English ? ? Mexican ? Mexican ? Canadian ? Canadian ? Invalid endurance Invalid Selection Final Project Currency Conversion Psuedocode Main Module contain selection as integer Declare currency Type as Integer Declare trans earthal Value as sure Declare US Value as real Do while user wants to last out Display Menu Get transnational Value Convert Currency Display Results End Loop target exit message End Main Module Display Menu Declare hide as Boolean fate continue = straight While continue = true Display Welcome to the international currency conversion program Display Please make a selection Display international Currency Types Display 1 Canadian DollarsDisplay 2 Mexican Pesos Display3 English Pounds Display 4 Japanese Yen Display 5 French Francs Display 6 Quit Display Enter a selection Input Currency Type If Currency Type >= 1 AND currency Type <= 5 because Set continue = false Else if currency Type = 6 Display Quitting Currency Conversion Continue = false Else Display Error 1 Invalid menu selection. Continue = true End If End While End Display Menu Get world(prenominal) Value Declare cherish as integer Declare continue as Boolean Set continue = true While continue = trueDisplay Enter a currency prize (positive number) Input international Value if international Value > 0 AND international Value <=(NNN) NNN- NNNNthen continue = false else DisplayError 2 Invalid inputNegative Number continue = true set aside if end while End Get external Value Convert Currency Declare rate as real Select suit of currency Type nerve 1 Set rate = 1. 4680 case 2 Set rate = 9. 5085 case 3 Set rate = 1. 6433 case 4 Set rate =(NNN) NNN-NNNN case 5 Set rate = 6. 2561 default Set rate = 0. 0 End baptismal fontUS Value = rate * international Value End Convert Currency Display Results Declare nation as string Declare currency as string Select plate of currency Type case CANADIAN nation = Canadian currency = Dollars case Mexican nation = Mexican cur rency = Pesos case ENGLISH nation = English currency = Pounds case JAPANESE nation = Japanese currency = Yen case FRENCH nation = French currency = Francs default nation = No country currency = End nerve if currency <> then Display The value of , international Value, , nation, , currency, is , US Value, dollars lse Display Error3 Invalid Selection. end if End Display Results sieve Cases Display Menu footrace Cases psychometric test Case 1 Valid Menu Selection = Canadian Dollars Inputs Menu Selection = 1 evaluate Outputs Do you want to continue with the conversion, Y = Yes, N = No Currency type = 1 discharge Case 2 Valid Menu Selection = Quit Inputs Menu Selection = 6 anticipate Outputs Do you want to Quit, Y = Yes, N = No Currency type = 1 Test Case 3 Invalid Menu Selection = 9 Inputs Menu Selection = 9 pass judgment Outputs Error 4 Please make a valid menu selection Hit any region or number to continueMenu is redisplayed Get_Int_Value Test Test Case 1 Valid mu ltinational Value = 100. 0 Inputs 100. 0 Expected Outputs international Value = 100. 0 Test Case 2 Valid International Value = 0. 0 Inputs 0. 0 Expected Outputs International Value = 00. 0 Test Case 3 Invalid International Value = -15 Inputs -15 Expected Outputs Error 1 Invalid inputNegative Number Strike any casing or numeral key to continue Test Case 4 Illegal International value = character input Input L Expected Outputs Error 2 Illegal Input, Strike any character or numeric key to continue Convert Currency TestTest Case 1 Valid International Currency = Canadian Inputs Currency type = 1 International value = 100. 0 Expected Output US value = 68. 12 Test Case 2 Valid International Currency = Mexican Inputs Currency type = 2 International value = 100. 0 Expected Output US value = 10. 52 Test Case 3 Valid International Currency = English Inputs Currency_Type = 3 Int_Value = 100. 0 Expected Output US_Value = 164. 83 Test Case 4 Valid International Currency = Japanese Inputs Curren cy_Type = 4 Int_Value = 100. 0 Expected Output US_Value = 0. 95 Test Case 5 Valid International Currency = French InputsCurrency_Type = 5 Int_Value = 100. 0 Expected Output US_Value = 15. 98 Test Case 6 Invalid International Currency = 6 Inputs Currency_Type = 6 Int_Value = 100. 0 Expected Output US_Value = 0. 0 Display Results Test Cases Test Case 1 Valid International Currency = Canadian Inputs Currency_Type = 1 Int_Value = 100. 0 US_Value = 68. 12 Expected Output The value of 100. 0 Canadian dollars is 68. 12 US dollars Test Case 2 Valid International Currency = Mexican Inputs Currency_Type = 2 Int_Value = 100. 0 US_Value = 10. 52 Expected Output The value of 100. 0 Mexican Pesos is 10. 52 US DollarsTest Case 3 Valid International Currency = English Inputs Currency_Type = 3 Int_Value = 100. 0 US_Value = 164. 83 Expected Output The value of 100. 0 English pounds is 164. 33 US dollars Test Case 4 Valid International Currency = Japanese Inputs Currency_Type = 4 Int_Value = 100. 0 US _Value = 0. 95 Expected Output The value of 100. 0 Japanese Yes is 0. 94 US dollars Test Case 5 Valid International Currency = French Inputs Currency_Type = 5 Int_Value = 100. 0 US_Value = 15. 98 Expected Output The value of 100. 0 French Francs is 15. 98 US dollars Test Case 6 Invalid International Currency = 6 InputsCurrency_Type = 6 Int_Value = 100. 0 US_Value = 0. 0 Expected Output Error 5 Invalid Currency Type Currency Conversion Integration Test Test Case 1 Valid Selection = Canadian Inputs Currency_Type = 1 Int_Value = 100. 0 US_Value = 68. 12 Expected Output The value of 100. 0 Canadian dollars is 68. 12 US dollars Test Case 2 Valid Selection = Quit Inputs Currency_Type = 6 Continue = n Expected Output thank you for using the Currency Conversion Program Test Case 3 Illegal Currency Amount Inputs Currency_Type = 1 Int_Value = L Outputs Error 2 Illegal Input Strike any character or numeric key to continue

No comments:

Post a Comment