Question: Plz Solve Qs 6 While in application with two Javi Claas server Java and Chentayam java with me given scenario 6. Write a class BankAccount

Plz Solve Qs 6 While in application with two Javi Claas serverPlz Solve Qs 6

While in application with two Javi Claas server Java and Chentayam java with me given scenario 6. Write a class BankAccount and an inner class Money in the Bank Account class. The [CO3,C3, inner class Money has two instance variables: dollar, and cent. Add a constructor of Mark: 71 the Money class which can take the amount in string and split it into dollar and cents and initialize the instance variable of the class. Add getAmount() function in Money class that returns the dollar and cent parts together. Again add addin Money secondAmount) function that can take parameter of type Money and add the dollar part and cent part to the instance variable of the class. Now Add a constructor of Bank Account which initialize the Money with "0.00" by creating an instance object of Money. Here the value o before the decimal part is the dollar part and 00 after the decimal is the cent part. Add makeDeposit(String deposit Amount) function that can deposit the money by calling the addin(new Money(depositAmount) function of the inner class Money. Also show the usage of the Bank Account and Money class in the main method of a class. Design a JAVA application that can perform the task as given in the above scenario, Page 3 of 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!