Write a while loop that lets the user enter a number

Assignment Help JAVA Programming
Reference no: EM13161061

1) Write a while loop that lets the user enter a number. The number should then be multiplied by 10, and stored in a variable called product. The loop should then iterate as long as product contains a value less than 100.

2) Design a class called SavingsAccount that stores an annual interest rate and an initial balance in someone's account. Have the constructor accept an amount for the starting balance. Construct methods to handle withdrawals, deposits, and adding the monthly interest rate to the balance.

Write a program that will test the functionality of this class by having the program calculate the balance of an account at the end of each month. Have the program prompt the user for the starting balance, annual interest rate, and the number of months that have passed since the account was established. A loop should then iterate once every month, performing the following:

(a) Ask the user for the amount deposited to the account during the month. Use the class method to add this amount to the account balance.

(b) Ask the user for the amount withdrawn from the account during the month. Use the class method to subtract this amount to the account balance.

(c) Use the class method to calculate the monthly interest amount to the account balance.

 

 

Reference no: EM13161061

Questions Cloud

Distinguish recombinant and non-recombinant plasmids : c. Which antibiotic(s), if any, will cells be resistant to ifthey have obtained a plasmid containing inserted foreign DNA? d. How would you distinguish recombinant and non-recombinant plasmids by agarose gel electrophoresis.
Let''s try to make inheritance : Let's try to make inheritance a little less abstract and a little bit more concrete. In order to do this, we will model a simple inheritance relationship
State the decomposition of no2 : The decomposition of NO2 (shown below) has a KP = 4.8 × 10-6 at a certain temperature. If 1.36 atm of NO2 is placed in a flask at this temperature
State molar heat capacity at constant pressure : A sample of 1.00 mol of perfect gas molecules, originally at 1.00 atm, with a molar heat capacity at constant pressure of 7/2 R is put through the following cycle:
Write a while loop that lets the user enter a number : 1) Write a while loop that lets the user enter a number. The number should then be multiplied by 10, and stored in a variable called product. The loop should then iterate as long as product contains a value less than 100.
State a solution of naoh is added to the supnatant liquid : a solution of NaOH is added to the supnatant liquid until it is strongly alkaline. No precipitate is formed. Which ions are present in each of the precipitates. Which cations are not present in the original solution?
Lambert''s vacation rentals : Write an application for Lambert's Vacation Rentals. Use separate ButtonGroups to allow a client to select one of three locations, the number of bedrooms
Why an antibiotic may not be useful in humans : Although there are many antibiotics produced by soil organisms, most are not useful in humans. Suggest two likely reasons why an antibiotic may not be useful in humans.
Illustrate the structure of the program? : The scoring instrument has a section on style. These are the four criteria for style: o Do identifiers logically describe use? o Is indentation used correctly to illustrate the structure of the program? o Is there a consistent naming convention? o Do..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Utilizes a good design process

Analyze, design, and document a simple program that utilizes a good design process and incorporates sequential, selection and repetitive programming statements as well as at least one function call and the use of at least one array.

  Reads in up to 1000 non-negative integers

Write a program that reads in up to 1000 non-negative integers and displays distinct numbers (i.e., if a number appears multiple times, it is displayed only once). (Hint: Read each number and store it in an array if it is new. If the number is alread..

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

  Determine the visual resolution of resulting image

Drawing in 8.5 by 11 inch sheet is digitized by means of 300 dpi (dots per inch) scanner. Determine the visual resolution of resulting image (number of dots in each dimension)?

  World data app

Prepare WorldDataApp project. It implements the NameIndex portion, including creating it in SetupProgram, and searching, viewing and updating it in UserApp program.

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Java program editing

Prompt the user for the student's score and put that value into an object

  Compute the temperature in centigrade

Compute the temperature in Centigrade - Display the temperatures in both Centrigrade and Fahrenheit with appropriate labels, using the + operator to concatenate the labels with the variables

  Insert uml design diagrams, use case, classes

Insert UML design diagrams here (use case, class, and sequence diagram).

  Write applet which reads five numbers-draw equivalent stars

Write the applet which reads five numbers (each between 1 and 30). For each number read, your program must design line containing that number of adjacent asterisks.

  Lambert''s vacation rentals

Write an application for Lambert's Vacation Rentals. Use separate ButtonGroups to allow a client to select one of three locations, the number of bedrooms

  Write function in javascript to compute person-s gross pay

Write the function using JavaScript syntax to compute a person's gross pay for a week. The function should receive the number of hours worked and the rate of pay per hour.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd