Home / Expert Answers / Computer Science / code-in-c-good-style-use-proper-indentation-and-good-naming-conventions-usability-always-prompt-pa410

(Solved): CODE IN C++:Good style: Use proper indentation and good naming conventions.Usability: Always prompt ...



CODE IN C++:

Good style: Use proper indentation and good naming conventions.

Usability: Always prompt the user for input so they know what to do and provide meaningful output messages.

Input Validation: The program should not accept invalid input, prompt the user to reenter an input that is invalid.

Documentation: Add a comments that document what each part of your code does.

student submitted image, transcription available below


INSTRUCTIONS Industrial Motors, Inc. wants a report that shows its employees the benefits of saving for retirement. Design an application that inputs employees' names, saving rate and salaries and outputs the predicted account value for 10 years. The predicted account value for a year is: (previous year account value + savings rate * salary) * 1.1 The application should continue to input and display employee information until the user enters an employee name "q". Here is an example of the application in use. Enter name (q to quit) : Bob Enter savings rate: 0.05 Enter salary: 50000 The account values for Bob are: 2700 5616 8765.28 12166.50 .. Enter name (q to quit) : Pam Enter savings rate: 0.1 Enter salary: 75000 The account values for Pam are: 8100 16848 26295.84 36499.51 N Enter name (q to quit): Bob Enter savings rate: 0.05 Enter salary: 50000 The account values for Bob are: 2700 5616 8765.28 12166.50 ... Enter name (q to quit): Pam Enter savings rate: 0.1 Enter salary: 75000 The account values for Pam are: 8100 16848 26295.84 36499.51 ... Enter name (q to quit): q bye In last weeks assignment you needed validate the input. Now we will add or int quantity; cout "Enter a quantity: "; cin quantity; while (quantity < 0) cout "Quantity cannot be negative, enter a new quan cin quantity; int quantity; cout << "Enter a quantity: "; cin quantity; while (quantity ) cout << "Quantity cannot be negative, enter a new quan cin quantity; \}


We have an Answer from Expert

View Expert Answer

Expert Answer



Desiging an application that inputs employees' names, saving rate and salaries and outputs the predi...
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe