Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedPlz 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

8. Provide recommendations for how to manage knowledge.

Answered: 1 week ago

Question

What is the best conclusion for Xbar Chart? UCL A X B C B A LCL

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago