[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


can someone more experienced than me help with this...

<< Back to: [alt.comp.lang.learn.c-c++] - FAQ list

Question by bertriley@msn.com
Submitted on 8/20/2003
Related FAQ: [alt.comp.lang.learn.c-c++] - FAQ list
Rating: Rate this question: Vote
can someone more experienced than me help  with this program?
a.   Create a class named Account for a bank.  Data members include an account number, and a balance.  Functions include a constructor that requires the account number and balance parameters.  A display function is also included.  Derive two classes from Account: Savings, which includes an interest rate that is required by the constructor, and Checking, which includes a monthly fee that is required by the constructor.  Write a main() program to demonstrate the classes.
b.   Add a default constructor to the Account class.  Write a main() function that declares an array of five Account objects.  In a loop, prompt the user to enter a c to create a Checking object , or an S to create a Savings object.  Whether it is Checking or Savings, begin each Account with a 0 (zero )  balance and number each account sequentially beginning with 1001. Initialize Checking Accounts with a $3.25 fee, and a Savings Account with an interest Rate of 3%.  Display each Account as it is created .  At the end of main(), display each of the five accounts using the Account class display function.



Answer by Francisco Garcia
Submitted on 5/6/2004
Rating: Not yet rated Rate this answer: Vote
what is my pet's name?

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: [alt.comp.lang.learn.c-c++] - FAQ list


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.