Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

E-wallet with C++

ahuckphin
 Share

My teacher sucks and my group very clueless 

Quote

Questions:

Design a class named ‘E-Wallet’ to represent a simple e-wallet such as AliPay. The class should hold the following:

  • Fields/attributes – full name, identification/login (ID), date of birth (DOB), balance, IC number.
  • Constructors to create an ‘E-Wallet’ object either with a given balance or an unknown balance in which, it should be set to “0.00”.
  • Methods:
    • all ‘getter’ & ‘setter’ methods;
    • display method to print out the details of an E-Wallet object;
    • withdraws method & deposit method – which will subtract or add an amount from the balance and output a string containing the revised balance.

Next, design a new class named ‘E-Credit’ that derives from ‘E-Wallet’ to represent a credit facility. The class should hold the following additions/changes:

  • Field/attribute – credit limit, user type: ‘normal’ or ‘super’.
  • Constructor to create an ‘E-Credit’ object either with a given credit limit or an unknown credit limit in which it should be set to “500.00” for ‘normal’ user type.
  • For ‘super’ user type, the constructor to create an ‘E-Credit’ object with credit limit is set to “50,000.00”.
  • Methods:
    • ‘getter’ & ‘setter’ methods for credit limit;
    • display method to print out the details of an ‘E-Credit’ object;
    • withdraw method – which will subtract an amount from the balance and output a string containing the revised balance. Your program should allow the withdraw method reduce a balance below zero only if the resulting balance is greater or equal to the credit limit. If not, an appropriate message should be output.

Develop a program that includes all the classes and a driver program. In main method, creates an array of 50 ‘E-Credit’ accounts. Your program should provide the functions such as:

  • Allow user to register a new ‘E-Credit’ account;
  • Withdraw / deposit from an ‘E-Credit’ account based on a given ID or full name or IC number;
  • Print the details of an ‘E-Credit’ account based on a given ID or full name or IC number;
  • Print the details of all an ‘E-Credit’ accounts.

 

To note that we are supposed to use Dev C++ for coding. 

Link to comment
Share on other sites

Link to post
Share on other sites

There are forums where you would get a warning for such post (not on this forum). Why this is just the question the teacher asked you and not what you think you are proposed to do (what you already tried) paired with your problem where you need help.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, James Evens said:

There are forums where you would get a warning for such post (not on this forum). Why this is just the question the teacher asked you and not what you think you are proposed to do (what you already tried) paired with your problem where you need help.

Agreed with @James Evens. Why not start the project and see how far you get and if you absolutely get stuck then delegate to this forum or maybe try researching your issues. You shouldn't just ask for someone to do it for you, by doing that what do you learn in return?

My PC Specs:

CPU: Intel Core i7 8750H RAM: 16 GB DDR4 2666 MHz GPU: NVIDIA GeForce GTX 1050Ti

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×