Description:

The purpose of this program is for you to learn to design, implement, and use functions with a variety of new techniques: call-by-value parameter passing, call-by-reference parameter passing, return values, and default arguments. You will also learn to eliminate global variables and thereby gain greater control of the data in your program.

In this program, you will read in a series of five (5) integers (minimum value 1, maximum value 100) and perform a variety of operations using these integers. You will implement a separate function for each operation. You can see a sample of the expected program "notes from class" section. You may clear the screen between each set of outputs (if you do this, please use the "Press enter to continue" so your user has time to inspect the program output).

•function 1 -- display the 5 integers in a bar graph

â—¦function name: display

â—¦function parameters: one integer, pass-by-value

â—¦function return: nothing

â—¦NOTE: because the console screen width is limited, limit the length of the bar graph to a maximum of fifty (50) characters

•function 2 -- identify the prime numbers

â—¦function name: isPrime

â—¦function parameters: one integer, pass-by-value

â—¦function return: nothing

•function 3 -- identify the maximum value of the five integers

â—¦function name: maxValue

â—¦function parameters: five integers, pass-by-value

â—¦function return: the maximum value of the five integers, as an integer

•function 4 -- identify the minimum value of the five integers

â—¦function name: minValue

â—¦function parameters: five integers, pass-by-value

â—¦function return: the minimum value of the five integers, as an integer

•function 5 -- identify the average value of the five integers

â—¦function name: averageValue

â—¦function parameters: five integers, pass-by-value

â—¦function return: the average value of the five integers, as a double

â—¦NOTE: see this page for help on formatting decimal output using iomanip

•function 6 -- set all values to zero

â—¦function name: zeroValues

â—¦function parameters: five integers, pass-by-reference

â—¦function return: nothing

â—¦NOTE: your program should display "All values have been reset" after this function has executed

•extra credit function (10 pts) -- display each value in Roman numerals

â—¦function name: roman

â—¦function parameters: one integer, pass-by-value

â—¦function return: nothing

Extra Credit (5 points) Have your program loop so that your user, once she/he has seen all of the results from a set of numbers, is able to start over with a new set of numbers.

Objectives:

•design, implement, test, and use C++ functions

•design, implement, test, and use C++ functions that have call-by-value parameters

•design, implement, test, and use C++ functions that return values

Requirements:

•your program source code must be neatly and consistently formatted (see the updated starter.cpp example) [5 points]

•your program cannot have any global variables (with the exception of CinReader reader) [5 points]

•your program must compile and run without errors [5 points]

•function 1 correctly implemented [5 points]

•function 2 correctly implemented [5 points]

•function 3 correctly implemented [5 points]

•function 4 correctly implemented [5 points]

•function 5 correctly implemented [5 points]

•function 6 correctly implemented [5 points]

•your program must provide the functionality described above, using the function types listed with each problem [10 points]

•your program output must be neatly formatted, including the use of proper formatting of decimal output [10 points]

•your program source code must be documented correctly (see the updated starter.cpp example), including proper documentation for each of your functions [10 points]

-------------------------------------------------------------------------------------------------------------------------------

Description:

The purpose of this program is to introduce you to arrays. You will create a simple day planner/journal that will allow a user to choose a month, then choose a date, then write and store a note for that day. Your program should allow your user to work with the current month and the following three months (April 2014 - June 2014).

You must implement the following features, using functions where noted (you may use more functions than are noted if you wish):

four arrays, one for each month required, with the proper number of days for each

the ability for the user to select the desired month (FUNCTION)

the ability to view the entire month's notes at once (FUNCTION)

the ability for the user to select the desired day, and do the following with that day:

the ability for the user to retrieve all of her/his information from a text file (FUNCTION)

To see sample code for this program look in "Notes From Class" - "Lab 6".

• your program source code must be neatly and consistently formatted [5 points]

• your program cannot have any global variables [5 points]

• your program must compile and run without errors [5 points]

• the four required months as arrays with the proper number of days for each [15 points]

• user can select and work with a specific month [5 points]

• user can view the whole month at once [5 points]

• user can view a single day's note [5 points]

• user can clear a single day's note [5 points]

• user can overwrite a single day's note [5 points]

• user can save program data to file [5 points]

• user can retrieve program data from file [5 points]

• your program source code must be documented correctly, including proper documentation for each of your functions [10 points]

You must implement the following features, using functions where noted (you may use more functions than are noted if you wish):

four arrays, one for each month required, with the proper number of days for each

the ability for the user to select the desired month (FUNCTION)

the ability to view the entire month's notes at once (FUNCTION)

the ability for the user to select the desired day, and do the following with that day:

- view the note (FUNCTION)
- delete/clear the note (FUNCTION)
- overwrite the note (FUNCTION)

the ability for the user to retrieve all of her/his information from a text file (FUNCTION)

To see sample code for this program look in "Notes From Class" - "Lab 6".

• your program source code must be neatly and consistently formatted [5 points]

• your program cannot have any global variables [5 points]

• your program must compile and run without errors [5 points]

• the four required months as arrays with the proper number of days for each [15 points]

• user can select and work with a specific month [5 points]

• user can view the whole month at once [5 points]

• user can view a single day's note [5 points]

• user can clear a single day's note [5 points]

• user can overwrite a single day's note [5 points]

• user can save program data to file [5 points]

• user can retrieve program data from file [5 points]

• your program source code must be documented correctly, including proper documentation for each of your functions [10 points]

Subject | Computer |

Due By (Pacific Time) | 03/27/2014 12:00 am |

Tutor | Rating |
---|---|

pallavi Chat Now! |
out of 1971 reviews More.. |

amosmm Chat Now! |
out of 766 reviews More.. |

PhyzKyd Chat Now! |
out of 1164 reviews More.. |

rajdeep77 Chat Now! |
out of 721 reviews More.. |

sctys Chat Now! |
out of 1600 reviews More.. |

sharadgreen Chat Now! |
out of 770 reviews More.. |

topnotcher Chat Now! |
out of 766 reviews More.. |

XXXIAO Chat Now! |
out of 680 reviews More.. |