473,811 Members | 3,485 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help with assingment

1 New Member
Hello, I need some help!
I need to genreate a set of test inputs and expected results for the currency conversion program below.

I also have to use the folowing format
Test Case <put number here>:
Inputs: Menu Selection = <put number here>
Expected Outputs: <put expected output here>
Currency_Type:

I need to include a hierarchy and flow chart

Can some help me?

Currency Conversion Porgram

Main Menu
Declare InternationalCu rrency As String
Declare InternationalVa lue As Real
Write “InternationalV alue”
Write “This program computes International,”
Write “Currency Types.”
Call Display Menu module
Call Get International Value module
Call Currency Conversion Module
Call Display Results Module
Display_Results (Calculate)
End Main Menu

Display Menu
Declare continue as Boolean
Set continue = true
While continue = true
Display "Welcome to the international currency conversion program"
Display "Please make a selection"
Display "Internatio nal Currency Types:"
Display "1: Canadian Dollars"
Display "2: Mexican Pesos"
Display “3: English Pounds”
Display “4: Japanese Yen”
Display “5: French Francs”
Display ‘6: Quit”
Display "Enter a selection:";
Input currencyType
If currencyType >= 1 AND currencyType <= 5 then
Set continue = false
else if currencyType = 6
Display “Quitting Currency Conversion”
continue = false
else
Display “"Error 4: Invalid menu selection."
continue = true
end if
end While
End Display Menu

Get International Value
Declare value as integer
Declare continue as Boolean
Set continue = true
While continue = true
Display "Enter a currency value (positive number): "
Input internationalVa lue
if internationalVa lue > 0 AND internationValu e <= 1000000 then
continue = false
else
display “"Error 1: Invalid input--Negative Number"
continue = true
end if
end while
End Get International Value
Convert Currency
Declare rate as real
Select Case of CurrencyType
case 1:
Set rate = 1.4680
case 2:
Set rate = 9.5085
case 3:
Set rate = 1.6433
case 4:
Set rate = 104.920
case 5:
Set rate = 6.2561
default:
Set rate = 0.0
End Case
USValue = rate * internationalVa lue
end While
End Convert Currency

Display Results
Declare nation as string
Declare currency as string
Select Case of currencyType
case CANADIAN:
nation = "Canadian";
currency = "Dollars";
case MEXICAN:
nation = "Mexican";
currency = "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 Case
if currency <> “” then
Display “The value of “, internationalVa lue, “ “ , nation, “ “, currency, “ is “,
usValue, “ dollars”
else
Display "Error 5: Invalid currency type."
end if
End Display Results
Apr 17 '08 #1
2 1477
Nepomuk
3,112 Recognized Expert Specialist
Hi gcook! Welcome to bytes.com!
I don't recognise that language, but you should post your question in the apropriate forum.

Greetings,
Nepomuk
Apr 23 '08 #2
Stang02GT
1,208 Recognized Expert Top Contributor
And please use CODE tags when posting code. Thanks.
Apr 24 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

21
6567
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help Workshop program: hcw.exe that's included with Visual Basic. This exact same file compiled perfectly with no notes, warnings or errors prior to reformatting my system. Prior to the reformatting, I copied the help.rtf file onto a CD and checked the box to...
7
1584
by: Snake | last post by:
Hi guys, I have question about classes. when u create class called Test. and you define variable Test c; so does this act like( a variable c of type Test pointing to an abject )? The thing that I am confused with java where you say Test c = new Test; whre you can move this Test object around by saying "Test b" and then b = c;(so c and b points to the same object). while in c++ I think it has different meaning(like b would have different...
6
4360
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing result in any way. Who can help me, I thank you very very much. list.cpp(main program) //-------------------------------------------------------------------------- - #pragma hdrstop #pragma argsused
3
3370
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With numarray, help gives unhelpful responses:
7
5398
by: Corepaul | last post by:
Missing Help Files When I enter "recordset" as the keyword and search the Visual Basic Help index, I get many topics of interest in the resulting list. But there isn't any information available from clicking on many of the available topics (mostly methods but some properties are also unavailable). This same problem occurs with many, if not most, keywords. Is there any way I can activate these "missing" help topics? HELP!
7
2851
by: McCarthy | last post by:
My assingment is to write a command line program in Unix. This program takes 3 arguments. The third argument is a generation prefix. I am suppose to print out to a text file in the format of <gen_prefix> + < generation number > + ".txt" If the gen_prefix is "gen", then the base Generation file will be: "gen0.txt" Generation 1 will be "gen1.txt" Im not sure how to create or declare such a file. Please help
3
2261
by: hjast | last post by:
I am doing an assingment for class and I have everything execpt it will not compile. I get these errors /Users/hjast89/Desktop/test/shape.cpp:36: error: expected `}' at end of input /Users/hjast89/Desktop/test/shape.h:25: error: virtual outside class declaration /Users/hjast89/Desktop/test/shape.h:25: error: function 'void draw()' is initialized like a variable /Users/hjast89/Desktop/test/shape.cpp:15: error: a function-definition...
1
2189
by: Kburge03 | last post by:
Hi!! I've been working on this assingment for class where I have to design and implement an application that displays two Die objects, a button, and a label. Every time the button is pushed, the following should happen: the two Die objects should be rolled, the face value of the two Die objects should be displayed and the label should display the sum of the two dice. I got so close so far, but now the gui won't even pop up with the driver...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5693
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4341
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.