Question: Why does the following code snippet lacks cohesion? And what is the solution? 1. public class BankAccount 2.{ 3. private double balance; 4. private
Why does the following code snippet lacks cohesion? And what is the solution? 1. public class BankAccount 2.{ 3. private double balance; 4. private String customerName; 5. private String phoneNumber; 6. 7. 8. 9. } public BankAccount(double intitial Balance, String name, String phoneNo){ 10.}
Step by Step Solution
3.50 Rating (153 Votes )
There are 3 Steps involved in it
Answer A solution to improve cohesion would be to modify the constructor ... View full answer
Get step-by-step solutions from verified subject matter experts
