Question: 10) If you write a class called main) do ) you create a Car object like this: led Car, but do not write a toString)

 10) If you write a class called main) do ) you

10) If you write a class called main) do ) you create a Car object like this: led Car, but do not write a toString) method. Then in Constructor exists that takes these parameter types newCar('Toyota" "Corolla, 1994, "blue"): printin("This is myCar information:+ myCar.toString()); Car mc myCar ystemout. Sy Explain what will happen and why that will happen. 11) Suppose you have a class called BankAccount that is abstract. Then you have a concrete class called SavingsAccount that extends BankAccount. BankAccount has an abstract method called withdrawFunds(double amountToWithdraw) and a non-abstract method called depositFunds(double amountToDeposit ). SavingAccount does NOT have its own version written for depositFunds(double) There are four questions here. a)ls this a valid declaration? BankAccount myAccount- new SavingsAccount() answer: b)ls this a valid declaration? SavingsAccount myAccount- new BankAccount(); answer Suppose you have this code: c) SavingsAccount myAccount = new SavingsAccount( ); myAccount.depositFunds(200); What code (from which class) will execute as a result of that method call

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!