Get Instant Help From 5000+ Experts For

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

INFO498 Information Technology

Questions:
1. Create the logic for a program that helps a user to calculate one year of simple interest.
• Create an appropriately named method to:
1. input the amount the user is investing (principal)
2. calculate one year of interest at a rate of 7% (the formula is quite simple, interest is the amount invested times 0.07)
3. output the interest

• Be aware that any variables required by the method must be declared in the body of the method, not after startlike we have been doing up to now.
• Call the method in the main code body (the code between startand stop).

Example

1. What is the output of the following algorithm?

In the example above, we use the same variable name in the main body and in the method name.

• Why would a programmer use different names in this case? Give 2 reasons.
• Why would a programmer use the same name? Give 2 reasons.

4. Find the current conversion rate for U.S. dollars to any three foreign currencies. Plan the logic for a program that allows the user to choose one of the three foreign currencies, input a dollar amount for conversion and view the converted amount.

Write 3 methods, one for each currency, each of which should input a dollar amount, perform the conversion and output the result.

The user can specify the foreign currency by its code, for example Japanese yen is JPY. Here is a list of exchange rates by code

Each conversion should take place in its own method.

5.Discuss the advantages to modularization. Think a real world problem you would design program logic to solve. Think of the sequential solution and then a modular solution. Discuss the advantages of the modular solution over the sequential solution.

This is worth 5 points.

• 1 point for describing the problem
• 1 point for the sequential solution
• 1 point for the modular solution
• 2 points for describing the advantages.