Question: Do anyone can writes a step by step java code for Customer class? Thank you very much!!!! p. withdraw: takes a double as input and

Do anyone can writes a step by step java code for Customer class? Thank you very much!!!!
p. withdraw: takes a double as input and returns a boolean. If the input amount is less than or equal to the savings balance, reduces the savings balance by the input amount and returns true. Otherwise returns false and makes no change to the savings balance. (Hint: how much do you need to code?) q. sellshares: takes a int and a string as input and returns nothing. The input is the number of shares being sold and the String is the ticker symbol of the stock that is being sold. If the customer's stock's ticker symbol matches that input to this method, then call the stock's sell method with the amount of shares input to this method and the customer's commission amount. The amount returned by the sell method should be added to the customer's savings r. buyShares: takes an int and a string as input and returns a boolean. The inputs are the number of shares to purchase and the ticker symbol of the stock being purchased. If the ticker symbol of the customer's stock matches the input ticker symbol and if the total value of the customer (from the currentValue) method is equal or larger than the amount it would take to purchase the stock ((the number of shares times the stock's price) plus the commission), the stock's buy method is called, the saving balance is reduced by the amount returned from the buy method, and the buyShares method returns true. On the other hand if either the input ticker is not the same as the customer's stock's ticker, or if the cost of the puchase is larger than the customer's current value, the method returns false and no other processing is done 2 s. incrementDate: takes no input and returns nothing. Calls the associated method of the Date class to increment the date. If the date now equals the stock's dividend date, call the payDividend method of the stock and deposit the amount returned into the savings. If the savings balance is negative, transfer that balance to the loan (increasing the balance of the loan), and set the savings balance to zero. Then call the processDay method of both the savings and loan instances. Finally, if the month changed as a result of the increment, call the processMonth method of the savings and loan instances The Customer class should have one constructors that sets the first name, the last name, the commission, the stock, the savings, the loan, and the date of the account
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
