1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Amanda [17]
3 years ago
8

Consider the following class, which models a bank account. The deposit method is intended to update the account balance by a giv

en amount; however, it does not work as handed public class BankAccount 1 private String accountOwner Name: private double balance private int account number public BankAccount(String nane, double Initialbalance, Int acetum) account Owner Name - name: balance initialBalance account Number - acetum; ) public void deposit (double amount) double balance - balance + amount; 1 3 What is the best explanation of why the deposit method does not work as intended? O The variable balance must be padded to the deposit method. The deposit method must have a return statement. In the deposit method, the variable balance should be replaced by the variable initialbalance. In the deposit method, the variable balance is declared as a local variable and is different from the instance variable balance
Computers and Technology
1 answer:
Sav [38]3 years ago
7 0

Answer:

the variable balance is declared as a local variable and is different from the instance variable balance.

Explanation:

In this code, the deposit method is not working as intended because the variable balance is declared as a local variable and is different from the instance variable balance. This is occurring due to the keyword double being placed before the balance variable within the deposit method. This is basically creating a new variable called balance that is only targetable by the local scope within the deposit method. Removing this keyword would instead target the class instance variable balance which is what is needed. In this case, the balance local variable being created is always null and would cause the method to not function.

You might be interested in
Guys i really need help pleasure?
miskamm [114]

How many copies to print is one of several choices
you can indicate in the print dialog.


7 0
3 years ago
Read 2 more answers
If you are logged on to Windows Live Messenger, why would you be unable to engage
Mazyrski [523]

Answer:

I'm not sure i haven't had that problem

Explanation:

7 0
3 years ago
write a Program which displays at least 5 different sentences that explain how technology has been used to win souls to Christ.
creativ13 [48]

Answer:

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>int main()</em>

<em>{</em>

<em>cout<<"Technology Has been Used to Win Souls to Christ through Some of these means"<<endl;</em>

<em>cout<<" "<<endl;</em>

<em>cout<<"1.\t Through Ministry and Church Websites"<<endl;</em>

<em>cout<<" "<<endl;</em>

<em>cout<<"2.\t Through Internet Media on the Web (Podcasts, simulcasts etc) for gospel streaming"<<endl;</em>

<em>cout<<" "<<endl;</em>

<em>cout<<"3.\t Keeping in touch or follow-up of new converts through social media platforms"<<endl;</em>

<em>cout<<" "<<endl;</em>

<em>cout<<"4.\t Receiving Monetary seed donations online from members accross the world (Paypal, Western Union etc)"<<endl;</em>

<em>cout<<" "<<endl;</em>

<em>cout<<"5.\t Through keeping up to date Membership records and church attendance data Analysis"<<endl;</em>

<em>cout<<" "<<endl;</em>

<em>    return 0;</em>

<em>}</em>

Explanation:

The following program in C++ prints out five sentences using multiple cout statements outlining how technology has been used to win souls to Christ Jesus

5 0
3 years ago
________ a file transfers a copy of the file from the storage media into your computer memory
frez [133]
Is coping one of the answers? If so, I would say that.
6 0
3 years ago
What is the one common feature that ties together different social media technologies? All of the social media tools we use toda
xxTIMURxx [149]
They provide an intersection between technology, social interaction, and the sharing of information
8 0
3 years ago
Read 2 more answers
Other questions:
  • What type of operating system runs a dedicated electronic device such as a smart thermostat?
    5·1 answer
  • You are researching RAM for a computer you are building for a friend who will be using the system as a home office server for he
    6·1 answer
  • Word 2013 opens, by default, on a blank document?
    13·2 answers
  • Write a program that prompts the user to enter a three digit integer and determine whether it is a palindrome number.
    12·1 answer
  • I need help please!!?
    11·2 answers
  • Janet has created a 3D movie. She wants to make a copy of the movie and store it for future use. Which device should she use?
    14·1 answer
  • QUESTION 16
    14·1 answer
  • What's true about freedom
    12·2 answers
  • I hack3d into my schools computer system to unblock everything but now I am scared that I am going to get caught so I want to de
    13·2 answers
  • Taking this driver education course
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!