Big Java, Binder Ready Version: Early Objects
Big Java, Binder Ready Version: Early Objects
6th Edition
ISBN: 9781119056447
Author: Cay S. Horstmann
Publisher: WILEY
Expert Solution & Answer
Book Icon
Chapter 1, Problem 14RE

Explanation of Solution

Values that will not make the algorithm terminate:

  • If the initial balance is large enough and at the same time the rate of interest is also large enough.
  • During the first month, the calculation of interest will exceed the monthly expenses, then account of the user will never be depleted and this will make the algorithm not to terminate.

Therefore, in order to the make the algorithm terminate in the proper way the following modification are required

Modified algorithm to estimate the number of years required to the account to deplete:

Step 1: Initialize the variables “year” and “month” to “0” and “balance” to “10000”.

Step2: Prompt the user to enter the value of “balance”, “interest rate” and” monthly expenses”.

Step 3: Validate using if the “balance * interest” is greater than the “monthly expenses”...

Blurred answer

Chapter 1 Solutions

Big Java, Binder Ready Version: Early Objects

Ch. 1.5 - How do you modify the HelloPrinter program to...Ch. 1.5 - How would you modify the HelloPrinter program to...Ch. 1.5 - Would the program continue to work if you replaced...Ch. 1.5 - What does the following set of statements...Ch. 1.5 - What do the following statements...Ch. 1.6 - Suppose you omit the “” characters around Hello,...Ch. 1.6 - Suppose you change println to Printline in the...Ch. 1.6 - Suppose you change main to hello in the...Ch. 1.6 - When you used your computer, you may have...Ch. 1.6 - Prob. 20SCCh. 1.7 - Prob. 21SCCh. 1.7 - Prob. 22SCCh. 1.7 - Prob. 23SCCh. 1.7 - Prob. 24SCCh. 1.7 - Suppose you have a random sequence of black and...Ch. 1.7 - Prob. 26SCCh. 1 - Prob. 1RECh. 1 - Which parts of a computer can store program code?...Ch. 1 - Which parts of a computer serve to give...Ch. 1 - A toaster is a single-function device, but a...Ch. 1 - Prob. 5RECh. 1 - Prob. 6RECh. 1 - What does this program print? public class...Ch. 1 - What does this program print? Pay close attention...Ch. 1 - Prob. 9RECh. 1 - Write three versions of the HelloPrinter.java...Ch. 1 - How do you discover syntax errors? How do you...Ch. 1 - Prob. 12RECh. 1 - Prob. 13RECh. 1 - Prob. 14RECh. 1 - Prob. 15RECh. 1 - Prob. 16RECh. 1 - Prob. 17RECh. 1 - Write pseudocode for an algorithm that describes...Ch. 1 - Prob. 19RECh. 1 - Write a program that prints a greeting of your...Ch. 1 - Write a program that prints the sum of the first...Ch. 1 - Write a program that prints the product of the...Ch. 1 - Write a program that prints the balance of an...Ch. 1 - Prob. 5PECh. 1 - Write a program that prints your name in large...Ch. 1 - Write a program that prints your name in Morse...Ch. 1 - Prob. 8PECh. 1 - Prob. 9PECh. 1 - Prob. 10PECh. 1 - Write a program that prints an animal speaking a...Ch. 1 - Prob. 12PECh. 1 - Prob. 13PECh. 1 - Prob. 14PECh. 1 - Prob. 15PECh. 1 - Prob. 16PECh. 1 - Prob. 17PECh. 1 - Prob. 18PECh. 1 - Prob. 19PECh. 1 - Prob. 20PECh. 1 - Prob. 21PECh. 1 - You want to decide whether you should drive your...Ch. 1 - Prob. 2PPCh. 1 - Prob. 3PPCh. 1 - Imagine that you and a number of friends go to a...Ch. 1 - Prob. 5PPCh. 1 - Write an algorithm that allows a robot to mow a...Ch. 1 - Consider a robot that is placed in a room. The...Ch. 1 - Consider a robot that has been placed in a maze....Ch. 1 - Prob. 9PPCh. 1 - Prob. 10PPCh. 1 - Prob. 11PP
Knowledge Booster
Background pattern image
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