Java How To Program (Early Objects)
10th Edition
ISBN: 9780133807943
Author: Deitel, Paul
Publisher: Pearson Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 5, Problem 10.1E
(Modified Compound-Interest
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Q1) An accountant works for a company and there is a need for a C program to calculate the
average income of fifteen employees after cutting tax from it. Write a program that takes the
gross income of the 15 employees using scanf and check the tax range using the given table
below. Use repetition structure (while or for loop) to calculate the salary of each entployee and
if/else statements to select the salary based on the gross income. Besides, find the sum of all
the salaries and print the average salary for fifteen employees. The formulation for calculating
the salary is shown below:
Salary = Gross Income
Salary = GrossIncome - GrossIncome 0.05
Salary = GrossIncome – Grosslncome • 0.10
Salary = GrossIncome – Grosslncome 0.15
GrossIncome < 500$
500$ < GrossIncome < 700$
700$ < GrossIncome < 1000$
1000$ < GrossIncome
Salary =
Q1) An accountant works for a company and there is a need for a C program to calculate the
average income of fifteen employees after cutting tax from it. Write a program that takes the
gross income of the 15 employees using scanf and check the tax range using the given table
below. Use repetition structure (while or for loop) to calculate the salary of each entployee and
iffelse statements to select the salary based on the gross income. Besides, find the sum of all
the salaries and print the average salary for fifteen employees. The formulation for calculating
the salary is shown below:
Salary = Gross Income
Salary = GrossIncome - GrossIncome 0.05
Salary = GrossIncome - Grosslncome 0.10
GrossIncome < 500$
500$ < GrossIncome < 700$
700$ < GrossIncome < 1000$
1000$ < GrossIncome
Salary =
Salary = GrossIncome - GrossIncome 0.15
C language
Please solve quickly
Chapter 5 Solutions
Java How To Program (Early Objects)
Ch. 5 - Fill in the blanks in each of the following...Ch. 5 - Fill in the blanks in each of the following...Ch. 5 - Fill in the blanks in each of the following...Ch. 5 - Fill in the blanks in each of the following...Ch. 5 - Fill in the blanks in each of the following...Ch. 5 - Prob. 1.6SRECh. 5 - Prob. 1.7SRECh. 5 - State whether each of the following is true or...Ch. 5 - State whether each of the following is true or...Ch. 5 - State whether each of the following is true or...
Ch. 5 - State whether each of the following is true or...Ch. 5 - Prob. 2.5SRECh. 5 - State whether each of the following is true or...Ch. 5 - Prob. 2.7SRECh. 5 - Prob. 3.1SRECh. 5 - Prob. 3.2SRECh. 5 - Write a Java statement or a set of Java statements...Ch. 5 - Prob. 3.4SRECh. 5 - Find the error in each of the following code...Ch. 5 - Find the error in each of the following code...Ch. 5 - Find the error in each of the following code...Ch. 5 - Find the error in each of the following code...Ch. 5 - Describe the four basic elements of...Ch. 5 - Compare and contrast the while and for iteration...Ch. 5 - Prob. 3.1ECh. 5 - Compare and contrast the break and continue...Ch. 5 - Find and correct the error(s) in each of the...Ch. 5 - The following code should print whether integer...Ch. 5 - Prob. 5.3ECh. 5 - Find and correct the error(s) in each of the...Ch. 5 - What does the following program do? 1 // Exercise...Ch. 5 - (Find the Smallest Value) Write an application...Ch. 5 - (Calculating the Product of Odd Integers) Write an...Ch. 5 - (Factorials) Factorials are used frequently in...Ch. 5 - (Modified Compound-Interest Program) Modify the...Ch. 5 - (Triangle Printing Program) Write an application...Ch. 5 - (Bar-Chart Printing Program) One interesting...Ch. 5 - (Calculating Sales) An online retailer sells five...Ch. 5 - (Modified Compound-Interest Program) Modify the...Ch. 5 - Assume that i = 1, j = 2, k = 3 and m = 2. What...Ch. 5 - (Calculating the Value of ) Calculate the value of...Ch. 5 - (Pythagorean Triples) A right triangle can have...Ch. 5 - (Modified Triangle-Printing Program) Modify...Ch. 5 - (De Morgans Laws) In this chapter, we discussed...Ch. 5 - (Diamond-Printing Program) Write an application...Ch. 5 - Prob. 21.1ECh. 5 - A criticism of the break statement and the...Ch. 5 - What does the following program segment do? 1 for...Ch. 5 - Describe in general how youd remove any continue...Ch. 5 - Prob. 25.1ECh. 5 - (Facebook User Base Growth) According to...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
What are some features of specific programming languages you know whose rationales are a mystery to you?
Concepts of Programming Languages (11th Edition)
What value in an array does the selection sort algorithm look for first? When the selection sort finds this val...
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Palindrome Testing A palindrome is a string that reads the same backward as forward. For example, the words wor...
Starting Out with C++: Early Objects (9th Edition)
A(n) _______ program translates a high-level language program into a separate machine language program. a. asse...
Starting Out with Programming Logic and Design (4th Edition)
Magic Dates The date June 10, 1960, is special because when we write it in the following format, the month time...
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
True or False: Constructors are not inherited.
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Knowledge Booster
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
- (Python matplotlib or seaborn) CPU Usage We have the hourly average CPU usage for a worker's computer over the course of a week. Each row of data represents a day of the week starting with Monday. Each column of data is an hour in the day starting with 0 being midnight. Create a chart that shows the CPU usage over the week. You should be able to answer the following questions using the chart: When does the worker typically take lunch? Did the worker do work on the weekend? On which weekday did the worker start working on their computer at the latest hour? cpu_usage = [ [2, 2, 4, 2, 4, 1, 1, 4, 4, 12, 22, 23, 45, 9, 33, 56, 23, 40, 21, 6, 6, 2, 2, 3], # Monday [1, 2, 3, 2, 3, 2, 3, 2, 7, 22, 45, 44, 33, 9, 23, 19, 33, 56, 12, 2, 3, 1, 2, 2], # Tuesday [2, 3, 1, 2, 4, 4, 2, 2, 1, 2, 5, 31, 54, 7, 6, 34, 68, 34, 49, 6, 6, 2, 2, 3], # Wednesday [1, 2, 3, 2, 4, 1, 2, 4, 1, 17, 24, 18, 41, 3, 44, 42, 12, 36, 41, 2, 2, 4, 2, 4], # Thursday [4, 1, 2, 2, 3, 2, 5, 1, 2, 12, 33, 27, 43, 8,…arrow_forward(Display patterns using loops) Use nested loops that display the following patterns in two separateprograms: pattern A Pattern B Pattern c 123456 1 3 1 6 1 2 3 3 3 1 6 1 2 3 4 5 3 3 3 1 6 1 2 3 4 5 6 7 3 3 1 6 1 2 3 4 5 6 7 8 9 3 123456arrow_forward1)use two list one for names and one for cost 2) keep total cost you will spend and print the average cost for a gift - ????? could you do this with just one list??? 3) after end of loop print the two list and the average and the number of name and number of cost in the list. (suggestion - use for loop) USE this Program: Holiday = []name = input("enter name").upper()while name != "XXX":cost = float(input("enter amount to spend >0 and <=10"))while cost <=0 or cost >10:print("invalid cost")cost = float(input("enter amount to spend >0 and <=10"))gift = name + " " + str(cost)Holiday.append(name)Holiday.append(cost)Holiday.append(gift)name = input("enter name").upper()print(Holiday)arrow_forward
- Explain the body of the loop.arrow_forward(C++ language)arrow_forward(Written in C) Create a payroll program to store and calculate the payroll for a small company as follows:Create an array of floats that is 4 rows and 50 columns, with the columns being the number of employeerecords stored in the array.Program parameters are as follows:Create a menu in a function menu and call it with the following options (use a do-while loop):A or a to add employee infoD or d to display employee infoT or t to display total payrollS or s to display the info of all employeesC or c to display the count of employees present in the arrayF or F to delete a recordZ or z to exit programThe information for each employee is: employee number, hours worked, pay rate per hour, taxdeduction.Option A or a:Call the function possible to check and if the index returned is 50 then output a msg saying that thearray is full. If the index returned is less than 50 the call the function add, pass to it the available index asthe third argument and the function will ask the user for one…arrow_forward
- Net Salary Calculator (Toy Problem)Write a program whose major task is to calculate an individual’s Net Salary by getting the inputs of basic salary and benefits. Calculate the payee (i.e. Tax), NHIFDeductions, NSSFDeductions, gross salary, and net salary.arrow_forwardpython codingarrow_forwardPYTHON (Do not use functions) Write a program using a Loop structure that takes 5 inputs of sales for item 1 – item 5 from the user during runtime. The program use Running -Total to calculate the sales. The program applies 7% SalesTax The program gives a discount of 5% if the total sales are greater than $6000 The program gives a discount of 6% if the total sales are greater than $7000 The program validates the input as numbers only (Must Enter a Number) Provide different outputs to cover (1-6) The 5 items entered for sales calculations The subtotal of sales without taxes The total sales with taxes The final total of no discount < $6000 The final total of discount if sales > $6000 The final total of discount if sales > $7000arrow_forward
- (python) Study the following code, specifically the loop. _sum = 10 for k in range (2, 20, 3): _sum = _sum + (2*k) if _sum > 100: print("exceeded 100") Now, rewrite the for loop (for k in range(2, 20, 3):)to be a while loop that accomplishes the same objective. You don't need to show/use the other lines.arrow_forwardProblem3: Looping: (30 points)Create a program flowchart that generates and displays the Fibonacci sequencenumbers of n(as input). In Fibonacci, the current third number is the sum of two previousnumbers. Sample input/output dialogue:Enter a no. 9Fibonacci series : 1 1 2 3 5 8 13 21 34Your flowchart and pseudocode here…...pls help me :(arrow_forwardC++ pls (use only while-loop. using for-loop will not get any credit.) Ask user how many grades you have. then ask them to enter those grades (this is a outer while-loop), then each time validate a grade(this is inner while-loop), then when you got all valid grades, find the average.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Control Structures - while loop - do-while loop - for loop - Goto - break - continue statements; Author: EzEd Channel;https://www.youtube.com/watch?v=21l11_9Osd0;License: Standard YouTube License, CC-BY