Python Forum
python homework help ASAP
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python homework help ASAP
#1
For written problems or problems where you are asked to provide an explaination you can submit your answers in a separate text file or you can just include them within your programs using Python comments. For problems requiring other written components (ie. structure chart), provide a pdf scan of the page(s).

For each problem that requires coding, you must:

Write a Python program
Test, debug, and execute the Python program
Save your program in a .py file and submit your commented code to your Student Page.
Note regarding comments: For every class, method or function you create, you must provide a brief description of the what the code does as well as the specific details of the interface (input and output) of the function or method.

(11 pts.) Create a Person class that contains the following members: name, email, and phone_number Provide a constuctor that initializes all three members with data passed to the constructor. Add a __str__ method that returns a string printing the data members. Provide methods that allows you to get and set all three data members. Demonstrate the correctness of your program with a couple sample test cases.

(11 pts.) Create an Account class that contains the following members: Person, account_number and balance where composition is used for the Person data member. Provide a constuctor that initializes all three members with the data passed to the constructor. Provide a method that allows you to get the account_number and methods that allow you to get and set the Person and balance data members. Additionally, for this class any attempt in a method or constructor to set a negative balance should result in the balance being set to 0. (Note: You must use composition for the Person data member). Demonstrate the correctness of your program with a couple sample test cases.

(11 pts.) Create a Savings_Account class that is a derived class of the Account class. Add a minimum_balance data member and deposit and withdrawl methods. The class should contain a constructor method that utilize the Account constructor but also ensures that no object is created if the provided balance is less than the provided minimum_balance. A __str__ method that displays all data members should also be provided. Additionally, any call to the withdrawl method should fail if the balance would drop below the minimum_balance. Demonstrate the correctness of your program with a couple sample test cases.

(11 pts.) Create a Loan_Account class that is a derived class of the Account class. Add a maximum_balance data member and deposit and withdrawl methods. The class should contain a constructor method that utilize the Account constructor but also ensures that no object is created if the provided balance is greater than the provided maximum_balance. A __str__ method that displays all data members should also be provided. Additionally, any call to the withdrawl method should fail if the balance would exceed the maximum_balance and any call to deposit should fail if he balance would drop below 0. Demonstrate the correctness of your program with acouple sample test cases.
Reply
#2
What have you tried? We're not big on writing code for people here, but we would be happy to help you fix your code when you run into problems. When you do run into problems, please post your code in Python tags, and clearly explain the problem you are having, including the full text of any errors.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Could someone help me finish this ASAP JimmyDricks 7 2,183 Dec-23-2021, 10:30 AM
Last Post: Larz60+
  HELP in python homework makashito 4 3,861 Oct-12-2021, 10:12 AM
Last Post: buran
  CyperSecurity Using Python HomeWork ward1995 1 1,930 Jul-08-2021, 03:55 PM
Last Post: buran
Exclamation urgent , Python homework alm 2 2,257 May-09-2021, 11:19 AM
Last Post: Yoriz
  Homework with python Johnsonmfw 1 1,655 Sep-20-2020, 04:03 AM
Last Post: ndc85430
  Need help with this homework for a course ASAP...need solution for completion. SP04123 8 4,874 Jun-21-2020, 06:15 PM
Last Post: buran
  really need assistance with this assignment ASAP due tomorrow mohamedhadi02 8 3,455 Jun-21-2020, 09:16 AM
Last Post: mohamedhadi02
  Python Homework Help *Urgent GS31 2 2,537 Nov-24-2019, 01:41 PM
Last Post: ichabod801
  Python Homework Question OrcDroid123 1 2,341 Sep-01-2019, 08:44 AM
Last Post: buran
  Python homework / functions sunhyunshine 1 2,415 May-11-2019, 05:37 PM
Last Post: MrTheOne

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020