Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions