Question: need java help! fields can be anything. 1.1 Introduction The purpose of this tab is to give you practice with the new concepts introduced through
1.1 Introduction The purpose of this tab is to give you practice with the new concepts introduced through the Shape example, such as polymorphism and sub: typing through the concept of protocols (known as interfaces in Javal. We will also explore some early-stage code reuse via inheritance (using abstract classes). 1.2 What to do For this lab, you will design and implement the start of a banking solution for a neighborhood bank. There are two types of accounts the bank wants you to implement one called SayinesAccount and one called CheckoutAccount Both accounts can do the following Create a new account by specifying a starter amount of money to open it with. The starter amount must be greater than or equal to one cent Do this: Create a constructor that takes a single double representing the starter amount" for the account. Deposit into their account Do this: Create a method that takes a single double representing the amount deposited into the account. If the amount specifed is negative, throw an illegalArgumentException Withdraw from their account. Do this: Create a method withdraw that reduces the account balance by the amount specified. Return true if the transaction is successful, false otherwise Check their balance. Create a method getBalance that returns a double (the current account balance) Non customer behavior you must implement: Bank administrators can perform monthly maintenance to assess monthly fees and give a "clean slate" for the subsequent month Do this: Create a performMonthly Maintenance method to charge any fees and then reset transaction counters to zero. Do this: Create a toString method that prints the account balance in dollars/cents format (e.g: $10,00)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
