This class is moving too fast and I only know simple Java programming so far, but we're getting into multiple classes for this savings account program. If anyone can do this I will spam +rep on your for the remainder of your DaniWeb life.

---Data
• the identity number for the account (the identity number is never changed once the account has been constructed)
• the balance in the account (the balance can change as a result of some operations)
---Operations
• create an account with a given identity number and initial balance
• return the identity number
• deposit some positive amount into the account, increasing the balance
• decrease the balance by a specified positive amount; if the amount is greater than the balance throw an IllegalArgumentException
• return the monthly interest due

The Account class needs the things below.

public abstract class Account
{
private int idNumber; / identity number for this account
private double balance; / current balance for this account
private double yearlyInterest; /amount of interest per year for this account

/ precondition: startBal >= 0.0
/ postcondition: An account with identity number idNum and current balance of startBal has been created
public Account (int idNum, double startBal)

/ postcondition: returns the identity number for this account
public int idNumber ( )

/ postcondition: returns the current balance for this account
public double currentBalance ( )

/ precondition: amount >= 0.0
/ postcondition: the current balance of this account has been increased by amount
public void deposit (double amount)

/ precondition: 0.0 <= amount <= balance
/ postcondition: the current balance of this account has been decreased by amount
public void decreaseBalance (double amount)

/ postcondition: returns the monthly interest due for this account
public double monthyInterest ( )

}

The operations for SavingsAccount that differ from those specified in the class Account are the following:
• create a new savings account with a given annual interest rate, as well as the parameters required for all accounts
• withdraw a positive amount that does not exceed the current balance, decreasing the balance by the amount withdrawn
• calculate the monthly interest by multiplying the current balance by the annual interest rate divided by twelve

The operations for CheckingAccount that differ from those specified in the class Account that was described on day 2 are the following.
• create a new checking account with a given per-check charge, as well as the parameters required for all accounts
• clear a check for a given amount by decreasing the balance by the amount of the check plus the per-check charge
• compute and return the monthly interest

The operations for SpecialCheckingAccount that differ from those specified in the class CheckingAccount are the following.
• create a new special checking account with a given minimum balance and interest rate, as well as the parameters required for a checking account
• clear a check for a given amount according to the rules above
• calculate the monthly interest by multiplying current balance by the annual interest rate divided by twelve if the current balance is above the minimum; otherwise, calculate the interest as it is done for a checking account

I do have some code but it really only completes the simple task of creating the Account and giving the user their ID number. Other than that, that's pretty much the long and short of it guys. I'd really appreciate any >HELPFUL< comments or code and not flame for my request.

-IMtheBESTatJAVA

masijade commented: No Comment Needed. -2

Recommended Answers

All 10 Replies

This class is moving too fast and I only know simple Java programming so far, but we're getting into multiple classes for this savings account program. If anyone can do this I will spam +rep on your for the remainder of your DaniWeb life.

Well, I can do it, so start spamming, I just won't.

I guess your moniker is kinda like calling a 7 foot tall man "tiny", huh? (Only more so.)

if we do it, that will only get you as far as your next assignment, its the ol teach a man to fish saying

i know you have quite a list of instructions, so break them down, focus on one account at a time, look at how it will be implemented and how you can using the functionality of your base class for it

> If anyone can do this I will spam +rep on your for the remainder of your DaniWeb life

Pity, you haven't got any left.

Lol, you guys are so snarky and unhelpful.


I do know how to program, but its just that the class moves too fast. I could do this assignment, yet

I'm falling behind because it takes me too long to figure out how to fix all of my errors. And it would

take even longer if I brought them here to all of you snarky adults thinking you're so special that you

can't help me out. I didn't even necessarily ask you to do the entire thing, but maybe give me

something to start with... or hell, even teach me how to do it. Some people can learn by being given

a program you know. It's not like I'll look at what code you gave me and just say "Sweet! Time to

turn this all in and ask them to do the next one!" No. The learning environment that I have been

given is quite deplorable to say the least, and my friends and I have pretty much been making group

work of it, taking a little bit of what each of us know and putting it together, but I want the entirety of

it. Thanks for nothing but dissapointment I guess. Not even any kind of flow chart or synthesis on

what I have to do.

***
And my name was just a joke, its obvious sarcasm that I think you would all be light-hearted enough

to catch on to. As far as the reputation comment goes, that was false as well as you guys really

shouldn't care about rep as much as you do helping a fellow community member, especially a new

one such as myself.

well.. you don't have to show us your code and errors, if you think i!t's redundant, but how can we fix 'm if we don't know what to fix? ever thought about that, genious?

I think you are contradicting yourself:

I didn't even necessarily ask you to do the entire thing

If anyone can do this I will spam +rep on your for the remainder of your DaniWeb life

it takes me too long to figure out how to fix all of my errors. And it would take even longer if I brought them here

Why would it take even longer to fix your errors if you brought them here? Everybody else does. We don't know what you have done so far and what approach you have selected. With the information you gave us we would have to write the thing from the begining.

As a suggestion create different classes for each of the accounts and One different class for creating them and using them

Here's a bit to get you started.

SavingsAccount should extend Account
CheckingAccount should extend Account
SpecialCheckingAccount should extent CheckingAccount

implement Account first, then override the methods in Account in the other three when you need different things to happen.

If your "falling behind", as you say, if we did this for you, you would only fall faster, since you wouldn't learn anything, so tomorrow, when you get a new assignment that is, essentially, an expansion on this one, you will have no idea how to do the expansion, since you didn't either do, or learn, this one.

So, tell me again, how this would help you.

lol but he will fall later rather than sooner

I think we best to stop here. Please no more comments and jabs.

I hope that IMtheBESTatJAVA has learn his lesson that we do not do students assignments and no pleading or harassing will change anything on it. Hopefully next time he will come in time, not five-to-twelve, and have ready code to discuss problem he is facing, meaning method "misbehaver" or incorrect final output etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.