Giter VIP home page Giter VIP logo

py_oop_projects's Introduction

PY_OOP_Projects

for python oop project-1

e need to design an dimplement a class that will be used to represent bank accounts.

We want the following functionality and characteristics:

  • accounts are uniquely identified by an account number (assume it will just be passed in the initializer)
  • account holders have a first and last name
  • accounts have an associated preferred time zone offset (e.g. -7 for MST)
  • balances need to be zero or higher, and should not be directly settable.
  • but, deposits and withdrawals can be made (given sufficient funds)
    • if a withdrawal is attempted that would result in nagative funds, the transaction should be declined.
  • a monthly interest rate exists and is applicable to all accounts uniformly. There should be a method that can be called to calculate the interest on the current balance using the current interest rate, and add it to the balance.
  • each deposit and withdrawal must generate a confirmation number composed of:
    • the transaction type: D for deposit, and W for withdrawal, I for interest deposit, and X for declined (in which case the balance remains unaffected)
    • the account number
    • the time the transaction was made, using UTC
    • an incrementing number (that increments across all accounts and transactions)
    • for (extreme!) simplicity assume that the transaction id starts at zero (or whatever number you choose) whenever the program starts
    • the confirmation number should be returned from any of the transaction methods (deposit, withdraw, etc)
  • create a method that, given a confirmation number, returns:
    • the account number, transaction code (D, W, etc), datetime (UTC format), date time (in whatever timezone is specified in te argument, but more human readable), the transaction ID
    • make it so it is a nicely structured object (so can use dotted notation to access these three attributes)
    • I purposefully made it so the desired timezone is passed as an argument. Can you figure out why? (hint: does this method require any information from any instance?)

py_oop_projects's People

Contributors

gsamueil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.