Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A bank maintains the accounts for its customers. The bank offers customers two t

ID: 3924741 • Letter: A

Question

A bank maintains the accounts for its customers. The bank offers customers two type of accounts - a checking account and a savings account. The checking account charges ustomers a fixed service charge of $25.00 per month. The savings account yields a fixed interest rate of 3% per year on the monthly balance. The bank allows cutomers to make deposits, withdrawals, and to get their balance at any time.

From the set of responses below select those that best describe an interface for this situation.

              (I)                                                                                          (II)
              
public interface Banking                                                          public interface Banking
{                                                                                                   {
          double CHECKING_RATE = 25.0;                                         double CHECKING_RATE = 25.0;
          final double SAVING_RATE   = 0.03;                                    double SAVING_RATE   = 0.03;
               
          void deposit(double amount);                                                void deposit(double amount);
          double withdraw(double amount);                                        double withdraw(double amount);
          double getBalance();                                                               static double money = getBalance();
}                                                                                                  }

                  (III)                                                                                      (IV)
public interface Bankikng                                                      public interface Banking
{                                                                                                 {
         static double CHECKING_RATE = 25.0;                                 double CHECKING_RATE = 25.0;
         double SAVING_RATE   = 0.03;                                               double SAVING_RATE   = 0.03;
               
         void deposit(double amount);                                                  void deposit(double amount);
         abstract double withdraw(double amount);                           double withdraw(double amount);
         double getBalance();                                                                  static double getBalance(){ return amount};
}                                                           }

                      (V)                                                                                        
public interface Bankikng                                                         
{                                                                                                  
         static double CHECKING_RATE = 25.0;                                        
         static final double SAVING_RATE   = 0.03;                                                      
               
         publicabstract void deposit(double amount);                                                       
         abstract double withdraw(double amount);                               
         double getBalance();                                                                       
}                                           

SELECT ALL POSSIBLE RESPONSES

Select one or more:

a. I

b. V

c. II

d. III

e. IV

Explanation / Answer

Answer : V

(V)                                                                                        
public interface Bankikng                                                         
{                                                                                                  
         static double CHECKING_RATE = 25.0;                                        
         static final double SAVING_RATE   = 0.03;                                                      
               
         publicabstract void deposit(double amount);                                                       
         abstract double withdraw(double amount);                               
         double getBalance();                                                                       
}   

Explaination :

Let me know if you have any doubts.

Thanks.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote