Purchase Solution

Computer Programming Code

Not what you're looking for?

Ask Custom Question

1. What are the advantages and disadvantages of using functions, in your software code, in a software development project? Give some examples.

2. Notice that the main program is initiated like a function:
int main(void)

Is the main program a function? If so, how is it used like a function by other programs? Give examples

3. Show how you might write a "case" statement using only the "if" statement instead of an actual case statement. Hint: Nested if statements. Explain your code

4. How would you error check the users' input to make sure the input was a number, letter, or string?
(In your final IA program you will prompt the user to select a currency to be converted. They will have the options of picking one of five currencies.)

Example:

Please enter a '1' for Canada Dollars

Please enter a '2' for Aus Dollars

Please enter a '3' for Japan Yen

Please enter a '4' for Euros

Please enter a '5' for British Pound

How would I know if the user entered an 'A' for example instead of a '1'?

Purchase this Solution

Solution Summary

The expert examines computer programming code functions. THe main program initiated like a function is determined.

Solution Preview

1. What are the advantages and disadvantages of using functions, in your software code, in a software development project? Give some examples.
- Functions are building blocks in any software development. Without functions a program would look like one big function which implements everything needed by the program. In this case:
- Testing and debugging would be very challenging
- Reading and understanding the code would be almost impossible
Using functions eliminates these drawbacks.

The only disadvantage of using functions would be their excessive usage if any. One should introduce functions judiciously.
Some times one may introduce a function, which will be called only once - that is fine, as long as, the function represents a logical unit of implementation. For instance, in ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Networking Questions

This quiz consists of some basic networking questions.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

C# variables and classes

This quiz contains questions about C# classes and variables.