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

  The string class and/or the stringbuffer class in java

Create a simple Java application that uses the String class and/or the StringBuffer class and at least 4 of the class methods. Show the code, demonstrate it works properly and describe what it is doing.

  Create a world class that contains a 2d array

You have to create a world class that contains a 2d array then create an abstract class called organism that contains move() method the organism should move randomly one step at the time.

  Write specifications for method which advances date by one

Write specifications for the method which advances any given date by one day. Comprise a statement of purpose, pre- and post-conditions, and description of parameters.

  Write java program using array list object

Write a java program (using eclipse) using ArrayList object to allow the professor to enter student's name, his or her's four test scores.

  Evaluate the rtas resource requirements

Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements.

  Implement the finite field gf

Write a program called "GF2.java" to implement the finite field GF(p n )where p is a prime number andn is a positive integer.You also need to write four methodsto realize.

  Java program to print strings given at command line

Write down program Average.java to print strings which it is given at command line, one per line. If nothing is given at command line, then print "No arguments".

  Create and implement class called date to store month

Create and Implement the class called Date which has data members to store month (as a number), day, year, and name of month.

  Java applet to find how much federal tax we need to pay

Write a java applet to determine how much federal tax we need to pay assuming the tax rate is 12%.  Ask the taxable income.

  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.

  Implementation activities of software development

Analysis, design, and implementation activities of software development

  What position along the chord does minimum pressure occur

At what position along the chord does the minimum pressure occur? What is special about the point where C p is a maximum?

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