Question: HW06: CardQualify For this assignment you're to write a program that grants or denies a credit card to the user. In order for the user

HW06: CardQualify For this assignment you're to write a program that grants or denies a credit card to the user. In order for the user to qualify for this exclusive piece of plastic, he/she will first have to enter some items of data. Then the program will evaluate the input, and display a message with the user's good (or bad) fortune. Here are a few more details regarding the functions you'll write for this program main: This function prompts the user for the number of years the user has spent at his/her current job, the hourly wage and the number of hours per week. main will then pass this information along as input to the CheckQualify function, which returns a true or false value. main will then use this value as an argument to the DispQualify function. CheckQualify: This function will receive as input the number of years the user has spent at his/her current job, the hourly wage and the number of hours per week. Then the function CalcSalary is called to derive the full annual salary of the user. In order to qualify for the credit card, the user must have worked at their current job for at least two years, and make at least $17,000 per year. CheckQualify will return a value of true to the caller if the user qualifies, false if not. CalcSalary: This function will receive as input the hourly pay and number of hours worked per week. Then it will calculate the total annual salary, and return this value to the caller DispQualify: This function is called from main and receives a boolean value as input, with true meaning that the user qualifies for the card, and false meaning the card is to be denied. Thus, this function will display the approved or denied message to stdout. As usual, the most important thing to do first is to thoroughly understand the problem! Think of what the user should see on the screen, what prompts will appear and what the user will enter from the keyboard. Make sure you're clear on the program flow -- which functions are being called when, what their inputs and return values are Consider each function independently of the other functions... As individual functions, they each have their own tasks that they must perform. Sketch out on a piece of paper the sequence of steps each function will have to take in order to complete those tasks. In other words, you should first figure out what you're going to do before you try to do it! If you do that, you can save yourself loads of time and frustration. Then when you think you have a strong understanding, you're probably ready to start writing the code. If you're still a little fuzzy on functions, you can study your notes, read the book and write some throw-away code before you begin; all of these activities will help you feel more comfortable with the material. Note that in this particular program, you have functions calling functions! That's not a problem, because functions always return to their callers. For a graphical illustration of the hierarchy of function calls and flow of data, look at the structure chart file for this program (remember, structure charts are read from top-to-bottom, left-to-right) Where will you put your code? Create a subdirectory called HW06 and save your code in a file called cardqualify.cpp in that subdirectory. Good luck
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
