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

  Enterprise java beans (ejb) in software development

Enterprise Java Beans (EJB) in software development, EJB technology, EJB application, Stateless Session Beans (SLSB), Stateful Session Beans (SFSB), Message Driven Bean (MDB), Entity Bean

  List various bindings that are needed to determine semantics

List the various bindings that are required to determine the semantics when the statement is executed. For each binding, indicate the binding time used for the language.

  Instance methods

instance methods: setWidth(double w), setHeight(double h), double getWidth(), double getHeight() and double getArea() * A triangle's area is calculated by width*height*0.5  * all variables are private and methods public.

  Implement avl tree

Implement AVL trees that allows both iterative traversal and recursive traversal.

  Create a java program to calculate the circumference

Create a Java program based on the geometric shapes. The program should begin by prompting you for the shape you want to calculate the circumference.

  Create a recursive factorial program

Assignment 1: 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 !. For example, if the input is 4, the output could be:

  Correct example of inheritance

Which of the following relationships is not a correct example of inheritance?  Parent to Children  Aunt to Uncle  Grandparent to Grandchild

  Java program editing

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

  Java script program for song

Construct a JavaScript program that declares and prints an array that includes at least twenty of your favorite songs.

  Java program ask user to enter 10-character telephone number

Write a Java program that asks the user to enter a 10-character telephone number in the format XXX-XXX-XXXX. The program should display the telephone number with any alphabetic characters

  Client server monitoring system project design

client server monitoring system project design. The server adminstation can send messages to the clients and DESIGN WITH JAVA NETBEANS AND GUI.

  Develop java package comprising of class using encapsulation

Develop the Java package comprising of Class and Student with the given requirements. Encapsulation, Method to print student details alone.

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