subject
Computers and Technology, 26.03.2020 22:20 22norvd

Demonstrating Composition Create a new class called BankCustomer. A BankCustomer has a name (of type string), a checking account (of type Account), and a savings account (of type Account). It should also have a method that tells the individual account balances for the user as well as a total of both account balances. Use the Account class from chapter 3 but take out the name variable. The name will only be in the BankCustomer class. The Account class still needs its getBalance and Deposit methods and its internal balance of course, but take out the name variable. Make a java program that creates at least one BankCustomer object with data from the user (name, checking account balance, savings account balance). Use the method in BankCustomer to show the current balances, then ask the user for a checking account withdrawal, and a savings account deposit for this customer and make the changes through the BankCustomer object. Then use the method in BankCustomer to show the current balances again.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What is the name of the sound effect that danny hears
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
You know the right answer?
Demonstrating Composition Create a new class called BankCustomer. A BankCustomer has a name (of type...
Questions
question
Mathematics, 27.12.2019 14:31
Questions on the website: 13722361