Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Finally, we have the creditAccount. With credit cards you have a certain balance to start that is given to you on credit ( kind of

Finally, we have the creditAccount. With credit cards you have a certain balance to start that is given to you on credit (kind of like a loan). Well say $1000 will be the default and this value can be recorded as the creditLimit (an int is fine to store this), though the value with this account will record not how much money you have in the account but how much you have charged to it. When you withdraw money you are adding to the value and if we getValue we want to know how much credit we have left before we reach our limit (so we will have to overwrite that method as well in this class). Note that we cannot overdraft our account so we will have to make sure any withdraws do not let the value exceed the credit limit, though deposits, which subtract from the value, may exceed the 0 and thus there would be a negative value in the account (showing that you have more than the credit limit that you can use).

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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions