:This will be patronosing to most but if anyone wishes to supply a solution
I would be most grateful:
This is a simple exercise to ensure that you know how to use the UserInput
The problem concerns the conversion of currency from different countries.
currency, the bank will always round the amount downwards to the next penny.
will be developed further in the next unit.
Write a program that converts Japanese yen to British Pounds Sterling.
You may wish to look at and use the provided Currency class. In that case
RIGHT-click on the brown 'Currency' box, then LEFT click on the option 'void
finally click 'OK' in the 'BlueJ: Method Call' box. Inspect the implementation
source code. Also
try creating objects of the Currency class by RIGHT-clicking on the brown
'Currency' box, then
LEFT click on the new Currency() option. Click 'OK' in the 'BlueJ: Create
Object' box. RIGHT-click
on the red 'currency_1' box, then LEFT click on each of the options. Note
that if a 'BlueJ: Method
Call' box requests a parameter then String values must be surrounded by double
quotation marks e.g.
When you believe that you have developed an acceptable solution, submit it
(press the "Submit" button)
and wait for CourseMaster to mark it. If you are not happy with the result,
try to fix your program,
(that is, develop it, compile it, run it and submit it again). You have three
For this simple example, ignore any problems which might be caused by invalid
80% : Dynamic correctness
Test 1: check for input value
Test 2: check for initial sterling value
Test 3: check for correct result
Test 4: check for correct result
Test 5: check for supporting text
Test 6: Another data value
Test 7: A small data value
20% : Typographic tests
Currency to convert from: JPY
Rate of exchange to British Sterling pence: 1.73464
Amount to exchange: 327.55
327.55 JPY goes directly to 1 pounds 88 pence British Sterling GBP
Make use of UserInput.read........() to read input from the keyboard.
Use / and % for integer modulus division to convert pence to pounds and pence
Make liberal use of comments and use correct indentation style to make your
program more readable
and easy to understand.
In practice, the conversion rate would be read in from a file or database
rather than being input
as a value for each conversion.