Question: I ' m trying to output a certain result, but it keeps returning an unexpected thing. I know I ' m missing something, but I

I'm trying to output a certain result, but it keeps returning an unexpected thing. I know I'm missing something, but I don't know what it is. This is the code so far:
class UML_Lab_Driver {//le conductor
public static void main(String[] args){
Bank Bob = new Bank();
Bob.addPerson("Bob");
Bob.depositAccount("Bob",40000);
Bob.withdrawAccount("Bob",25000);
Bob.getAccountBalance("Bob");//expecting 15000
}
}
class Bank{
private Person[] persons = new Person[10];
private static int personCount;
public void addPerson(String name){
Person person = new Person(name);
persons[personCount]= person;
personCount++;
System.out.println(persons[0]);
}
public void removePerson(String name){
boolean found = false;
for (int i=0;i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!