1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Python ATM script using OOP

  1. Dec 31, 2016 #1
    hello everyone,
    I am a new member of this forum I found really good topics and good community that helps with many scientific fields. So I have this long text-based user interface for banking system written in python functions , but needs to be written using object oriented programming. I had build many possible structures without reading the implementations of the instructor, but as I read them and try to apply them everything become very complicated.

    How can write/re-write the following code(ready) using the objected oriented Python? : http://www.pastebin.ca/3751103 [Broken]

    Where did i make a mistake?


    Here i tried the whole last weak something like this:
    http://pastebin.ca/3751105 [Broken]


    finally, here are the implementations :http://pastebin.ca/3751108


    THANKS all and happy new year.
     
    Last edited by a moderator: May 8, 2017
  2. jcsd
  3. Jan 1, 2017 #2

    mfb

    User Avatar
    2016 Award

    Staff: Mentor

    Just putting everything into a single class doesn't make the code object-oriented.

    Start with a list of objects you want to have. An account, for example. What are the properties of an account? What are things an account can do? Certainly not printing a navigation menu, as your current code suggests! And why do you define an Admin as "some type of account"?
     
  4. Jan 1, 2017 #3

    Mark44

    Staff: Mentor

    Your second link contains the following:
    These notes lay out pretty clearly what you need to do: create a number of classes with the specified properties.
     
    Last edited by a moderator: May 8, 2017
  5. Jan 2, 2017 #4

    man , how can i delete this thread ? thanks in advance
     
  6. Jan 2, 2017 #5

    Mark44

    Staff: Mentor

    Our policy is to not delete such threads when there have been replies to the question.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Python ATM script using OOP
  1. Python Beginner (Replies: 3)

  2. Python question (Replies: 1)

Loading...