Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question
Financial Assistance Application
Create the Financial Assistance Application. A non-governmental organization
needs your application to calculate the amount of financial assistance for needy
families. The formula is as follows:
• If the annual household income is between $30,000 and $40,000 and the house-
hold has at least three children, the amount is $1,000 per child.
• If the annual household income is between $20,000 and $30,000 and the house-
hold has at least two children, the amount is $1,500 per child.
• If the annual household income is less than $20,000, the amount is $2,000 per
child.
Implement a function for this computation. The program asks for the household
income and number of children for each applicant, printing the amount returned
by your function. Use -1 as a sentinel value for the input. The program output
should be formatted as shown in the Sample Run.
Note: You must use at least one function in your code.
expand button
Transcribed Image Text:Financial Assistance Application Create the Financial Assistance Application. A non-governmental organization needs your application to calculate the amount of financial assistance for needy families. The formula is as follows: • If the annual household income is between $30,000 and $40,000 and the house- hold has at least three children, the amount is $1,000 per child. • If the annual household income is between $20,000 and $30,000 and the house- hold has at least two children, the amount is $1,500 per child. • If the annual household income is less than $20,000, the amount is $2,000 per child. Implement a function for this computation. The program asks for the household income and number of children for each applicant, printing the amount returned by your function. Use -1 as a sentinel value for the input. The program output should be formatted as shown in the Sample Run. Note: You must use at least one function in your code.
SAMPLE RUN
What is the household income (-1 to quit)? 30000
How many children? 3
The assistance amount is $4500.00.
What is the household income (-1 to quit)? 20000
How many children? 2
The assistance amount is $3000.00.
What is the household income (-1 to quit)? 35000
How many children? 1
The assistance amount is $0.00.
What is the household income (-1 to quit)? -1
What is the household income (-1 to quit)? 105000
How many children? 3
The assistance amount is $0.00.
What is the household income (-1 to quit)? 10000
How many children? 1
The assistance amount is $2000.00.
What is the household income (-1 to quit)? -1
expand button
Transcribed Image Text:SAMPLE RUN What is the household income (-1 to quit)? 30000 How many children? 3 The assistance amount is $4500.00. What is the household income (-1 to quit)? 20000 How many children? 2 The assistance amount is $3000.00. What is the household income (-1 to quit)? 35000 How many children? 1 The assistance amount is $0.00. What is the household income (-1 to quit)? -1 What is the household income (-1 to quit)? 105000 How many children? 3 The assistance amount is $0.00. What is the household income (-1 to quit)? 10000 How many children? 1 The assistance amount is $2000.00. What is the household income (-1 to quit)? -1
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education