Answered You can hire a professional tutor to get the answer.

QUESTION

` The Customer class. The Customer class represents'amp; customer account. The Customer class will have amp; customer name I first and last;,...

Could anyone knows how to write the q sellshares. r buy shares s increment Date. If you know, please writes a step by step solution, Thank you very much!!!

` The Customer class." The Customer class represents'& customer account. The Customer class will have & customer name I first and last;, the customer's stock , the*customer's savings , the customer's loan , the commission , and the date ."The class should have the following methods .` Jet E _ _ _ theme _ Lilies no input and returns a String that is the first name associated with the accountDo . act F _ < < thang . likes a string is input and returns nothing. Changes the first name associated with the account.` JetLagthere : Like an input and returns String the last name associated with the accountI . acthanthere . like & Etring & input and returns nothing . Changes the last name associated with the account`. JetztEck . takes on input and returns' & Stock that is the Stuck associated with this customer .I . actstock , Like a Stock Is input and returns nothing . Chances the clock instance a`see`iated with this customer.{ . get Savings . luke's no input and returns & Eating. that is the savings account associated with this customer."The savings account will not change*hi . getLoan : takes an input and returns a Loan that is the loan `^``iated with this customer."The loan will not change1 . Jetcomingionacount . like` no Input and returns in double that Is the Commission amount for the account .J. actcommissioncount : likes it double is input and returns nothing _ Changes the commission announce for the account .K . getDate : takes on input and returns' & Date InSTUNT! !`1. actnate , takes It Date a" input and returns nothing . Changes the Late In the account .IT . current value , takes on input and returns' & double that is the Savings balance plus the Stack number of shares times the Stack current price and subtracted bythe Loan balance .D . deposit , takes it double as input and returns nothing . A``'s the input amount to the savings balance*U. FLY Loan : takes It double as input and returns nothing . Reduces the loan balance by" the input amount .P. withdraw , Like a double its input and returns' & boolean . If the input amount in Less than or equal to the savings balance , reduces the savings balance by theinput amount and returns's true . Withervice returns false and makes no change to the savings balance . " Hint : how much do you need to codie" !`1. sellshares : take'& int and a string is input and returns nothing . The input is the number of shares being sold and the String is the ticker symbol of thestick that is being sold . If the customer's stack's ticker symbol matches that input to this method, then call the stack's cell method with the amount of shares*input to this method and the customer's commission amount . "The amount returned by the cell method should be added to the customer's savings*T. buy shares : takes an int and a string is input and returns & 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 lithe number of shares times the stock's price ; plus the commission ), the stock'`buy method is called, the saving balance is reduced by the amount returned from the buy method , and the buyshares method returns true . In the other hand ifEither the input ticker is not the same as the customer's stack's ticker , or if the cost of the purchase is larger than the customer's current Value , the method return`{zinc and no other processing is done .`{. increment date : Likes an input and returns nothing _ Calls the associated method of the Lake class to increment the date . If the date now equals the clock'sdividend date , call the payDividend method of the stock and deposit the amount returned into the savings . If the savings balance is negative , transfer thatbalance to the loan (increasing the balance of the loanj , and set the savings balance to zero ." Then call the Frozencozy method of both the savings and loaninstances . Finally; if the month changed as a result of the increment , call the processmonth method of the savings and loan instances*
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question