The student should gain an understanding of: -Storage Types -Formatted input and
ID: 440362 • Letter: T
Question
The student should gain an understanding of:
-Storage Types
-Formatted input and output
-Processing a menu
-Handling a uninitialized Data
Function
The program should keep track of the following quantities for that person:
-First Name of person: a single string with a maximum of 32 characters.
-Last Nameof person: a single string with a maximum of 32 characters.
-Nicknameof person: a single string with a maximum of 32 characters.
-Sexof person: a single character 'M' or 'F'.
-Age: an integer from 18 to 99 years inclusive.
-State of Birth:Two-character abbreviation for state (e.g. AL, SC)
-Type: 'Real' or 'Virtual' (input as either a 0 or 1.)
-Number of text messages sent to them: an integer between 0 and 2 billion inclusive.
-Moneyinvested in them: a floating-point number from 0.0 to 1.0x10^100inclusive.
(Initially, these quantities are to be unknown and should be related as such.)
Menu
The program should have the following input options in the menu:
-Enter a Name - Enter Nickname
-Enter Sex - Enter Age
-Enter State -Enter Type
-Enter Number of Texts Sent -Display Data
-Enter Investment Amount - Clear all Data
-Quit
The specific format of the menu and display is not important, but must be straight-forward and neat.
Input
The program should allow the user to select only one of these options at a time. An error message should be displayed if an invalid option is chosen. For the options requiring data input, the program should prompt for the appropriate data when the option is selected. If the data input in invalid, an error message should be given. Upon completing any option (except "Quit"), the program should redisplay the menu.
Output
The program should only display data if that option is selected. When it is selected, the program should print all data fields indicating which - if any - data is unknown.
Alonf with the previous aforementioned items, the program should also compute and display the ration of contributions to lies told (given in units of dollars per lie.)
Your program should be structured neatly, easily readable, and well-commented. Furthermor, variable and function names should be such that the software is as "self-commenting" as possible.
Explanation / Answer
check @http://www.chegg.com/homework-help
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.